Configuring an inter-domain multi-segment PW
Network requirements
PE 1 and ASBR 1 belong to AS 100. PE 2 and ASBR 2 belong to AS 200.
Set up an inter-domain multi-segment PW (a method for inter-AS Option B networking) within the backbone to allow communication between CE 1 and CE 2.
Configure the inter-domain multi-segment PW as follows:
Configure LDP PWs between PE 1 and ASBR 1, and between PE 2 and ASBR 2, and configure public tunnels through LDP to carry the PWs.
Configure an LDP PW between ASBR 1 and ASBR 2. Advertise labeled IPv4 routes between ASBR 1 and ASBR 2 through BGP to set up the public tunnel to carry the LDP PW.
Concatenate the two PWs on ASBR 1.
Concatenate the two PWs on ASBR 2.
Figure 116: Network diagram
Table 45: Interface and IP address assignment
Device | Interface | IP address | Device | Interface | IP address |
---|---|---|---|---|---|
CE 1 | GE2/1/1 | 100.1.1.1/24 | ASBR 1 | Loop0 | 192.2.2.2/32 |
PE 1 | Loop0 | 192.1.1.1/32 | GE2/1/2 | 23.1.1.2/24 | |
GE2/1/2 | 23.1.1.1/24 | GE2/1/1 | 26.2.2.2/24 | ||
PE 2 | Loop0 | 192.4.4.4/32 | ASBR 2 | Loop0 | 192.3.3.3/32 |
GE2/1/2 | 22.2.2.1/24 | GE2/1/1 | 26.2.2.3/24 | ||
CE 2 | GE2/1/1 | 100.1.1.2/24 | GE2/1/2 | 22.2.2.3/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.1.1.1 32 [PE1-LoopBack0] quit [PE1] mpls lsr-id 192.1.1.1
# Enable L2VPN.
[PE1] l2vpn enable
# Enable global LDP.
[PE1] mpls ldp [PE1-ldp] quit
# Configure GigabitEthernet 2/1/2 (the interface connected to ASBR 1), and enable LDP on the interface.
[PE1] interface gigabitethernet 2/1/2 [PE1-GigabitEthernet2/1/2] ip address 23.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 23.1.1.1 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] network 192.1.1.1 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit
# Create a cross-connect group named vpn1, create a cross-connect named ldp in the group, and bind GigabitEthernet 2/1/1 to the cross-connect.
[PE1] xconnect-group vpn1 [PE1-xcg-vpn1] connection ldp [PE1-xcg-vpn1-ldp] ac interface gigabitethernet 2/1/1
# Create an LDP PW for the cross-connect to bind the AC to the PW.
[PE1-xcg-vpn1-ldp] peer 192.2.2.2 pw-id 1000 [PE1-xcg-vpn1-ldp-192.2.2.2-1000] quit [PE1-xcg-vpn1-ldp] quit [PE1-xcg-vpn1] quit
Configure ASBR 1:
# Configure an LSR ID.
<ASBR1> system-view [ASBR1] interface loopback 0 [ASBR1-LoopBack0] ip address 192.2.2.2 32 [ASBR1-LoopBack0] quit [ASBR1] mpls lsr-id 192.2.2.2
# Enable L2VPN.
[ASBR1] l2vpn enable
# Enable global LDP.
[ASBR1] mpls ldp [ASBR1-ldp] quit
# Configure GigabitEthernet 2/1/2 (the interface connected to PE 1), and enable LDP on the interface.
[ASBR1] interface gigabitethernet 2/1/2 [ASBR1-GigabitEthernet2/1/2] ip address 23.1.1.2 24 [ASBR1-GigabitEthernet2/1/2] mpls enable [ASBR1-GigabitEthernet2/1/2] mpls ldp enable [ASBR1-GigabitEthernet2/1/2] quit
# Configure GigabitEthernet 2/1/1 (the interface connected to ASBR 2), and enable MPLS on the interface.
[ASBR1] interface gigabitethernet 2/1/1 [ASBR1-GigabitEthernet2/1/1] ip address 26.2.2.2 24 [ASBR1-GigabitEthernet2/1/1] mpls enable [ASBR1-GigabitEthernet2/1/1] quit
# Configure OSPF for LDP to create LSPs.
[ASBR1] ospf [ASBR1-ospf-1] area 0 [ASBR1-ospf-1-area-0.0.0.0] network 23.1.1.2 0.0.0.255 [ASBR1-ospf-1-area-0.0.0.0] network 192.2.2.2 0.0.0.0 [ASBR1-ospf-1-area-0.0.0.0] quit [ASBR1-ospf-1] quit
# Configure BGP to advertise labeled routes on ASBR 1.
[ASBR1] bgp 100 [ASBR1-bgp-default] peer 26.2.2.3 as-number 200 [ASBR1-bgp-default] address-family ipv4 unicast [ASBR1-bgp-default-ipv4] import-route direct [ASBR1-bgp-default-ipv4] peer 26.2.2.3 enable [ASBR1-bgp-default-ipv4] peer 26.2.2.3 route-policy policy1 export [ASBR1-bgp-default-ipv4] peer 26.2.2.3 label-route-capability [ASBR1-bgp-default-ipv4] quit [ASBR1-bgp-default] quit [ASBR1] route-policy policy1 permit node 1 [ASBR1-route-policy-policy1-1] apply mpls-label [ASBR1-route-policy-policy1-1] quit
# Create a cross-connect group named vpn1, create a cross-connect named ldp in the group, and create two LDP PWs for the cross-connect to form a multi-segment PW.
[ASBR1] xconnect-group vpn1 [ASBR1-xcg-vpn1] connection ldp [ASBR1-xcg-vpn1-ldp] peer 192.1.1.1 pw-id 1000 [ASBR1-xcg-vpn1-ldp-192.1.1.1-1000] quit [ASBR1-xcg-vpn1-ldp] peer 192.3.3.3 pw-id 1000 [ASBR1-xcg-vpn1-ldp-192.3.3.3-1000] quit [ASBR1-xcg-vpn1-ldp] quit [ASBR1-xcg-vpn1] quit
Configure ASBR 2:
# Configure an LSR ID.
<ASBR2> system-view [ASBR2] interface loopback 0 [ASBR2-LoopBack0] ip address 192.3.3.3 32 [ASBR2-LoopBack0] quit [ASBR2] mpls lsr-id 192.3.3.3
# Enable L2VPN.
[ASBR2] l2vpn enable
# Enable global LDP.
[ASBR2] mpls ldp [ASBR2-ldp] quit
# Configure GigabitEthernet 2/1/2 (the interface connected to PE 2), and enable LDP on the interface.
[ASBR2] interface gigabitethernet 2/1/2 [ASBR2-GigabitEthernet2/1/2] ip address 22.2.2.3 24 [ASBR2-GigabitEthernet2/1/2] mpls enable [ASBR2-GigabitEthernet2/1/2] mpls ldp enable [ASBR2-GigabitEthernet2/1/2] quit
# Configure GigabitEthernet 2/1/1 (the interface connected to ASBR 1), and enable MPLS on the interface.
[ASBR2] interface gigabitethernet 2/1/1 [ASBR2-GigabitEthernet2/1/1] ip address 26.2.2.3 24 [ASBR2-GigabitEthernet2/1/1] mpls enable [ASBR2-GigabitEthernet2/1/1] quit
# Configure OSPF for LDP to create LSPs.
[ASBR2] ospf [ASBR2-ospf-1] area 0 [ASBR2-ospf-1-area-0.0.0.0] network 22.2.2.3 0.0.0.255 [ASBR2-ospf-1-area-0.0.0.0] network 192.3.3.3 0.0.0.0 [ASBR2-ospf-1-area-0.0.0.0] quit [ASBR2-ospf-1] quit
# Configure BGP to advertise labeled routes on ASBR 2.
[ASBR2] bgp 200 [ASBR2-bgp-default] peer 26.2.2.2 as-number 100 [ASBR2-bgp-default] address-family ipv4 unicast [ASBR2-bgp-default-ipv4] import-route direct [ASBR2-bgp-default-ipv4] peer 26.2.2.2 enable [ASBR2-bgp-default-ipv4] peer 26.2.2.2 route-policy policy1 export [ASBR2-bgp-default-ipv4] peer 26.2.2.2 label-route-capability [ASBR2-bgp-default-ipv4] quit [ASBR2-bgp-default] quit [ASBR2] route-policy policy1 permit node 1 [ASBR2-route-policy-policy1-1] apply mpls-label [ASBR2-route-policy-policy1-1] quit
# Create a cross-connect group named vpn1, create a cross-connect named ldp in the group, and create two LDP PWs for the cross-connect to form a multi-segment PW.
[ASBR2] xconnect-group vpn1 [ASBR2-xcg-vpn1] connection ldp [ASBR2-xcg-vpn1-ldp] peer 192.2.2.2 pw-id 1000 [ASBR2-xcg-vpn1-ldp-192.2.2.2-1000] quit [ASBR2-xcg-vpn1-ldp] peer 192.4.4.4 pw-id 1000 [ASBR2-xcg-vpn1-ldp-192.4.4.4-1000] quit [ASBR2-xcg-vpn1-ldp] quit [ASBR2-xcg-vpn1] quit
Configure PE 2:
# Configure an LSR ID.
<PE2> system-view [PE2] interface loopback 0 [PE2-LoopBack0] ip address 192.4.4.4 32 [PE2-LoopBack0] quit [PE2] mpls lsr-id 192.4.4.4
# Enable L2VPN.
[PE2] l2vpn enable
# Enable global LDP.
[PE2] mpls ldp [PE2-ldp] quit
# Configure GigabitEthernet 2/1/2 (the interface connected to ASBR 2), and enable LDP on the interface.
[PE2] interface gigabitethernet 2/1/2 [PE2-GigabitEthernet2/1/2] ip address 22.2.2.1 24 [PE2-GigabitEthernet2/1/2] mpls enable [PE2-GigabitEthernet2/1/2] mpls ldp enable [PE2-GigabitEthernet2/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.4.4.4 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 22.2.2.1 0.0.0.255 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit
# Create a cross-connect group named vpn1, create a cross-connect named ldp in the group, and bind GigabitEthernet 2/1/1 to the cross-connect.
[PE2] xconnect-group vpn1 [PE2-xcg-vpn1] connection ldp [PE2-xcg-vpn1-ldp] ac interface gigabitethernet 2/1/1
# Create an LDP PW for the cross-connect to bind the AC to the PW.
[PE2-xcg-vpn1-ldp] peer 192.3.3.3 pw-id 1000 [PE2-xcg-vpn1-ldp-192.3.3.3-1000] quit [PE2-xcg-vpn1-ldp] quit [PE2-xcg-vpn1] quit
Configure CE 2.
<CE2> system-view [CE2] interface gigabitethernet 2/1/1 [CE2-GigabitEthernet2/1/1] ip address 100.1.1.2 24 [CE2-GigabitEthernet2/1/1] quit
Verifying the configuration
# Verify that an LDP PW has been created 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: vpn1 Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State 192.2.2.2 1000 1151/1279 LDP M 1 Up
# Verify that two LDP PWs have been created to form a multi-segment PW on ASBR 1.
[ASBR1] display l2vpn pw Flags: M - main, B - backup, BY - bypass, H - hub link, S - spoke link, N - no split horizon Total number of PWs: 2 2 up, 0 blocked, 0 down, 0 defect, 0 idle, 0 duplicate Xconnect-group Name: vpn1 Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State 192.1.1.1 1000 1279/1151 LDP M 0 Up 192.3.3.3 1000 1278/1151 LDP M 1 Up
# Verify that two LDP PWs have been created to form a multi-segment PW on ASBR 2.
[ASBR2] display l2vpn pw Flags: M - main, B - backup, BY - bypass, H - hub link, S - spoke link, N - no split horizon Total number of PWs: 2 2 up, 0 blocked, 0 down, 0 defect, 0 idle, 0 duplicate Xconnect-group Name: vpn1 Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State 192.2.2.2 1000 1151/1278 LDP M 0 Up 192.4.4.4 1000 1150/1279 LDP M 1 Up
# Verify that an LDP PW has been created 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: vpn1 Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State 192.3.3.3 1000 1279/1150 LDP M 1 Up
# Verify that CE 1 and CE 2 can ping each other. (Details not shown.)