428
[P] ospf
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 192.4.4.4 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-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
# Configure GigabitEthernet 1/1/2 (the interface connected to the P device), and enable MPLS
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] quit
# Configure OSPF.
[PE2] ospf
[PE2-ospf-1] area 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] network 192.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Create a cross-connect group named
ccc
, and create a remote CCC connection that has
incoming label 202, outgoing label 102, and next hop 10.2.2.2.
[PE2] xconnect-group ccc
[PE2-xcg-ccc] connection ccc
[PE2-xcg-ccc-ccc] ccc in-label 202 out-label 102 nexthop 10.2.2.2
# Bind GigabitEthernet 1/1/1 to the CCC connection.
[PE2-xcg-ccc-ccc] ac interface gigabitethernet 1/1/1
[PE2-xcg-ccc-ccc] quit
[PE2-xcg-ccc] 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 a remote CCC connection (identified by PW ID/Rmt Site "-" and Proto Static) has been
established on PE 1.
[PE1] display l2vpn pw
Flags: M - main, B - backup, BY - bypass, H - hub link, S - spoke link, N - no split horizon