Configuring BGP AS number substitution and SoO attribute

Network requirements

CE 1, CE 2, and CE 3 belong to VPN 1, and are connected to PE1, PE 2, and PE 3. CE 1 and CE 2 reside in the same site. CE1, CE2, and CE 3 all use AS number 600.

To avoid route loss, configure BGP AS number substitution on PEs.

To avoid routing loops, configure the same SoO attribute on PE 1 and PE 2 for CE 1 and CE 2.

Figure 99: Network diagram

Table 37: Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

Loop0

100::1/96

CE 3

Loop0

200::1/96

GE2/1/1

10:1::1/96

GE2/1/1

10:3::1/96

CE 2

GE2/1/1

10:2::1/96

PE 2

Loop0

2.2.2.9/32

PE 1

Loop0

1.1.1.9/32

GE2/1/1

10:2::2/96

GE2/1/1

10:1::2/96

GE2/1/2

40.1.1.1/24

GE2/1/2

20.1.1.1/24

GE2/1/3

20.1.1.2/24

GE2/1/3

30.1.1.1/24

P

Loop0

3.3.3.9/32

PE 3

Loop0

4.4.4.9/32

GE2/1/1

30.1.1.2/24

GE2/1/1

10:3::2/96

GE2/1/2

40.1.1.2/24

GE2/1/2

50.1.1.2/24

GE2/1/3

50.1.1.1/24

Configuration procedure

  1. Configure 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 the VPN instance of VPN 1 on PE 3 to allow CE 3 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 MPLS L3VPN configurations, see "Configuring IPv6 MPLS L3VPNs."

  2. Configure BGP AS number substitution:

    # Configure BGP AS number substitution on PE 1, PE 2, and PE 3. For more information about the configuration, see "Configuring BGP AS number substitution."

    # Display routing information on CE 2. The output shows that CE 2 has learned the route 100::/96 from CE 1. A routing loop has occurred because CE 1 and CE 2 reside in the same site.

    <CE2> display bgp routing-table ipv6 peer 10:2::2 received-routes
                                                                                    
     Total number of routes: 2
                                                                                    
     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::2                                  LocPrf    :
         PrefVal : 0                                        OutLabel  : NULL
         MED     :
         Path/Ogn: 100 100?
    * >e Network : 200::                                    PrefixLen : 96
         NextHop : 10:2::2                                  LocPrf    :
         PrefVal : 0                                        OutLabel  : NULL
         MED     :
         Path/Ogn: 100 100?
    
  3. Configure BGP SoO attribute:

    # On PE 1, configure the SoO attribute as 1:100 for CE 1.

    <PE1> system-view
    [PE1] bgp 100
    [PE1-bgp-default] ip vpn-instance vpn1
    [PE1-bgp-default-vpn1] address-family ipv6
    [PE1-bgp-default-ipv6-vpn1] peer 10:1::1 soo 1:100
    

    # On PE 2, configure the SoO attribute as 1:100 for CE 2.

    [PE2] bgp 100
    [PE2-bgp-default] ip vpn-instance vpn1
    [PE2-bgp-default-vpn1] address-family ipv6
    [PE2-bgp-default-ipv6-vpn1] peer 10:2::1 soo 1:100
    

Verifying the configuration

# PE 2 does not advertise routes received from CE 1 to CE 2 because the same SoO attribute has been configured. Display the routing table of CE 2. The output shows that the route 100::/96 has been removed.

<CE2> display ipv6 routing-table
                                                                                
Destinations : 4 Routes : 4
                                                                                
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: 200::/96                                    Protocol  : Static
NextHop    : ::                                          Preference: 60
Interface  : NULL0                                       Cost      : 0