{"id":192,"date":"2023-11-29T22:58:13","date_gmt":"2023-11-29T21:58:13","guid":{"rendered":"https:\/\/mokrane-assam.com\/?p=192"},"modified":"2026-11-29T23:03:22","modified_gmt":"2026-11-29T22:03:22","slug":"mp-bgp-basics-address-families-vpnv4-and-evpn","status":"publish","type":"post","link":"https:\/\/mokrane-assam.com\/index.php\/2023\/11\/29\/mp-bgp-basics-address-families-vpnv4-and-evpn\/","title":{"rendered":"MP-BGP Basics: Address Families, VPNv4, and EVPN"},"content":{"rendered":"<p class=\"wp-block-paragraph\">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 <em>everything else<\/em> \u2014 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.<\/p><h2 class=\"wp-block-heading\">1. Why BGP needed a multiprotocol extension<\/h2><p class=\"wp-block-paragraph\">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, <strong>MP-BGP<\/strong> (RFC 4760) added <strong>Multiprotocol Extensions<\/strong> \u2014 a way to carry any address family inside BGP without touching the base message format.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 210\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Why BGP needed MP-BGP\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"210\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Why BGP needed MP-BGP<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"60\" y=\"90\" width=\"360\" height=\"90\" rx=\"10\" fill=\"#fff\" stroke=\"#cbd5e1\"\/><text x=\"240\" y=\"118\" text-anchor=\"middle\" fill=\"#9f1239\" font-size=\"13\" font-weight=\"700\">BGP-4 (original)<\/text><text x=\"240\" y=\"142\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">IPv4 unicast only<\/text><text x=\"240\" y=\"162\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">NLRI and next-hop are IPv4 fields<\/text><rect x=\"500\" y=\"90\" width=\"360\" height=\"90\" rx=\"10\" fill=\"#ecfdf5\" stroke=\"#166534\"\/><text x=\"680\" y=\"118\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"13\" font-weight=\"700\">MP-BGP (RFC 4760)<\/text><text x=\"680\" y=\"142\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">any address family on one session<\/text><text x=\"680\" y=\"162\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">IPv6, VPNv4, multicast, EVPN&#8230;<\/text><line x1=\"420\" y1=\"135\" x2=\"500\" y2=\"135\" stroke=\"#0A66C2\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><\/svg><\/figure><h2 class=\"wp-block-heading\">2. Address families \u2014 AFI and SAFI<\/h2><p class=\"wp-block-paragraph\">The whole mechanism rests on labelling each route with <strong>what kind<\/strong> of route it is. An <strong>AFI<\/strong> (Address Family Identifier) names the protocol family \u2014 1 for IPv4, 2 for IPv6, 25 for L2VPN \u2014 and a <strong>SAFI<\/strong> (Subsequent AFI) refines it \u2014 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.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 230\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"AFI \/ SAFI\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"230\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">AFI \/ SAFI<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"30\" y=\"80\" width=\"860\" height=\"30\" rx=\"6\" fill=\"#0f172a\"\/><text x=\"170\" y=\"100\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"11\" font-weight=\"700\">AFI<\/text><text x=\"430\" y=\"100\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"11\" font-weight=\"700\">SAFI<\/text><text x=\"700\" y=\"100\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"11\" font-weight=\"700\">Address family<\/text><rect x=\"30\" y=\"110\" width=\"860\" height=\"30\" fill=\"#ffffff\" stroke=\"#e2e8f0\"\/><text x=\"170\" y=\"130\" text-anchor=\"middle\" fill=\"#C8102E\" font-size=\"11\" font-weight=\"600\">1 (IPv4)<\/text><text x=\"430\" y=\"130\" text-anchor=\"middle\" fill=\"#0A66C2\" font-size=\"11\" font-weight=\"600\">1 (unicast)<\/text><text x=\"700\" y=\"130\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">IPv4 unicast \u2014 the classic internet table<\/text><rect x=\"30\" y=\"140\" width=\"860\" height=\"30\" fill=\"#f1f5f9\" stroke=\"#e2e8f0\"\/><text x=\"170\" y=\"160\" text-anchor=\"middle\" fill=\"#C8102E\" font-size=\"11\" font-weight=\"600\">2 (IPv6)<\/text><text x=\"430\" y=\"160\" text-anchor=\"middle\" fill=\"#0A66C2\" font-size=\"11\" font-weight=\"600\">1 (unicast)<\/text><text x=\"700\" y=\"160\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">IPv6 unicast<\/text><rect x=\"30\" y=\"170\" width=\"860\" height=\"30\" fill=\"#ffffff\" stroke=\"#e2e8f0\"\/><text x=\"170\" y=\"190\" text-anchor=\"middle\" fill=\"#C8102E\" font-size=\"11\" font-weight=\"600\">1 (IPv4)<\/text><text x=\"430\" y=\"190\" text-anchor=\"middle\" fill=\"#0A66C2\" font-size=\"11\" font-weight=\"600\">128 (MPLS VPN)<\/text><text x=\"700\" y=\"190\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">VPNv4 \u2014 L3VPN customer routes<\/text><rect x=\"30\" y=\"200\" width=\"860\" height=\"30\" fill=\"#f1f5f9\" stroke=\"#e2e8f0\"\/><text x=\"170\" y=\"220\" text-anchor=\"middle\" fill=\"#C8102E\" font-size=\"11\" font-weight=\"600\">25 (L2VPN)<\/text><text x=\"430\" y=\"220\" text-anchor=\"middle\" fill=\"#0A66C2\" font-size=\"11\" font-weight=\"600\">70 (EVPN)<\/text><text x=\"700\" y=\"220\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">EVPN \u2014 MAC\/IP for fabrics<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">3. The two attributes that carry it all<\/h2><p class=\"wp-block-paragraph\">MP-BGP adds exactly <strong>two optional, non-transitive path attributes<\/strong>. <strong>MP_REACH_NLRI<\/strong> advertises reachable prefixes for a given AFI\/SAFI, and crucially carries the <strong>next-hop<\/strong> for that family inside it. <strong>MP_UNREACH_NLRI<\/strong> withdraws them. Being <em>optional non-transitive<\/em> 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.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 210\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"MP_REACH and MP_UNREACH\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"210\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">MP_REACH and MP_UNREACH<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"80\" y=\"90\" width=\"340\" height=\"90\" rx=\"10\" fill=\"#dcfce7\" stroke=\"#166534\"\/><text x=\"250\" y=\"118\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"13\" font-weight=\"700\">MP_REACH_NLRI<\/text><text x=\"250\" y=\"142\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">advertise prefixes for an AFI\/SAFI<\/text><text x=\"250\" y=\"162\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">carries the family next-hop<\/text><rect x=\"500\" y=\"90\" width=\"340\" height=\"90\" rx=\"10\" fill=\"#fef2f2\" stroke=\"#C8102E\"\/><text x=\"670\" y=\"118\" text-anchor=\"middle\" fill=\"#9f1239\" font-size=\"13\" font-weight=\"700\">MP_UNREACH_NLRI<\/text><text x=\"670\" y=\"142\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">withdraw those prefixes<\/text><text x=\"670\" y=\"162\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"11\">optional, non-transitive<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">4. The Route Distinguisher \u2014 making overlaps unique<\/h2><p class=\"wp-block-paragraph\">In an MPLS L3VPN, two customers may both use <code>10.0.0.0\/8<\/code> \u2014 identical prefixes that BGP must keep apart. The <strong>Route Distinguisher (RD)<\/strong> solves this: an 8-byte value prepended to the IPv4 prefix to form a <strong>96-bit VPNv4 route<\/strong> that is globally unique. The RD is purely for uniqueness \u2014 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&#8217;s job.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 200\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Route Distinguisher\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"200\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Route Distinguisher<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"60\" y=\"100\" width=\"200\" height=\"50\" rx=\"10\" fill=\"#fff\" stroke=\"#cbd5e1\"\/><text x=\"160\" y=\"122\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">Customer A<\/text><text x=\"160\" y=\"140\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">10.0.0.0\/8<\/text><rect x=\"60\" y=\"160\" width=\"200\" height=\"40\" rx=\"10\" fill=\"#fff\" stroke=\"#cbd5e1\"\/><text x=\"160\" y=\"185\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10.5\">Customer B: 10.0.0.0\/8<\/text><text x=\"300\" y=\"150\" text-anchor=\"middle\" fill=\"#64748b\" font-size=\"20\">+RD<\/text><line x1=\"270\" y1=\"150\" x2=\"360\" y2=\"150\" stroke=\"#0A66C2\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><rect x=\"380\" y=\"100\" width=\"480\" height=\"50\" rx=\"10\" fill=\"#dcfce7\" stroke=\"#166534\"\/><text x=\"620\" y=\"122\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"12\" font-weight=\"700\">65000:1 : 10.0.0.0\/8 (VPNv4, unique)<\/text><text x=\"620\" y=\"140\" text-anchor=\"middle\" fill=\"#334155\" font-size=\"10\">RD 65000:1 prepended<\/text><rect x=\"380\" y=\"160\" width=\"480\" height=\"40\" rx=\"10\" fill=\"#dcfce7\" stroke=\"#166534\"\/><text x=\"620\" y=\"185\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"11\" font-weight=\"600\">65000:2 : 10.0.0.0\/8 (now distinct)<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">5. The Route Target \u2014 who imports what<\/h2><p class=\"wp-block-paragraph\">If the RD makes routes unique, the <strong>Route Target (RT)<\/strong> decides where they go. An RT is an <strong>extended community<\/strong> attached to a VPNv4 route on export, and each VRF is configured with a list of RTs to <strong>import<\/strong>. A route is pulled into a VRF only if one of its attached export RTs matches that VRF&#8217;s import list. This is the knob that builds VPN topologies \u2014 full mesh, hub-and-spoke, extranet \u2014 all by choosing which RTs each site exports and imports.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 220\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Route Target\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"220\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Route Target<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"60\" y=\"100\" width=\"200\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#0A66C2\"\/><text x=\"160\" y=\"125\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">Site A (VRF)<\/text><text x=\"160\" y=\"144\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10\">export RT 100:1<\/text><rect x=\"660\" y=\"100\" width=\"200\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#0A66C2\"\/><text x=\"760\" y=\"125\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">Site B (VRF)<\/text><text x=\"760\" y=\"144\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10\">import RT 100:1<\/text><line x1=\"260\" y1=\"128\" x2=\"660\" y2=\"128\" stroke=\"#166534\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><text x=\"460\" y=\"118\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"11\">route tagged RT 100:1<\/text><text x=\"460\" y=\"150\" text-anchor=\"middle\" fill=\"#64748b\" font-size=\"11\">B imports 100:1 -> route installed; a site not importing it never sees the route<\/text><text x=\"460\" y=\"190\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"11\">RT is policy; RD is only uniqueness \u2014 do not confuse the two<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">6. MP-BGP as the MPLS L3VPN control plane<\/h2><p class=\"wp-block-paragraph\">Put it together and you have the service that pays for a lot of backbones. Provider-edge (PE) routers run <strong>MP-iBGP<\/strong> between them \u2014 usually through route reflectors \u2014 and advertise <strong>VPNv4<\/strong> routes: RD + customer prefix, tagged with RTs, and carrying an <strong>MPLS label<\/strong>. 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.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 220\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"MPLS L3VPN control plane\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"220\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">MPLS L3VPN control plane<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"60\" y=\"95\" width=\"150\" height=\"50\" rx=\"10\" fill=\"#e0f2fe\" stroke=\"#0A66C2\"\/><text x=\"135\" y=\"124\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">PE 1<\/text><rect x=\"710\" y=\"95\" width=\"150\" height=\"50\" rx=\"10\" fill=\"#e0f2fe\" stroke=\"#0A66C2\"\/><text x=\"785\" y=\"124\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">PE 2<\/text><rect x=\"360\" y=\"95\" width=\"200\" height=\"50\" rx=\"10\" fill=\"#0f172a\"\/><text x=\"460\" y=\"118\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"11\" font-weight=\"700\">MPLS core (P)<\/text><text x=\"460\" y=\"136\" text-anchor=\"middle\" fill=\"#94a3b8\" font-size=\"10\">label switching only<\/text><path d=\"M210 110 Q460 60 710 110\" fill=\"none\" stroke=\"#166534\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><text x=\"460\" y=\"70\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"11\">MP-iBGP: VPNv4 (RD+prefix, RT, label)<\/text><line x1=\"210\" y1=\"125\" x2=\"360\" y2=\"125\" stroke=\"#cbd5e1\" stroke-width=\"2\"\/><line x1=\"560\" y1=\"125\" x2=\"710\" y2=\"125\" stroke=\"#cbd5e1\" stroke-width=\"2\"\/><text x=\"460\" y=\"180\" text-anchor=\"middle\" fill=\"#64748b\" font-size=\"11\">The core carries no customer routes \u2014 only the PEs hold VPNv4 state<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">7. EVPN \u2014 MP-BGP for Layer 2<\/h2><p class=\"wp-block-paragraph\">The newest and most important use is <strong>EVPN<\/strong> (AFI 25, SAFI 70): MP-BGP as the control plane for Layer-2 and data-centre fabrics. Instead of flood-and-learn, switches <strong>advertise MAC and MAC\/IP bindings as BGP routes<\/strong> (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 \u2014 the modern spine-leaf standard, and all of it rides on the same two MP-BGP attributes.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 210\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"EVPN control plane\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"210\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">EVPN control plane<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"80\" y=\"100\" width=\"180\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#0A66C2\"\/><text x=\"170\" y=\"125\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">Leaf 1<\/text><text x=\"170\" y=\"144\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10\">learns MAC X locally<\/text><rect x=\"660\" y=\"100\" width=\"180\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#0A66C2\"\/><text x=\"750\" y=\"125\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">Leaf 2<\/text><text x=\"750\" y=\"144\" text-anchor=\"middle\" fill=\"#475569\" font-size=\"10\">installs MAC X via BGP<\/text><rect x=\"350\" y=\"96\" width=\"220\" height=\"40\" rx=\"10\" fill=\"#0f172a\"\/><text x=\"460\" y=\"121\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"11\" font-weight=\"700\">EVPN Type 2 (MAC\/IP)<\/text><line x1=\"260\" y1=\"118\" x2=\"350\" y2=\"116\" stroke=\"#166534\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><line x1=\"570\" y1=\"116\" x2=\"660\" y2=\"118\" stroke=\"#166534\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><text x=\"460\" y=\"176\" text-anchor=\"middle\" fill=\"#64748b\" font-size=\"11\">MAC reachability advertised as BGP routes \u2014 no flood-and-learn<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">8. Capability negotiation \u2014 opt-in per family<\/h2><p class=\"wp-block-paragraph\">None of this activates by accident. When two routers open a BGP session, each advertises a <strong>Multiprotocol Capability<\/strong> in the OPEN message listing the AFI\/SAFI pairs it supports. An address family is exchanged <strong>only if both peers advertise it<\/strong>. This is why a VPNv4 session that will not come up is so often a one-sided <code>address-family<\/code> configuration \u2014 the capability simply was not offered on both ends, so the family never negotiates.<\/p><figure class=\"mkz-diagram\" style=\"margin:24px auto;max-width:920px\"><svg style=\"width:100%;height:auto;display:block;margin:0 auto\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 920 200\" font-family=\"'Segoe UI',Roboto,Helvetica,Arial,sans-serif\" role=\"img\" aria-label=\"Capability negotiation\"><defs><linearGradient id=\"hg\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#17263f\"\/><stop offset=\"1\" stop-color=\"#0f172a\"\/><\/linearGradient><marker id=\"ar\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0L10 5L0 10z\" fill=\"#0A66C2\"\/><\/marker><\/defs><rect x=\"0\" y=\"0\" width=\"920\" height=\"200\" rx=\"14\" fill=\"#f8fafc\" stroke=\"#e2e8f0\"\/><rect x=\"0\" y=\"0\" width=\"920\" height=\"60\" rx=\"14\" fill=\"url(#hg)\"\/><rect x=\"0\" y=\"40\" width=\"920\" height=\"20\" fill=\"#0f172a\"\/><text x=\"28\" y=\"37\" fill=\"#ffffff\" font-size=\"19\" font-weight=\"700\">Capability negotiation<\/text><text x=\"892\" y=\"37\" text-anchor=\"end\" fill=\"#38bdf8\" font-size=\"13\" font-weight=\"600\" letter-spacing=\"1\">NET BY ME<\/text><rect x=\"100\" y=\"100\" width=\"180\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#0A66C2\"\/><text x=\"190\" y=\"132\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">Router A<\/text><rect x=\"640\" y=\"100\" width=\"180\" height=\"56\" rx=\"10\" fill=\"#fff\" stroke=\"#0A66C2\"\/><text x=\"730\" y=\"132\" text-anchor=\"middle\" fill=\"#0f172a\" font-size=\"12\" font-weight=\"600\">Router B<\/text><line x1=\"280\" y1=\"118\" x2=\"640\" y2=\"118\" stroke=\"#0A66C2\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><text x=\"460\" y=\"110\" text-anchor=\"middle\" fill=\"#0A66C2\" font-size=\"10.5\">OPEN: I support IPv4, VPNv4<\/text><line x1=\"640\" y1=\"140\" x2=\"280\" y2=\"140\" stroke=\"#166534\" stroke-width=\"2\" marker-end=\"url(#ar)\"\/><text x=\"460\" y=\"157\" text-anchor=\"middle\" fill=\"#166534\" font-size=\"10.5\">OPEN: I support IPv4, VPNv4<\/text><text x=\"460\" y=\"188\" text-anchor=\"middle\" fill=\"#64748b\" font-size=\"11\">Both advertise VPNv4 -> it activates; one-sided config -> the family never comes up<\/text><\/svg><\/figure><h2 class=\"wp-block-heading\">Takeaways<\/h2><p class=\"wp-block-paragraph\">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.<\/p>","protected":false},"excerpt":{"rendered":"<p>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 \u2014 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<\/p><\/div>\n<div class=\"blog-btn\"><a href=\"https:\/\/mokrane-assam.com\/index.php\/2023\/11\/29\/mp-bgp-basics-address-families-vpnv4-and-evpn\/\" class=\"home-blog-btn\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-192","post","type-post","status-publish","format-standard","hentry","category-basic"],"_links":{"self":[{"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/posts\/192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":1,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":193,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/posts\/192\/revisions\/193"}],"wp:attachment":[{"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mokrane-assam.com\/index.php\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}