411
[PE3-ospf-1] quit
# Enable L2VPN.
[PE3] l2vpn enable
# Create interface VLAN-interface 10 connected to CE 2. This interface does not need an IP
address.
[PE3] interface vlan-interface 10
[PE3-Vlan-interface10] quit
# Create cross-connect group vpna and create a cross-connect named ldp in the
cross-connect group. Bind the cross-connect to interface VLAN-interface 10 and create an LDP
PW in the cross-connect.
[PE3] xconnect-group vpna
[PE3-xcg-vpna] connection ldp
[PE3-xcg-vpna-ldp] ac interface vlan-interface 10
[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.
<CE2> system-view
[CE2] interface vlan-interface 10
[CE2-Vlan-interface10] ip address 100.1.1.2 24
[CE2-Vlan-interface10] quit
Verifying the configuration
# Display L2VPN PW information on PE 1. The output shows that two PWs (one primary and one
backup) have been established.
<PE1> display l2vpn pw
Flags: M - main, B - backup, H - hub link, S - spoke link, N - no split horizon
Total number of PWs: 2, 1 up, 1 blocked, 0 down, 0 defect
Xconnect-group Name: vpna
Peer PW ID In/Out Label Proto Flag Link ID State
2.2.2.2 20 65651/65779 LDP M 1 Up
3.3.3.3 30 65650/65779 LDP B 1 Blocked
# Display L2VPN PW information on PE 2. The output shows that a PW has been established.
[PE2] display l2vpn pw
Flags: M - main, B - backup, H - hub link, S - spoke link, N - no split horizon
Total number of PWs: 1, 1 up, 0 blocked, 0 down, 0 defect
Xconnect-group Name: vpna
Peer PW ID In/Out Label Proto Flag Link ID State
1.1.1.1 20 65779/65651 LDP M 1 Up
# Display L2VPN PW information on PE 3. The output shows that a PW has been established.
[PE3] display l2vpn pw
Flags: M - main, B - backup, H - hub link, S - spoke link, N - no split horizon
Total number of PWs: 1, 1 up, 0 blocked, 0 down, 0 defect
Xconnect-group Name: vpna
Peer PW ID In/Out Label Proto Flag Link ID State