beautypg.com

H3C Technologies H3C S12500-X Series Switches User Manual

Page 280

background image

269

[PE2-xcg-vpna] quit

4.

Configure PE 3:
# Configure an LSR ID.

system-view

[PE3] interface loopback 0

[PE3-LoopBack0] ip address 3.3.3.3 32

[PE3-LoopBack0] quit

[PE3] mpls lsr-id 3.3.3.3

# Enable global MPLS LDP.

[PE3] mpls ldp

[PE3-ldp] quit

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

[PE3] interface vlan-interface 13

[PE3-Vlan-interface13] ip address 13.1.1.3 24

[PE3-Vlan-interface13] mpls enable

[PE3-Vlan-interface13] mpls ldp enable

[PE3-Vlan-interface13] quit

# Configure OSPF on PE 3 for LDP to create LSPs.

[PE3] ospf

[PE3-ospf-1] area 0

[PE3-ospf-1-area-0.0.0.0] network 13.1.1.0 0.0.0.255

[PE3-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

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

[PE3-ospf-1] quit

# Enable L2VPN.

[PE3] l2vpn enable

# Create service instance 10 on Ten-GigabitEthernet 1/0/1 to match all packets.

[PE3] interface ten-gigabitethernet1/0/1

[PE3-Ten-GigabitEthernet1/0/1] service-instance 10

[PE3-Ten-GigabitEthernet1/0/1-srv10] encapsulation default

[PE3-Ten-GigabitEthernet1/0/1-srv10] quit

[PE3-Ten-GigabitEthernet1/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 Ten-GigabitEthernet 1/0/1 to the cross-connect.

[PE3] xconnect-group vpna

[PE3-xcg-vpna] connection ldp

[PE3-xcg-vpna-ldp] ac interface ten-gigabitethernet 1/0/1 service-instance 10

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

[PE3-xcg-vpna-ldp] peer 1.1.1.1 pw-id 30

[PE3-xcg-vpna-ldp-1.1.1.1-30] quit

[PE3-xcg-vpna-ldp] quit

[PE3-xcg-vpna] quit

5.

Configure CE 2:

system-view

[CE2] interface vlan-interface 10