H3C Technologies H3C S6800 Series Switches User Manual

Page 376

Advertising
background image

363

<CE1> system-view

[CE1] vlan 10

[CE1-vlan10] quit

[CE1] interface vlan-interface 10

[CE1-Vlan-interface10] ip address 100.1.1.1 24

[CE1-Vlan-interface10] quit

[CE1] interface fortygige 1/0/1

[CE1-FortyGigE1/0/1] port link-type trunk

[CE1-FortyGigE1/0/1] port trunk permit vlan 10

[CE1-FortyGigE1/0/1] quit

2.

Configure PE 1:
# Configure an LSR ID.

<PE1> system-view

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 192.1.1.1 32

[PE1-LoopBack0] quit

[PE1] mpls lsr-id 192.1.1.1

# Enable L2VPN.

[PE1] l2vpn enable

# Enable global LDP.

[PE1] mpls ldp

[PE1-ldp] quit

# Configure VLAN-interface 23 (the interface connected to ASBR 1), and enable LDP on the

interface.

[PE1] interface vlan-interface 23

[PE1-Vlan-interface23] ip address 23.1.1.1 24

[PE1-Vlan-interface23] mpls enable

[PE1-Vlan-interface23] mpls ldp enable

[PE1-Vlan-interface23] quit

# Configure OSPF for LDP to create LSPs.

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 23.1.1.1 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 192.1.1.1 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] quit

[PE1-ospf-1] quit

# Create VLAN 10 and assign FortyGigE 1/0/1 to the VLAN.

[PE1] vlan 10

[PE1-vlan10] port fortygige 1/0/1

[PE1-vlan10] quit

# Create service instance 1000 on FortyGigE 1/0/1 to match packets that have an outer VLAN
ID of 10.

[PE1] interface fortygige 1/0/1

[PE1-FortyGigE1/0/1] service-instance 1000

[PE1-FortyGigE1/0/1-srv1000] encapsulation s-vid 10

[PE1-FortyGigE1/0/1-srv1000] quit

[PE1-FortyGigE1/0/1] quit

Advertising