Configuring IP interworking over an LDP PW
Network requirements
CE 1 and PE 1 are connected through Ethernet interfaces. CE 2 and PE 2 are connected through serial interfaces, and they use PPP as the link layer protocol.
Configure an LDP PW between PE 1 and PE 2 and enable interworking on PEs to allow communication between CE 1 and CE 2.
Figure 112: Network diagram
Table 41: Interface and IP address assignment
Device | Interface | IP address | Device | Interface | IP address |
---|---|---|---|---|---|
CE 1 | GE2/1/1 | 100.1.1.1/24 | P | Loop0 | 192.4.4.4/32 |
PE 1 | Loop0 | 192.2.2.2/32 | GE2/1/1 | 10.1.1.2/24 | |
GE2/1/1 | - | GE2/1/2 | 10.2.2.2/24 | ||
GE2/1/2 | 10.1.1.1/24 | PE 2 | Loop0 | 192.3.3.3/32 | |
CE 2 | Ser2/1/0 | 100.1.1.2/24 | Ser2/1/0 | - | |
GE2/1/1 | 10.2.2.1/24 |
Configuration procedure
Configure CE 1.
<CE1> system-view [CE1] interface gigabitethernet 2/1/1 [CE1-GigabitEthernet2/1/1] ip address 100.1.1.1 24 [CE1-GigabitEthernet2/1/1] quit
Configure PE 1:
# Configure an LSR ID.
<PE1> system-view [PE1] interface loopback 0 [PE1-LoopBack0] ip address 192.2.2.2 32 [PE1-LoopBack0] quit [PE1] mpls lsr-id 192.2.2.2
# Enable L2VPN.
[PE1] l2vpn enable
# Enable global LDP.
[PE1] mpls ldp [PE1-ldp] quit
# Configure the default next hop IP address as 100.1.1.1 on GigabitEthernet 2/1/1 (the interface connected to CE 1. This interface does not need an IP address.
[PE1] interface gigabitethernet 2/1/1 [PE1-GigabitEthernet2/1/1] default-nexthop ip 100.1.1.1 [PE1-GigabitEthernet2/1/1] quit
# Configure GigabitEthernet 2/1/2 (the interface connected to the P device), and enable LDP on the interface.
[PE1] interface gigabitethernet 2/1/2 [PE1-GigabitEthernet2/1/2] ip address 10.1.1.1 24 [PE1-GigabitEthernet2/1/2] mpls enable [PE1-GigabitEthernet2/1/2] mpls ldp enable [PE1-GigabitEthernet2/1/2] quit
# Configure OSPF for LDP to create LSPs.
[PE1] ospf [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] network 192.2.2.2 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit
# Create a cross-connect group named vpna, create a cross-connect named ldp in the group, enable interworking for the cross-connect, and bind GigabitEthernet 2/1/1 to the cross-connect.
[PE1] xconnect-group vpna [PE1-xcg-vpna] connection ldp [PE1-xcg-vpna-ldp] interworking ipv4 [PE1-xcg-vpna-ldp] ac interface gigabitethernet 2/1/1
# Create an LDP PW for the cross-connect to bind the AC to the PW.
[PE1-xcg-vpna-ldp] peer 192.3.3.3 pw-id 3 [PE1-xcg-vpna-ldp-192.3.3.3-3] quit [PE1-xcg-vpna-ldp] quit [PE1-xcg-vpna] quit
Configure the P device:
# Configure an LSR ID.
<P> system-view [P] interface loopback 0 [P-LoopBack0] ip address 192.4.4.4 32 [P-LoopBack0] quit [P] mpls lsr-id 192.4.4.4
# Enable global LDP.
[P] mpls ldp [P-ldp] quit
# Configure GigabitEthernet 2/1/1 (the interface connected to PE 1), and enable LDP on the interface.
[P] interface gigabitethernet 2/1/1 [P-GigabitEthernet2/1/1] ip address 10.1.1.2 24 [P-GigabitEthernet2/1/1] mpls enable [P-GigabitEthernet2/1/1] mpls ldp enable [P-GigabitEthernet2/1/1] quit
# Configure GigabitEthernet 2/1/2 (the interface connected to PE 2), and enable LDP on the interface.
[P] interface gigabitethernet 2/1/2 [P-GigabitEthernet2/1/2] ip address 10.2.2.2 24 [P-GigabitEthernet2/1/2] mpls enable [P-GigabitEthernet2/1/2] mpls ldp enable [P-GigabitEthernet2/1/2] quit
# Configure OSPF for LDP to create LSPs.
[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 [P-ospf-1-area-0.0.0.0] quit [P-ospf-1] quit
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 2/1/1 (the interface connected to the P device), and enable LDP on the interface.
[PE2] interface gigabitethernet 2/1/1 [PE2-GigabitEthernet2/1/1] ip address 10.2.2.1 24 [PE2-GigabitEthernet2/1/1] mpls enable [PE2-GigabitEthernet2/1/1] mpls ldp enable [PE2-GigabitEthernet2/1/1] 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
# Configure the IPCP proxy IP address as the IP address of CE 1 on Serial 2/1/0 (the interface connected to CE 2). This interface does not need an IP address.
[PE2] interface serial 2/1/0 [PE2-Serial2/1/0] link-protocol ppp [PE2-Serial2/1/0] ppp ipcp proxy 100.1.1.1 [PE2-Serial2/1/0] quit
# Create a cross-connect group named vpna, create a cross-connect named ldp in the group, enable interworking for the cross-connect, and bind Serial 2/1/0 to the cross-connect.
[PE2] xconnect-group vpna [PE2-xcg-vpna] connection ldp [PE2-xcg-vpna-ldp] interworking ipv4 [PE2-xcg-vpna-ldp] ac interface serial 2/1/0
# 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
Configure CE 2.
<CE2> system-view [CE2] interface serial 2/1/0 [CE2-Serial2/1/0] link-protocol ppp [CE2-Serial2/1/0] ip address 100.1.1.2 24 [CE2-Serial2/1/0] quit
Verifying the configuration
# Verify that an LDP PW 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 Total number of PWs: 1 1 up, 0 blocked, 0 down, 0 defect, 0 idle, 0 duplicate Xconnect-group Name: vpna Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State 192.3.3.3 3 1279/1279 LDP M 1 Up
# Verify that an LDP PW has been established on PE 2.
[PE2] display l2vpn pw Flags: M - main, B - backup, BY - bypass, H - hub link, S - spoke link, N - no split horizon Total number of PWs: 1 1 up, 0 blocked, 0 down, 0 defect, 0 idle, 0 duplicate Xconnect-group Name: vpna Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State 192.2.2.2 3 1279/1279 LDP M 1 Up
# Verify that CE 1 and CE 2 can ping each other. (Details not shown.)