417
[P-ospf-1-area-0.0.0.0] network 192.4.4.4 0.0.0.0
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
4.
Configure PE 2:
# Configure an LSR ID.
<PE2> system-view
[PE2] interface loopback 0
[PE2-LoopBack0] ip address 192.3.3.3 32
[PE2-LoopBack0] quit
[PE2] mpls lsr-id 192.3.3.3
# Enable L2VPN.
[PE2] l2vpn enable
# Enable global LDP.
[PE2] mpls ldp
[PE2-ldp] quit
# Configure GigabitEthernet 1/1/2 (the interface connected to the P device), and enable LDP on
the interface.
[PE2] interface gigabitethernet 1/1/2
[PE2-GigabitEthernet1/1/2] ip address 10.2.2.1 24
[PE2-GigabitEthernet1/1/2] mpls enable
[PE2-GigabitEthernet1/1/2] mpls ldp enable
[PE2-GigabitEthernet1/1/2] quit
# Configure OSPF for LDP to create LSPs.
[PE2] ospf
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 192.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 10.2.2.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Create a cross-connect group named
vpna
, create a cross-connect named
ldp
in the group,
and bind GigabitEthernet 1/1/1 to the cross-connect.
[PE2] xconnect-group vpna
[PE2-xcg-vpna] connection ldp
[PE2-xcg-vpna-ldp] ac interface gigabitethernet 1/1/1
# Create an LDP PW for the cross-connect to bind the AC to the PW.
[PE2-xcg-vpna-ldp] peer 192.2.2.2 pw-id 3
[PE2-xcg-vpna-ldp-192.2.2.2-3] quit
[PE2-xcg-vpna-ldp] quit
[PE2-xcg-vpna] quit
5.
Configure CE 2.
<CE2> system-view
[CE2] interface gigabitethernet 1/1/1
[CE2-GigabitEthernet1/1/1] ip address 100.1.1.2 24
[CE2-GigabitEthernet1/1/1] quit
Verifying the configuration
# Verify that an LDP PW has been established on PE 1.
[PE1] display l2vpn pw