Configuring IPv6 MPLS L3VPN inter-AS option A
Network requirements
CE 1 and CE 2 belong to the same VPN. CE 1 accesses the network through PE 1 in AS 100, and CE 2 accesses the network through PE 2 in AS 200.
Configure IPv6 MPLS L3VPN inter-AS option A, and use the VRF-to-VRF method to manage VPN routes.
Run OSPF on the MPLS backbone of each AS.
Figure 63: Network diagram
Table 18: Interface and IP address assignment
Device | Interface | IP address | Device | Interface | IP address |
---|---|---|---|---|---|
CE 1 | Vlan-int12 | 2001:1::1/96 | CE 2 | Vlan-int12 | 2001:2::1/96 |
PE 1 | Loop0 | 1.1.1.9/32 | PE 2 | Loop0 | 4.4.4.9/32 |
Vlan-int12 | 2001:1::2/96 | Vlan-int12 | 2001:2::2/96 | ||
Vlan-int11 | 172.1.1.2/24 | Vlan-int11 | 162.1.1.2/24 | ||
ASBR-PE 1 | Loop0 | 2.2.2.9/32 | ASBR-PE 2 | Loop0 | 3.3.3.9/32 |
Vlan-int11 | 172.1.1.1/24 | Vlan-int11 | 162.1.1.1/24 | ||
Vlan-int12 | 2002:1::1/96 | Vlan-int12 | 2002:1::2/96 |
Configuration procedure
Configure an IGP on each MPLS backbone to ensure IP connectivity within the backbone:
This example uses OSPF. (Details not shown.)
# Execute the display ospf peer command to verify that each ASBR-PE has established an OSPF adjacency in Full state with the PE in the same AS, and that the PEs and ASBR-PEs in the same AS have learned the routes to the loopback interfaces of each other. Verify that each ASBR-PE and the PE in the same AS can ping each other. (Details not shown.)
Configure basic MPLS and enable MPLS LDP on each MPLS backbone to establish LDP LSPs:
# Configure basic MPLS on PE 1, and enable MPLS LDP for the interface connected to ASBR-PE 1.
<PE1> system-view [PE1] mpls lsr-id 1.1.1.9 [PE1] mpls ldp [PE1-ldp] quit [PE1] interface vlan-interface 11 [PE1-Vlan-interface11] mpls enable [PE1-Vlan-interface11] mpls ldp enable [PE1-Vlan-interface11] quit
# Configure basic MPLS on ASBR-PE 1, and enable MPLS LDP for the interface connected to PE 1.
<ASBR-PE1> system-view [ASBR-PE1] mpls lsr-id 2.2.2.9 [ASBR-PE1] mpls ldp [ASBR-PE1-ldp] quit [ASBR-PE1] interface vlan-interface 11 [ASBR-PE1-Vlan-interface11] mpls enable [ASBR-PE1-Vlan-interface11] mpls ldp enable [ASBR-PE1-Vlan-interface11] quit
# Configure basic MPLS on ASBR-PE 2, and enable MPLS LDP for the interface connected to PE 2.
<ASBR-PE2> system-view [ASBR-PE2] mpls lsr-id 3.3.3.9 [ASBR-PE2] mpls ldp [ASBR-PE2-ldp] quit [ASBR-PE2] interface vlan-interface 11 [ASBR-PE2-Vlan-interface11] mpls enable [ASBR-PE2-Vlan-interface11] mpls ldp enable [ASBR-PE2-Vlan-interface11] quit
# Configure basic MPLS on PE 2, and enable MPLS LDP for the interface connected to ASBR-PE 2.
<PE2> system-view [PE2] mpls lsr-id 4.4.4.9 [PE2] mpls ldp [PE2-ldp] quit [PE2] interface vlan-interface 11 [PE2-Vlan-interface11] mpls enable [PE2-Vlan-interface11] mpls ldp enable [PE2-Vlan-interface11] quit
# Each PE and the ASBR-PE in the same AS can establish an LDP neighbor relationship. Execute the display mpls ldp peer command on the switches to verify that the session status is Operational. (Details not shown.)
Configure a VPN instance on the PEs:
For the same VPN, the route targets for the VPN instance on the PE must match those for the VPN instance of the ASBR-PE in the same AS. This is not required for PEs in different ASs.
# Configure CE 1.
<CE1> system-view [CE1] interface vlan-interface 12 [CE1-Vlan-interface12] ipv6 address 2001:1::1 96 [CE1-Vlan-interface12] quit
# Configure PE 1.
[PE1] ip vpn-instance vpn1 [PE1-vpn-instance-vpn1] route-distinguisher 100:1 [PE1-vpn-instance-vpn1] vpn-target 100:1 both [PE1-vpn-instance-vpn1] quit [PE1] interface vlan-interface 12 [PE1-Vlan-interface12] ip binding vpn-instance vpn1 [PE1-Vlan-interface12] ipv6 address 2001:1::2 96 [PE1-Vlan-interface12] quit
# Configure CE 2.
<CE2> system-view [CE2] interface vlan-interface 12 [CE2-Vlan-interface12] ipv6 address 2001:2::1 96 [CE2-Vlan-interface12] quit
# Configure PE 2.
[PE2] ip vpn-instance vpn1 [PE2-vpn-instance] route-distinguisher 200:2 [PE2-vpn-instance] vpn-target 200:1 both [PE2-vpn-instance] quit [PE2] interface vlan-interface 12 [PE2-Vlan-interface12] ip binding vpn-instance vpn1 [PE2-Vlan-interface12] ipv6 address 2001:2::2 96 [PE2-Vlan-interface12] quit
# On ASBR-PE 1, create a VPN instance and bind the VPN instance to the interface connected to ASBR-PE 2. ASBR-PE 1 considers ASBR-PE 2 to be its attached CE.
[ASBR-PE1] ip vpn-instance vpn1 [ASBR-PE1-vpn-instance-vpn1] route-distinguisher 100:1 [ASBR-PE1-vpn-instance-vpn1] vpn-target 100:1 both [ASBR-PE1-vpn-instance-vpn1] quit [ASBR-PE1] interface vlan-interface 12 [ASBR-PE1-Vlan-interface12] ip binding vpn-instance vpn1 [ASBR-PE1-Vlan-interface12] ipv6 address 2002:1::1 96 [ASBR-PE1-Vlan-interface12] quit
# On ASBR-PE 2, create a VPN instance and bind the VPN instance to the interface connected to ASBR-PE 1. ASBR-PE 2 considers ASBR-PE 1 to be its attached CE.
[ASBR-PE2] ip vpn-instance vpn1 [ASBR-PE2-vpn-vpn-vpn1] route-distinguisher 200:1 [ASBR-PE2-vpn-vpn-vpn1] vpn-target 200:1 both [ASBR-PE2-vpn-vpn-vpn1] quit [ASBR-PE2] interface vlan-interface 12 [ASBR-PE2-Vlan-interface12] ip binding vpn-instance vpn1 [ASBR-PE2-Vlan-interface12] ipv6 address 2002:1::2 96 [ASBR-PE2-Vlan-interface12] quit
# Execute the display ip vpn-instance command to display VPN instance configurations. Verify that each PE can ping its attached CE, and ASBR-PE 1 and ASBR-PE 2 can ping each other. (Details not shown.)
Establish an EBGP peer relationship between PE and CE switches, and redistribute VPN routes into BGP:
# Configure CE 1.
[CE1] bgp 65001 [CE1-bgp] peer 2001:1::2 as-number 100 [CE1-bgp] address-family ipv6 unicast [CE1-bgp-ipv6] peer 2001:1::2 enable [CE1-bgp-ipv6] import-route direct [CE1-bgp-ipv6] quit [CE1-bgp] quit
# Configure PE 1.
[PE1] bgp 100 [PE1-bgp] ip vpn-instance vpn1 [PE1-bgp-vpn1] peer 2001:1::1 as-number 65001 [PE1-bgp-vpn1] address-family ipv6 unicast [PE1-bgp-ipv6-vpn1] peer 2001:1::1 enable [PE1-bgp-ipv6-vpn1] quit [PE1-bgp-vpn1] quit [PE1-bgp] quit
# Configure CE 2.
[CE2] bgp 65002 [CE2-bgp] peer 2001:2::2 as-number 200 [CE2-bgp] address-family ipv6 [CE2-bgp-ipv6] peer 2001:2::2 enable [CE2-bgp-ipv6] import-route direct [CE2-bgp-ipv6] quit [CE2-bgp] quit
# Configure PE 2.
[PE2] bgp 200 [PE2-bgp] ip vpn-instance vpn1 [PE2-bgp-vpn1] peer 2001:2::1 as-number 65002 [PE2-bgp-vpn1] address-family ipv6 unicast [PE2-bgp-ipv6-vpn1] peer 2001:2::1 enable [PE2-bgp-ipv6-vpn1] quit [PE2-bgp-vpn1] quit [PE2-bgp] quit
Establish an IBGP peer relationship between each PE and the ASBR-PE in the same AS, and an EBGP peer relationship between the ASBR-PEs:
# Configure PE 1.
[PE1] bgp 100 [PE1-bgp] peer 2.2.2.9 as-number 100 [PE1-bgp] peer 2.2.2.9 connect-interface loopback 0 [PE1-bgp] address-family vpnv6 [PE1-bgp-vpnv6] peer 2.2.2.9 enable [PE1-bgp-vpnv6] quit [PE1-bgp] quit
# Configure ASBR-PE 1.
[ASBR-PE1] bgp 100 [ASBR-PE1-bgp] ip vpn-instance vpn1 [ASBR-PE1-bgp-vpn1] peer 2002:1::2 as-number 200 [ASBR-PE1-bgp-vpn1] address-family ipv6 unicast [ASBR-PE1-bgp-ipv6-vpn1] peer 2002:1::2 enable [ASBR-PE1-bgp-ipv6-vpn1] quit [ASBR-PE1-bgp-vpn1] quit [ASBR-PE1-bgp] peer 1.1.1.9 as-number 100 [ASBR-PE1-bgp] peer 1.1.1.9 connect-interface loopback 0 [ASBR-PE1-bgp] address-family vpnv6 [ASBR-PE1-bgp-vpnv6] peer 1.1.1.9 enable [ASBR-PE1-bgp-vpnv6] quit [ASBR-PE1-bgp] quit
# Configure ASBR-PE 2.
[ASBR-PE2] bgp 200 [ASBR-PE2-bgp] ip vpn-instance vpn1 [ASBR-PE2-bgp-vpn1] peer 2002:1::1 as-number 100 [ASBR-PE2-bgp-vpn1] address-family ipv6 unicast [ASBR-PE2-bgp-ipv6-vpn1] peer 2002:1::1 enable [ASBR-PE2-bgp-ipv6-vpn1] quit [ASBR-PE2-bgp-vpn1] quit [ASBR-PE2-bgp] peer 4.4.4.9 as-number 200 [ASBR-PE2-bgp] peer 4.4.4.9 connect-interface loopback 0 [ASBR-PE2-bgp] address-family vpnv6 [ASBR-PE2-bgp-vpnv6] peer 4.4.4.9 enable [ASBR-PE2-bgp-vpnv6] quit [ASBR-PE2-bgp] quit
# Configure PE 2.
[PE2] bgp 200 [PE2-bgp] peer 3.3.3.9 as-number 200 [PE2-bgp] peer 3.3.3.9 connect-interface loopback 0 [PE2-bgp] address-family vpnv6 [PE2-bgp-vpnv6] peer 3.3.3.9 enable [PE2-bgp-vpnv6] quit [PE2-bgp] quit
Verifying the configuration
# Verify that the CEs can learn the route to each other and can ping each other. (Details not shown.)