Configuring BGP AS number substitution
Network requirements
As shown in Figure 98, CE 1 and CE 2 belong to VPN 1, and are connected to PE 1 and PE 2. The two CEs have the same AS number, 600. Configure BGP AS number substitution on the PEs to avoid route loss.
Figure 98: Network diagram
Table 36: Interface and IP address assignment
Device | Interface | IP address | Device | Interface | IP address |
---|---|---|---|---|---|
CE 1 | GE2/1/1 | 10:1::2/96 | P | Loop0 | 2.2.2.9/32 |
GE2/1/2 | 100::1/96 | GE2/1/1 | 20.1.1.2/24 | ||
PE 1 | Loop0 | 10.1.1.1/32 | GE2/1/2 | 30.1.1.1/24 | |
GE2/1/1 | 10:1::1/96 | PE 2 | Loop0 | 10.1.1.2/32 | |
GE2/1/2 | 20.1.1.1/24 | GE2/1/1 | 10:2::1/96 | ||
CE 2 | GE2/1/1 | 10:2::2/96 | GE2/1/2 | 30.1.1.2/24 | |
GE2/1/2 | 200::1/96 |
Configuration procedure
Configuring basic IPv6 MPLS L3VPN:
Configure OSPF on the MPLS backbone to allow the PEs and P device to learn the routes of the loopback interfaces from each other.
Configure basic MPLS and MPLS LDP on the MPLS backbone to establish LDP LSPs.
Establish an MP-IBGP peer relationship between the PEs to advertise VPN IPv6 routes.
Configure the VPN instance of VPN 1 on PE 1 to allow CE 1 to access the network.
Configure the VPN instance of VPN 1 on PE 2 to allow CE 2 to access the network.
Configure BGP as the PE-CE routing protocol, and redistribute routes of the CEs into the PEs.
For more information about basic IPv6 MPLS L3VPN configurations, see "Configuring IPv6 MPLS L3VPNs."
# Execute the display ipv6 routing-table command on CE 2 to verify that CE 2 has not learned the route to the VPN (100::/96) behind CE 1.
<CE2> display ipv6 routing-table Destinations : 6 Routes : 6 Destination: ::1/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 10:2::/96 Protocol : Direct NextHop : :: Preference: 0 Interface : GE2/1/1 Cost : 0 Destination: 10:2::2/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 200::/96 Protocol : Static NextHop : :: Preference: 60 Interface : NULL0 Cost : 0 Destination: FE80::/10 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0 Cost : 0 Destination: FF00::/8 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0 Cost : 0
# Execute the display ipv6 routing-table command on CE 1 to verify that CE 1 has not learned the route to the VPN behind CE 2. (Details not shown.)
# Execute the display ipv6 routing-table vpn-instance command on the PEs. The output shows the route to the VPN behind the peer CE. This example uses PE 2.
<PE2> display ipv6 routing-table vpn-instance vpn1 Destinations : 7 Routes : 7 Destination: ::1/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 10:2::/96 Protocol : Direct NextHop : :: Preference: 0 Interface : GE2/1/1 Cost : 0 Destination: 10:2::1/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 100::/96 Protocol : BGP4+ NextHop : ::FFFF:10.1.1.1 Preference: 255 Interface : GE2/1/2 Cost : 0 Destination: 200::/96 Protocol : BGP4+ NextHop : 10:2::2 Preference: 255 Interface : GE2/1/1 Cost : 0 Destination: FE80::/10 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0 Cost : 0 Destination: FF00::/8 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0 Cost : 0
# Enable BGP update packet debugging on PE 2. The output shows that PE 2 has advertised the route for 100::/96, and the AS_PATH is 100 600.
<PE2> terminal monitor <PE2> terminal logging level 7 <PE2> debugging bgp update vpn-instance vpn1 10:2::2 ipv6 <PE2> refresh bgp all export ipv6 vpn-instance vpn1 *Jun 13 16:12:52:096 2012 PE2 BGP/7/DEBUG: -MDC=1; BGP_IPV6.vpn1: Send UPDATE to update-group 0 for following destinations: Origin : Incomplete AS path : 100 600 Next hop : ::FFFF:10.1.1.1 100::/96, *Jun 13 16:12:53:024 2012 PE2 BGP/7/DEBUG: -MDC=1; BGP.vpn1: Send UPDATE MSG to peer 10:2::2(IPv6-UNC) NextHop: 10:2::1.
# Execute the display bgp routing-table ipv6 peer received-routes command on CE 2 to verify that CE 2 has not received the route to 100::/96.
<CE2> display bgp routing-table ipv6 peer 10:2::1 received-routes Total number of routes: 0
Configure BGP AS number substitution:
# Configure BGP AS number substitution on PE 1.
<PE1> system-view [PE1] bgp 100 [PE1-bgp-default] ip vpn-instance vpn1 [PE1-bgp-default-vpn1] peer 10:1::2 substitute-as [PE1-bgp-default-vpn1] quit [PE1-bgp-default] quit
# Configure BGP AS number substitution on PE 2.
<PE2> system-view [PE2] bgp 100 [PE2-bgp-default] ip vpn-instance vpn1 [PE2-bgp-default-vpn1] peer 10:2::2 substitute-as [PE2-bgp-default-vpn1] quit [PE2-bgp-default] quit
Verifying the configuration
# The output shows that among the routes advertised by PE 2 to CE 2, the AS_PATH of 100::/96 has changed from 100 600 to 100 100.
*Jun 27 18:07:34:420 2013 PE2 BGP/7/DEBUG: -MDC=1; BGP_IPV6.vpn1: Send UPDATE to peer 10:2::2 for following destinations: Origin : Incomplete AS path : 100 100 Next hop : 10:2::1 100::/96,
# Display again the routing information that CE 2 has received, and the routing table. The output shows that CE 2 has learned the route 100::/96.
<CE2> display bgp routing-table ipv6 peer 10:2::1 received-routes Total number of routes: 1 BGP local router ID is 12.1.1.3 Status codes: * - valid, > - best, d - dampened, h - history, s - suppressed, S - stale, i - internal, e - external Origin: i - IGP, e - EGP, ? - incomplete * >e Network : 100:: PrefixLen : 96 NextHop : 10:2::1 LocPrf : PrefVal : 0 OutLabel : NULL MED : Path/Ogn: 100 100? <CE2> display ipv6 routing-table Destinations : 7 Routes : 7 Destination: ::1/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 10:2::/96 Protocol : Direct NextHop : :: Preference: 0 Interface : GE2/1/1 Cost : 0 Destination: 10:2::2/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 100::/96 Protocol : BGP4+ NextHop : 10:2::1 Preference: 255 Interface : GE2/1/1 Cost : 0 Destination: 200::/96 Protocol : Static NextHop : :: Preference: 60 Interface : NULL0 Cost : 0 Destination: FE80::/10 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0 Cost : 0 Destination: FF00::/8 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0 Cost : 0
# Verify that GigabitEthernet 2/1/2 of CE 1 and GigabitEthernet 2/1/2 of CE 2 can ping each other. (Details not shown.)