BGP Support for IPv6 (Multiprotocol BGP)

ccnp-routing
How multiprotocol extensions let BGP carry IPv6 and other address families over one TCP session, with IPv4 and IPv6 configuration examples.
Published

Jan 22, 2018

Configuration

image
We want to configure MP-BGP between R5 and R6. First let us convert our old way configuration to the new way.
R5(config)#router bgp 64510
R5(config-router)#address-family ipv4 unicast 
R5(config-router-af)#do show run | s bgp
router bgp 64510
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 64500
 neighbor 2.2.2.2 ebgp-multihop 2
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 4.4.4.4 remote-as 64510
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 6.6.6.6 remote-as 64520
 neighbor 6.6.6.6 ebgp-multihop 2
 neighbor 6.6.6.6 update-source Loopback0
 !
 address-family ipv4
  network 45.45.45.0 mask 255.255.255.0
  neighbor 2.2.2.2 activate
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 next-hop-self
  neighbor 6.6.6.6 activate
 exit-address-family

We see we have got 2 sections:

  • our underlying BGP configuration (neighbors) - TCP connection

  • Address-family, we have the specific configuration. Our policies, prefix-lists, route-maps, what we are advertising in, and… Let us convert R6’s BGP configuration now:

    R6(config)#router bgp 64520
    R6(config-router)#address-family ipv4 unicast 
    R6(config-router-af)#do show run | s bgp
    router bgp 64520
     bgp log-neighbor-changes
     neighbor 3.3.3.3 remote-as 64500
     neighbor 3.3.3.3 ebgp-multihop 2
     neighbor 3.3.3.3 update-source Loopback0
     neighbor 5.5.5.5 remote-as 64510
     neighbor 5.5.5.5 ebgp-multihop 2
     neighbor 5.5.5.5 update-source Loopback0
     !
     address-family ipv4
      redistribute connected route-map RDtoBGP
      neighbor 3.3.3.3 activate
      neighbor 3.3.3.3 route-map RmASPATH in
      neighbor 5.5.5.5 activate
     exit-address-family
    

    To verify here so far because we configured IPv4 unicast, we can use traditional BGP commands like:

    R6#show ip bgp BGP table version is 5, local router ID is 6.6.6.6 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • 12.12.12.0/24 3.3.3.3 0 64500 64500 64500 64500 i *> 5.5.5.5 0 64510 64500 i

  • 13.13.13.0/24 5.5.5.5 0 64510 64500 i > 3.3.3.3 0 0 64500 i > 45.45.45.0/24 5.5.5.5 0 0 64510 i *> 160.160.160.0/24 0.0.0.0 0 32768 ?

    But we cannot verify for other protocols using show ip bgp ..., instead we use show bgp <protocol> for example:

    R6#show bgp ipv4 unicast BGP table version is 5, local router ID is 6.6.6.6 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found

    Network Next Hop Metric LocPrf Weight Path

  • 12.12.12.0/24 3.3.3.3 0 64500 64500 64500 64500 i *> 5.5.5.5 0 64510 64500 i

  • 13.13.13.0/24 5.5.5.5 0 64510 64500 i > 3.3.3.3 0 0 64500 i > 45.45.45.0/24 5.5.5.5 0 0 64510 i *> 160.160.160.0/24 0.0.0.0 0 32768 ?

    IPv6 routing over an IPv4 BGP Session

R5 configuration
R5(config)#ipv6 unicast-routing
R5(config)#route-map IPV6-NEXT-HOP
R5(config-route-map)#set ipv6 next-hop 2056::5
R5(config)#router bgp 64510
R5(config-router)#address-family ipv6 
R5(config-router-af)#network 2045::/64       
R5(config-router-af)#neighbor 6.6.6.6 activate
R5(config-router-af)#neighbor 6.6.6.6 route-map IPV6-NEXT-HOP out
R5(config-router-af)#exit
R6 configuration:
R6(config)#route-map IPv6-NEXT-HOP permit
R6(config-route-map)#set ipv6 next-hop 2056::6   
R6(config)#router bgp 64520
R6(config-router)#address-family ipv6
R6(config-router-af)#network 2006::/64
R6(config-router-af)#neighbor 5.5.5.5 activate 
R6(config-router-af)#neighbor 5.5.5.5 route-map IPv6-NEXT-HOP out
R6(config-router-af)#do clear bgp all 64510 soft                 
Verification
R5#show bgp ipv6 unicast 
BGP table version is 8, local router ID is 5.5.5.5
     Network          Next Hop            Metric LocPrf Weight Path
 *>  2006::/64        2056::6                  0             0 64520 i
 *>  2045::/64        ::                       0         32768 i
Back to top