1

I was writing my own BGP speaker, and I am a bit confused by the IPv4 AFI of MP-BGP.

I understand that to exchange IPv6 routing information peers need to agree on it by sending the MP-BGP capability with IPv6 AFI to each other. That makes sense since IPv6 NLRI needs to be carried in the MP_REACH_NLRI path attribute.

But what does the MP-BGP capability with IPv4 Unicast as AFI/SAFI do? From my observation, BGP speakers (I'm using bird) include the MP-BGP capability with IPv4 AFI in OPEN messages, but I don't see any change in behavior when they are sending updates (i.e., the NLRI is not put inside of MP_REACH_NLRI).

In what case should a BGP speaker specify IPv4 AFI in the MP-BGP capability? And is putting IPv4 NLRI in MP_REACH_NLRI even valid?

1 Answer 1

2

Great observation. BGP address families are not just IPv4 and IPv6. Bgp also have families like vpnv4,vpnv6,evpn. BGP uses TCP as an underlying transport however there are protocols like MPLS which requires bgp vpnv4 neighbourship between peers to transfer VRF data or even VXLAN can use BGP/EVPN to distribute the vlans over L3 network. Each BGP family indicate what kind of neighbourship it would be. So eventually you have to do below config.

for cisco devices 
!
router bgp {{AS#}} 
neighbour {{neighbour IP}} {{neighbour AS #}} 
!
address-family ipv4 
neighbour {{neighbour IP}} activate 
! 

In Cisco and other network device if you do not specify the AFI , it will automatically assume that its an IPv4 AFI. Since IPv4 is also an Address family its perfectly valid for putting IPv4 NLRI in MP_REACH_NLRI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.