BGP-4 was born to carry one thing: IPv4 unicast routes across the internet. MP-BGP is the small, elegant extension that let the same protocol carry everything else — IPv6, MPLS VPNs, multicast, and the EVPN control plane that runs modern data-centre fabrics. Understanding MP-BGP is really understanding one idea: address families, and the two attributes that carry them. This walk-through goes from that idea to Route Distinguishers, Route Targets, and EVPN.
1. Why BGP needed a multiprotocol extension
Original BGP-4 hard-coded IPv4 unicast into the UPDATE message: the reachable prefixes (NLRI) and the next-hop were plain IPv4 fields. That worked until the internet needed IPv6, VPNs, and multicast through the same sessions. Rather than invent a new protocol, MP-BGP (RFC 4760) added Multiprotocol Extensions — a way to carry any address family inside BGP without touching the base message format.
2. Address families — AFI and SAFI
The whole mechanism rests on labelling each route with what kind of route it is. An AFI (Address Family Identifier) names the protocol family — 1 for IPv4, 2 for IPv6, 25 for L2VPN — and a SAFI (Subsequent AFI) refines it — 1 unicast, 2 multicast, 128 MPLS VPN, 70 EVPN. A BGP session can run many AFI/SAFI pairs at once, each with its own table, all over a single TCP connection.
3. The two attributes that carry it all
MP-BGP adds exactly two optional, non-transitive path attributes. MP_REACH_NLRI advertises reachable prefixes for a given AFI/SAFI, and crucially carries the next-hop for that family inside it. MP_UNREACH_NLRI withdraws them. Being optional non-transitive matters: a router that does not understand an address family simply ignores the attribute rather than mangling it, which is why MP-BGP deployed smoothly across mixed networks.
4. The Route Distinguisher — making overlaps unique
In an MPLS L3VPN, two customers may both use 10.0.0.0/8 — identical prefixes that BGP must keep apart. The Route Distinguisher (RD) solves this: an 8-byte value prepended to the IPv4 prefix to form a 96-bit VPNv4 route that is globally unique. The RD is purely for uniqueness — it carries no policy. A common mistake is to think the RD controls which VPN a route joins; it does not. That is the Route Target’s job.
5. The Route Target — who imports what
If the RD makes routes unique, the Route Target (RT) decides where they go. An RT is an extended community attached to a VPNv4 route on export, and each VRF is configured with a list of RTs to import. A route is pulled into a VRF only if one of its attached export RTs matches that VRF’s import list. This is the knob that builds VPN topologies — full mesh, hub-and-spoke, extranet — all by choosing which RTs each site exports and imports.
6. MP-BGP as the MPLS L3VPN control plane
Put it together and you have the service that pays for a lot of backbones. Provider-edge (PE) routers run MP-iBGP between them — usually through route reflectors — and advertise VPNv4 routes: RD + customer prefix, tagged with RTs, and carrying an MPLS label. The core (P routers) never sees customer routes at all; it only switches labels. Customer isolation, overlapping addresses, and scale all fall out of this one design.
7. EVPN — MP-BGP for Layer 2
The newest and most important use is EVPN (AFI 25, SAFI 70): MP-BGP as the control plane for Layer-2 and data-centre fabrics. Instead of flood-and-learn, switches advertise MAC and MAC/IP bindings as BGP routes (EVPN Type 2), so the fabric learns reachability through routing, not flooding. Paired with a VXLAN data plane, EVPN gives multi-tenant, loop-free, actively-multipathed Layer-2 at scale — the modern spine-leaf standard, and all of it rides on the same two MP-BGP attributes.
8. Capability negotiation — opt-in per family
None of this activates by accident. When two routers open a BGP session, each advertises a Multiprotocol Capability in the OPEN message listing the AFI/SAFI pairs it supports. An address family is exchanged only if both peers advertise it. This is why a VPNv4 session that will not come up is so often a one-sided address-family configuration — the capability simply was not offered on both ends, so the family never negotiates.
Takeaways
MP-BGP is one idea executed cleanly: tag every route with an address family, carry it in two optional attributes, and let unaware routers ignore what they cannot parse. On that foundation sit the Route Distinguisher (uniqueness), the Route Target (policy), MPLS L3VPN, and EVPN. Keep RD and RT distinct, remember that families are opt-in per peer, and the densest BGP deployments become readable.