Free tech learning for everyone, from basics to pro

Network ArchitectureNetworking SecurityAdvanced

EVPN-VXLAN explained: VTEPs, VNIs, route types, anycast gateway and symmetric IRB

In short: VXLAN carries Ethernet frames inside UDP packets across a routed network, with a 24-bit VNI identifying each segment. EVPN uses BGP to tell every switch (VTEP) where each MAC and IP address is, replacing flood-and-learn. Distributed anycast gateways put the default gateway on every leaf, and symmetric IRB routes between subnets using a per-tenant L3 VNI.

The two halves

  • VXLAN is the data plane: it wraps the original Ethernet frame in UDP (port 4789) and IP, adding an 8-byte VXLAN header with a VNI (VXLAN network identifier). With 24 bits, there are about 16 million VNIs, compared with 4,094 VLANs. The switches that encapsulate and decapsulate are VTEPs (VXLAN tunnel endpoints), usually the leaves.
  • EVPN is the control plane: an address family of BGP that advertises MAC addresses, IP addresses and VNI membership between VTEPs. Without it, VXLAN would rely on flooding to learn where hosts are.
How EVPN-VXLAN moves a frameHost Aon leaf 1Leaf 1 (VTEP)looks up MAClearned by BGP EVPNVXLAN tunnelUDP 4789 overunderlayLeaf 2 (VTEP)decapsulatesHost Breceives theframe
Figure 1. BGP EVPN tells each leaf where every MAC and IP lives, so traffic goes straight to the right VTEP.

Key EVPN route types

TypeNameWhat it carries
2MAC/IP advertisementA host's MAC (and IP) and which VTEP it is behind
3Inclusive multicastWhich VTEPs are in each VNI, for flooding broadcast and unknown traffic
5IP prefixSubnets and external routes, for example from border leaves
1 and 4Ethernet segment routesMultihoming (ESI-LAG) and designated forwarder election

The underlay only needs to carry VTEP loopbacks. BGP EVPN sessions usually run between leaves and spines (spines as route reflectors or eBGP peers).

ARP suppression

Because each leaf learns IP-to-MAC bindings from type 2 routes, it can answer ARP requests locally instead of flooding them across the fabric, reducing broadcast traffic.

Distributed anycast gateway

Every leaf that has hosts in a subnet hosts the same gateway IP and MAC. A host's first hop is always its own leaf, wherever it is, so routing happens at the edge, there is no FHRP, and virtual machines can move between racks without their gateway changing.

Routing between subnets: symmetric IRB

  • Each tenant (VRF) gets an L3 VNI in addition to the L2 VNIs for its subnets.
  • With symmetric IRB, the ingress leaf routes the packet into the tenant's L3 VNI, sends it across the fabric, and the egress leaf routes it from the L3 VNI into the destination subnet. Leaves only need the subnets they host locally.
  • Asymmetric IRB (route at ingress, bridge at egress) requires every leaf to have every subnet and scales less well.

Multi-tenancy

Each tenant or security zone is a VRF with its own L3 VNI. Tenants are fully separated in the fabric, and traffic between them goes through border leaves and firewalls, where policy is enforced.

Where it is used

EVPN-VXLAN is the standard for modern data centre fabrics (Cisco Nexus, Arista, Juniper, NVIDIA Cumulus, SONiC) and increasingly for campus fabrics and data centre interconnects.

Real-world example: VM moves without IP changes

A company migrating from an old three-tier data centre built an EVPN-VXLAN fabric. Virtual machines could now be moved to any rack, keeping their IP address and default gateway, because the anycast gateway existed on every leaf. Broadcast traffic dropped sharply thanks to ARP suppression, and the old spanning tree problems disappeared with the routed underlay.

Practice

How many bits is a VXLAN VNI and roughly how many segments does it allow?
24 bits, about 16 million segments.
Which EVPN route type advertises host MAC and IP addresses?
Type 2 (MAC/IP advertisement).
What is a distributed anycast gateway?
Every leaf hosts the same gateway IP and MAC for a subnet, so hosts always use their local leaf as gateway.

Key takeaways

  • VXLAN carries Ethernet in UDP; VNIs identify segments; VTEPs encapsulate.
  • BGP EVPN advertises MACs, IPs and VNIs instead of flood-and-learn.
  • Anycast gateways put the default gateway on every leaf.
  • Symmetric IRB with L3 VNIs and VRFs provides scalable multi-tenancy.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: