BGP EVPN / VXLAN Fabric — Cisco NX-OS (Spine-Leaf)
Generate a complete VXLAN BGP EVPN spine-leaf fabric configuration for Cisco NX-OS (Nexus 9000). Supports iBGP with Route-Reflector spines, symmetric IRB, distributed anycast gateway, vPC with Fabric Peering, and Multi-Site Border Gateway.
What is it?
BGP EVPN (RFC 7432) over VXLAN (RFC 7348) is the modern standard for data center fabric overlays. VXLAN encapsulates L2 frames in UDP (port 4789) with a 24-bit VNI (16M segments vs 4K VLANs), while BGP EVPN provides the control plane: distributing MAC/IP reachability (Type-2 routes), BUM handling via ingress replication (Type-3), external prefixes (Type-5), and multi-homing (Type-1/4). In NX-OS, this runs as a spine-leaf CLOS fabric where spines act as MP-iBGP route reflectors and leaves are VTEPs performing symmetric IRB — both ingress and egress VTEPs route via a per-VRF L3 VNI, so no traffic hairpinning occurs. The distributed anycast gateway eliminates FHRP (HSRP/VRRP) entirely: every leaf simultaneously acts as the default gateway with the same IP and MAC address, enabling VM mobility without ARP re-learning.
When to use
- ·Building or modernizing a data center with more than 10 leaf switches
- ·Multi-tenant environments (private cloud, managed hosting) requiring traffic isolation per tenant
- ·Workloads requiring VM mobility across racks without STP domain extensions
- ·Environments needing more than 4094 broadcast domains (VXLAN supports 16 million VNIs)
- ·Replacing legacy 3-tier hierarchical architectures with a scalable spine-leaf CLOS fabric
When NOT to use
- ·Small DC environments with fewer than 10 switches — the operational overhead of BGP EVPN is not justified
- ·Brownfield environments with applications tightly coupled to STP-based flat L2 domains that cannot be segmented
- ·Teams without BGP and VXLAN expertise — misconfiguration of RD/RT or L3 VNI causes silent routing failures
- ·Environments where the network hardware does not support VXLAN hardware offload (software VXLAN kills performance)
How it compares
Prerequisites
- →Cisco Nexus 9000 platform (9300-EX/FX/GX for leaf, 9500/9300 for spine)
- →NX-OS 7.0(3)I1 or later (NX-OS 9.x recommended for vPC Fabric Peering and Multisite)
- →MTU 9216 on ALL fabric links — VXLAN adds 50 bytes overhead (14 Eth + 20 IP + 8 UDP + 8 VXLAN header)
- →Loopback IPs (Loopback0 for router-ID, Loopback1 for VTEP source) planned before deployment — must be unique per node
- →Anycast gateway MAC planned — must be IDENTICAL across all VTEPs in the fabric
- →BGP AS number decided — iBGP design uses same ASN on all nodes; eBGP design assigns unique ASN per leaf
- →VNI numbering scheme planned — recommend: L2 VNI = 10000+VLAN, L3 VNI = 50000+VRF-index
Config Generator
Determines which config sections are generated. Spine = Route Reflector. Border-Gateway = Multi-Site DCI.
Router-ID — unique per node, used for BGP and OSPF/IS-IS
VTEP NVE source — unique per node. For vPC: this is the Primary IP (PIP). Secondary anycast IP configured separately.
vPC shared anycast VTEP IP — same on both vPC peers. Leave empty for standalone leaf or spine.
iBGP AS — same across all fabric nodes for iBGP design. For eBGP underlay: each leaf gets unique ASN.
iBGP with Route-Reflector on spines (recommended) or eBGP between leafs and spines
IGP for underlay reachability. OSPF is simplest. IS-IS preferred for large fabrics or dual-stack IPv6.
Must be IDENTICAL on all VTEPs in the fabric. This is the shared MAC for the distributed anycast gateway.
Must match on both vPC peers
Port-channel number for vPC peer-link
vPC keepalive destination IP (management interface of the peer)
vPC keepalive source IP (local management interface)
Uses VXLAN tunnel as peer-link. Requires dedicated loopback for VPL. No physical peer-link cable needed.
Loopback for virtual peer-link (vPC Fabric Peering only)
DCI uplink interface for multi-site tracking
Remote site Border Gateway loopback IP for EVPN peering
Verification commands
show nve peersVTEP peer state and BUM replication list
ExpectedState column shows Up for all fabric peers. Down peers indicate an underlay reachability or NVE config issue.
show nve vniVNI membership in NVE interface
ExpectedState = Up for all L2 and L3 VNIs. Mode = CP (control-plane/BGP). S-ARP flag confirms suppress-arp is active.
show bgp l2vpn evpn summaryBGP EVPN session state to all spines/RRs
ExpectedState/PfxRcd column shows a number (received prefixes), not Idle/Active/Connect.
show bgp l2vpn evpnFull EVPN table — all route types
ExpectedShould see Type-2 (MAC/IP), Type-3 (IMET/BUM), Type-5 (IP prefix) routes from all VTEPs.
show bgp l2vpn evpn vni-id 10010EVPN routes for a specific L2 VNI
ExpectedShows MAC/IP routes (Type-2) and BUM routes (Type-3) for that VNI from all VTEPs.
show l2route evpn mac allL2 MAC table populated by EVPN control plane
ExpectedRemote MACs should show VXLAN as the next-hop with the remote VTEP IP.
show l2route evpn mac-ip allMAC+IP host routes from Type-2 EVPN routes
ExpectedHost /32 routes for all remote VMs. Used for ARP suppression proxy.
show ip route vrf TENANT-APer-VRF routing table verification
ExpectedShould show remote subnets via VXLAN next-hop. EVPN Type-5 routes appear as /24 or larger prefixes.
Debug commands
show nve vni ingress-replication 10010BUM replication list for specific VNI
WarningShould list all remote VTEPs that participate in this VNI. Empty list = no EVPN Type-3 routes received.
show bgp l2vpn evpn neighbors 10.0.0.100 advertised-routesWhat we advertise to the Route Reflector
WarningUse to verify local Type-2 (MAC/IP) and Type-3 routes are being sent to spines.
show bgp l2vpn evpn route-type 2 0 5001.0000.1b08Find specific MAC address in EVPN table
WarningReplace MAC with target host MAC. Shows which VTEP is advertising it and with which VNI.
debug bgp l2vpn evpn inLive EVPN update debugging
WarningUse with caution in production — heavy output. Always run undebug all after troubleshooting.
Common mistakes & fixes
Further learning
Recommended books to go deeper on this topic.
Building Data Centers with VXLAN BGP EVPN
Lukas Krattiger, Shyam Kapadia, David Jansen · Cisco Press · Clos fabric design with VXLAN EVPN: route types, symmetric IRB, multihoming, multi-site
BGP Design and Implementation
Randy Zhang & Micah Bartell · Cisco Press · BGP fundamentals needed before EVPN — attributes, route reflection, policy
NX-OS and Cisco Nexus Switching: Next-Generation Data Center Architectures
Ron Fuller, David Jansen, Matthew McPherson · Cisco Press · VXLAN BGP EVPN on NX-OS — overlay design and configuration