What is MP-BGP, and what are address families?
Show the answer
Say this first
Multiprotocol BGP (RFC 4760) lets one BGP session carry routes for many kinds of network by tagging each with an AFI/SAFI pair: IPv4 unicast, IPv6 unicast, VPNv4 for MPLS L3VPN, L2VPN EVPN for VXLAN fabrics, multicast, flowspec and more. The routes travel in the MP_REACH_NLRI and MP_UNREACH_NLRI attributes, each with its own next hop, and the peers agree on the families they support through capabilities in the OPEN.
Go deeper
Common AFI/SAFI pairs
| Family | AFI | SAFI |
|---|---|---|
| IPv4 unicast | 1 | 1 |
| IPv6 unicast | 2 | 1 |
| IPv4 labeled unicast (BGP-LU) | 1 | 4 |
| VPNv4 | 1 | 128 |
| L2VPN EVPN | 25 | 70 |
IOS config with separate IPv4 and IPv6 sessions
router bgp 64500
no bgp default ipv4-unicast
neighbor 192.0.2.1 remote-as 64496
neighbor 2001:DB8:0:1::1 remote-as 64496
!
address-family ipv4 unicast
network 203.0.113.0 mask 255.255.255.0
neighbor 192.0.2.1 activate
exit-address-family
!
address-family ipv6 unicast
network 2001:DB8:500::/48
neighbor 2001:DB8:0:1::1 activate
exit-address-familyno bgp default ipv4-unicast stops IOS from activating every new neighbor for IPv4 automatically, so each
family is turned on deliberately. Both network statements need an exact matching route, for example static
routes to Null0 (ipv6 route 2001:DB8:500::/48 Null0 for the IPv6 one).
R1# show bgp ipv4 unicast summary | begin Neighbor
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.0.2.1 4 64496 2310 2290 57 0 0 1d04h 3
R1# show bgp ipv6 unicast summary | begin Neighbor
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:DB8:0:1::1 4 64496 2307 2291 12 0 0 1d04h 2They will ask next
One session for both families, or separate IPv4 and IPv6 sessions?
Separate sessions are the norm with ISPs: each family fails and is debugged on its own, and IPv6 routes get an IPv6 next hop naturally. Carrying IPv6 over an IPv4 session works but needs care with the next hop.
What happens when you activate a new address family on a running session?
The capabilities are exchanged only in the OPEN, so most platforms reset the session to renegotiate. Plan it like any other session reset.
Traps
- Forgetting
activateunder the address family and wondering why a session is up with no routes in that family.