H3C Technologies H3C S6800 Series Switches User Manual

Page 368

Advertising
background image

355

<PE2> system-view

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 2.2.2.2 32

[PE2-LoopBack0] quit

[PE2] mpls lsr-id 2.2.2.2

# Enable global MPLS LDP.

[PE2] mpls ldp

[PE2-ldp] quit

# Configure VLAN interface 12 (the interface connected to PE 1), and enable LDP on it.

[PE2] interface vlan-interface 12

[PE2-Vlan-interface12] ip address 12.1.1.2 24

[PE2-Vlan-interface12] mpls enable

[PE2-Vlan-interface12] mpls ldp enable

[PE2-Vlan-interface12] quit

# Configure OSPF for LDP to create LSPs.

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 12.1.1.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

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

[PE2-ospf-1] quit

# Enable L2VPN.

[PE2] l2vpn enable

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

[PE2] interface fortygige1/0/1

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

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

[PE2-FortyGigE1/0/1] service-instance 10

[PE2-FortyGigE1/0/1-srv10] encapsulation s-vid 10

[PE2-FortyGigE1/0/1-srv10] quit

[PE2-FortyGigE1/0/1] quit

# Create a cross-connect group named vpna, create a cross-connect named ldp in the group, and

bind service instance 10 on FortyGigE 1/0/1 to the cross-connect.

[PE2] xconnect-group vpna

[PE2-xcg-vpna] connection ldp

[PE2-xcg-vpna-ldp] ac interface fortygige 1/0/1 service-instance 10

# Create an LDP PW for the cross-connect to bind the AC to the PW.

[PE2-xcg-vpna-ldp] peer 1.1.1.1 pw-id 20

[PE2-xcg-vpna-ldp-1.1.1.1-20] quit

[PE2-xcg-vpna-ldp] quit

[PE2-xcg-vpna] quit

4.

Configure PE 3:
# Configure an LSR ID.

<PE3> system-view

[PE3] interface loopback 0

[PE3-LoopBack0] ip address 3.3.3.3 32

Advertising