H3C Technologies H3C S12500-X Series Switches User Manual
Page 279
268
[PE1-xcg-vpna-ldp-2.2.2.2-20] backup-peer 3.3.3.3 pw-id 30
[PE1-xcg-vpna-ldp-3.3.3.3-30-backup] quit
[PE1-xcg-vpna-ldp-2.2.2.2-20] quit
[PE1-xcg-vpna-ldp] quit
[PE1-xcg-vpna] quit
[PE1] quit
3.
Configure PE 2:
# Configure LSR ID.
[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 on PE 2 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 Ten-GigabitEthernet 1/0/1 to match all packets.
[PE2] interface ten-gigabitethernet1/0/1
[PE2-Ten-GigabitEthernet1/0/1] service-instance 10
[PE2-Ten-GigabitEthernet1/0/1-srv10] encapsulation default
[PE2-Ten-GigabitEthernet1/0/1-srv10] quit
[PE2-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.
[PE2] xconnect-group vpna
[PE2-xcg-vpna] connection ldp
[PE2-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.
[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