Multiprotocol BGP (MP-BGP)

How one BGP session carries several route families identified by AFI and SAFI.

AFI and SAFI identify the route family

The Address Family Identifier (AFI) identifies the address family, and the Subsequent Address Family Identifier (SAFI) identifies the kind of routes carried for it. For example, AFI 1 with SAFI 1 is IPv4 unicast, AFI 2 with SAFI 1 is IPv6 unicast, and AFI 25 with SAFI 70 is Layer 2 VPN EVPN.

Peers advertise multiprotocol capabilities in the BGP OPEN exchange. An established BGP session can carry multiple families, but both peers need to advertise support for a family to exchange routes for it bidirectionally. The IP version of the TCP session and the families carried in UPDATE messages can differ.

MP_REACH_NLRI and MP_UNREACH_NLRI

An MP_REACH_NLRI path attribute associates reachable destinations with an AFI, SAFI and next-hop information. MP_UNREACH_NLRI identifies destinations being withdrawn from a family. The address family and subsequent address family determine how the reachability information is encoded.

MP-BGP can carry IPv6 unicast, VPN and EVPN information while sharing the base BGP session and policy mechanisms. A session can stay Established for one family while another carries no routes because it was not negotiated or its policy filters the advertisements.

Try it in a lab

  1. On two MP-BGP-capable lab routers, establish a single BGP session over IPv4. Enable both IPv4 unicast and IPv6 unicast and provide a reachable IPv6 next hop for an advertised IPv6 prefix.
  2. Verify that the session is Established and both unicast families are negotiated. Inspect the IPv6 route in the IPv6 BGP table or identify AFI 2, SAFI 1 and its next hop in an MP_REACH_NLRI update.
  3. Remove IPv6 unicast activation from one peer and let it renegotiate if needed. Verify that IPv4 still exchanges routes after the session is Established and the peer no longer learns the IPv6 prefix through it.

Sources