BGP next hop behavior
- each router is konfigured with single IPv4 and IPv6 BGP peer towards each peer
- IPv4 BGP peer announces IPv6 prefixes
- IPv6 BGP peer announces IPv4 prefixes
- full configs are provided at the end
Cisco IOS-XRv (R1)
- XR 6.1.2 limitation, it doesn’t support announcment of IPv4 prefixes over IPv6 BGP session
RP/0/0/CPU0:R1(config-bgp)#neighbor 2001:DB8:1:2::2
RP/0/0/CPU0:R1(config-bgp-nbr)#remote-as 222
RP/0/0/CPU0:R1(config-bgp-nbr)#address-family ?
ipv6 IPv6 Address Family
link-state Link-state Address Family
RP/0/0/CPU0:R1#show bgp ipv4 unicast summary
% None of the requested address families are configured for instance 'default'(26770)
RP/0/0/CPU0:R1#show bgp ipv6 unicast summary
Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd
10.0.12.2 0 222 191 168 9 0 0 00:16:28 1
10.0.13.3 0 333 174 163 9 0 0 02:33:00 1
RP/0/0/CPU0:R1#show bgp ipv4 unicast
% None of the requested address families are configured for instance 'default'(26770)
RP/0/0/CPU0:R1#show bgp ipv6 unicast
Network Next Hop Metric LocPrf Weight Path
*> 2001:db8:1111::1/128
:: 0 32768 i
*> 2001:db8:2222::1/128
10.0.12.2 0 0 222 i
*> 2001:db8:3333::1/128
10.0.13.3 0 0 333 i
RP/0/0/CPU0:R1#show route bgp
% No matching routes found
RP/0/0/CPU0:R1#show route ipv6 bgp
B 2001:db8:2222::1/128
[20/0] via ::ffff:10.0.12.2 (nexthop in vrf default), 00:16:29
B 2001:db8:3333::1/128
[20/0] via ::ffff:10.0.13.3 (nexthop in vrf default), 02:31:21
XRv Summary
- XRv announces IPv6 prefix with IPv6 next-hop of interface towards IPv4 BGP peer + link-local address
- having IPv6 address configured on the interface towards IPv4 peer is prerequisite for IPv4 BGP session to be established, otherwise XR is not able to perform default next-hop conversion and session will not come UP
Cisco CSRv (R2-CSRv)
R2#show bgp ipv4 unicast summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:DB8:2:3::3 4 333 33 34 2 0 0 00:26:58 1
R2#show bgp ipv6 unicast summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.12.1 4 111 9 11 11 0 0 00:03:58 2
10.0.23.3 4 333 38 40 11 0 0 00:26:59 2
R2#show bgp ipv4 unicast
Network Next Hop Metric LocPrf Weight Path
*> 2.2.2.2/32 0.0.0.0 0 32768 i
* 3.3.3.3/32 32.1.13.184 0 0 333 i
R2#show bgp ipv6 unicast
Network Next Hop Metric LocPrf Weight Path
*> 2001:DB8:1111::1/128
2001:DB8:1:2::1 0 0 111 i
* ::FFFF:10.0.23.3
0 333 111 i
*> 2001:DB8:2222::1/128
:: 0 32768 i
*> 2001:DB8:3333::1/128
2001:DB8:1:2::1 0 111 333 i
* ::FFFF:10.0.23.3
0 0 333 i
R2#show ip route bgp
R2#show ipv6 route bgp
B 2001:DB8:1111::1/128 [20/0]
via FE80::5202:FF:FE05:1, GigabitEthernet1
B 2001:DB8:3333::1/128 [20/0]
via FE80::5202:FF:FE05:1, GigabitEthernet1
Summary CSRv
- CSRv announes IPv4 prefixes with next-hop of 31.1.13.184
- CSRv takes first 32-bit of IPv6 address BGP peer and converts it into IPv4 address
- CSRv announces IPv6 prefixes with IPv4-mapped IPv6 next-hop
hex dec
20 -> 32
01 -> 1
0d -> 13
b8 -> 184
Cisco IOSv (R2-IOSv)
R3#show bgp ipv4 unicast summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:DB8:2:3::2 4 222 12 12 23 0 0 00:05:53 1
R3#show bgp ipv6 unicast summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.13.1 4 111 182 199 42 0 0 02:43:06 2
10.0.23.2 4 222 18 20 42 0 0 00:05:53 2
R3#show bgp ipv4 unicast
Network Next Hop Metric LocPrf Weight Path
* 2.2.2.2/32 32.1.13.184 0 0 222 i
*> 3.3.3.3/32 0.0.0.0 0 32768 i
R3#show bgp ipv6 unicast
Network Next Hop Metric LocPrf Weight Path
* 2001:DB8:1111::1/128
::FFFF:10.0.23.2
0 222 111 i
*> 2001:DB8:1:3::1 0 0 111 i
* 2001:DB8:2222::1/128
::FFFF:10.0.23.2
0 0 222 i
*> 2001:DB8:1:3::1 0 111 222 i
*> 2001:DB8:3333::1/128
:: 0 32768 i
R3#show ip route bgp
R3#show ipv6 route bgp
B 2001:DB8:1111::1/128 [20/0]
via FE80::5202:FF:FE05:2, GigabitEthernet0/0
B 2001:DB8:2222::1/128 [20/0]
via FE80::5202:FF:FE05:2, GigabitEthernet0/0
Summary IOSv
- IOSv behaves the same as CSRv
Full configuration
R1-XRv
!
hostname R1-XRv
interface Loopback0
ipv4 address 1.1.1.1 255.255.255.255
ipv6 address 2001:db8:1111::1/128
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.0.12.1 255.255.255.0
ipv6 address 2001:db8:1:2::1/64
!
interface GigabitEthernet0/0/0/1
ipv4 address 10.0.13.1 255.255.255.0
ipv6 address 2001:db8:1:3::1/64
!
route-policy PASS
pass
end-policy
!
router bgp 111
address-family ipv6 unicast
network 2001:db8:1111::1/128
!
neighbor 10.0.12.2
remote-as 222
address-family ipv6 unicast
route-policy PASS in
route-policy PASS out
!
!
neighbor 10.0.13.3
remote-as 333
address-family ipv6 unicast
route-policy PASS in
route-policy PASS out
!
end
R2-CSRv
!
hostname R2-CSRv
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
ipv6 address 2001:DB8:2222::1/128
!
interface GigabitEthernet1
ip address 10.0.12.2 255.255.255.0
ipv6 address 2001:DB8:1:2::2/64
!
interface GigabitEthernet2
ip address 10.0.23.2 255.255.255.0
ipv6 address 2001:DB8:2:3::2/64
!
router bgp 222
neighbor 10.0.12.1 remote-as 111
neighbor 10.0.23.3 remote-as 333
neighbor 2001:DB8:2:3::3 remote-as 333
!
address-family ipv4
network 2.2.2.2 mask 255.255.255.255
no neighbor 10.0.12.1 activate
no neighbor 10.0.23.3 activate
neighbor 2001:DB8:2:3::3 activate
exit-address-family
!
address-family ipv6
network 2001:DB8:2222::1/128
neighbor 10.0.12.1 activate
neighbor 10.0.23.3 activate
exit-address-family
!
R2-vIOS
!
hostname R2-vIOS
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
ipv6 address 2001:DB8:3333::1/128
!
interface GigabitEthernet0/0
ip address 10.0.13.3 255.255.255.0
ipv6 address 2001:DB8:1:3::3/64
!
interface GigabitEthernet0/1
ip address 10.0.23.3 255.255.255.0
ipv6 address 2001:DB8:2:3::3/64
!
router bgp 333
neighbor 10.0.13.1 remote-as 111
neighbor 10.0.23.2 remote-as 222
neighbor 2001:DB8:2:3::2 remote-as 222
!
address-family ipv4
network 3.3.3.3 mask 255.255.255.255
no neighbor 10.0.13.1 activate
no neighbor 10.0.23.2 activate
neighbor 2001:DB8:2:3::2 activate
exit-address-family
!
address-family ipv6
network 2001:DB8:3333::1/128
neighbor 10.0.13.1 activate
neighbor 10.0.23.2 activate
exit-address-family