Virtual Extensible Local Area Network (VXLAN) is a network virtualization tunneling protocol that encapsulates Layer 2 Ethernet frames inside Layer 3 UDP/IP packets. By decoupling logical network segments from physical switch ports and cabling, VXLAN allows endpoints—such as virtual machines, bare-metal servers, and containers—to communicate as if they share the same local Layer 2 broadcast domain, even when separated across racks, pods, or routed IP networks.
Modern cloud platforms, multi-tenant data centers, and container orchestrators rely on VXLAN to overcome the scaling and resiliency limits of legacy switched architectures. Understanding how VXLAN operates from packet headers and control planes down to switch configurations and troubleshooting equips network engineers to build scalable, active-active network fabrics.
Table of Contents
How VXLAN Works: VTEP, VNI, and Overlay Architecture
VXLAN operates by splitting the network into two distinct operational planes and introducing tunnel endpoints that map local traffic into virtualized segments:
- Underlay and Overlay Separation: The underlay is the physical Layer 3 IP network connecting switches and servers using routing protocols such as OSPF, IS-IS, or BGP. Because the underlay routes standard IP packets, it uses Equal-Cost Multi-Path (ECMP) routing to keep all physical links active. The overlay is the virtual Layer 2 network built on top of that IP fabric, giving workloads seamless Layer 2 adjacency independent of physical location.
- VTEP (VXLAN Tunnel Endpoint): A VTEP is the hardware or software entity that originates and terminates VXLAN tunnels. In physical data centers, Top-of-Rack (ToR) leaf switches perform VTEP encapsulation in ASIC hardware at line rate; in virtualized or containerized clusters, hypervisor virtual switches or host kernels act as software VTEPs. Every VTEP maintains two logical interfaces: local bridge interfaces facing attached hosts and a routed IP interface (typically a loopback) facing the underlay.
- VNI (VXLAN Network Identifier): The VNI is a 24-bit segment identifier embedded in every VXLAN packet. Local VLAN IDs on a switch port are mapped to a VNI so traffic stays strictly isolated per virtual network across the shared underlay.
- Step-by-Step Encapsulation and Forwarding Walk:
- Step 1 (Local Ingress): Host A sends a standard Layer 2 Ethernet frame destined for Host B on the same subnet. The frame arrives at the local ingress VTEP switch port.
- Step 2 (VNI Mapping and Encapsulation): The ingress VTEP maps the incoming port and VLAN to its assigned VNI, looks up which remote VTEP hosts the destination MAC address, and wraps the original Ethernet frame inside a VXLAN header, an outer UDP header, and an outer IP header addressed to the remote VTEP IP.
- Step 3 (Underlay Transit): Transit routers in the underlay forward the encapsulated IP/UDP packet toward the destination VTEP IP using standard IP routing and ECMP load balancing, remaining completely unaware of the inner host MAC or IP addresses.
- Step 4 (Decapsulation and Delivery): The egress VTEP receives the UDP packet, validates the 24-bit VNI, strips off the outer Ethernet, IP, UDP, and VXLAN headers, and forwards the original Ethernet frame to Host B.
Separating physical IP transport from virtual Layer 2 connectivity allows workloads to migrate anywhere in a routed fabric without renumbering IP addresses or stretching fragile Layer 2 trunks.
VXLAN vs. Traditional 802.1Q VLAN
While both protocols isolate broadcast domains, traditional IEEE 802.1Q VLANs were engineered for localized switched LANs, whereas VXLAN was built for large-scale routed fabrics. Comparing the two highlights why data centers transition from pure VLAN trunks to VXLAN overlays.
| Criteria | Traditional 802.1Q VLAN | VXLAN |
|---|---|---|
| Segment Identifier Size | 12-bit VLAN ID | 24-bit VXLAN Network Identifier (VNI) |
| Maximum Usable Segments | 4,094 segments | 16,777,216 (~16.7 million) segments |
| Transport Mechanism | Layer 2 Ethernet frame tagging (802.1Q) | Layer 2 over Layer 3 encapsulation (MAC-in-UDP/IP) |
| Loop Prevention & Multipathing | Spanning Tree Protocol (STP) blocks redundant links unless proprietary MLAG is used | Layer 3 ECMP routing keeps all physical links active and forwarding |
| Multi-Tenant Isolation | Global switch VLAN namespace risks ID collisions across tenants | Per-switch local VLAN reuse mapped to globally unique tenant VNIs |
| Core Switch MAC Table Scale | Transit switches must learn every endpoint MAC address in the domain | Core/spine routers only learn VTEP IP routes, hiding host MACs |
| Header Overhead | 4 bytes | 50 bytes (untagged inner over IPv4 underlay) |
| Ideal Deployment Scope | Campus access networks, small offices, single-rack L2 domains | Multi-tenant clouds, Spine-Leaf data centers, cross-pod workload mobility |
Traditional 802.1Q VLANs remain simpler and more bandwidth-efficient for small, localized Layer 2 environments, whereas VXLAN is essential whenever segment scale exceeds 4,094 networks, active-active multipathing is required, or Layer 2 domains must span Layer 3 boundaries.
VXLAN Header Format, Byte Overhead, and MTU Calculation
The 50-byte encapsulation overhead noted in the comparison above comes directly from the outer headers a VTEP prepends to every Ethernet frame. Sizing the physical underlay Maximum Transmission Unit (MTU) accurately around these headers prevents packet fragmentation and blackholed traffic.
Byte-by-Byte Packet Structure
When an ingress VTEP encapsulates an untagged Ethernet frame over an IPv4 underlay, the packet on the wire consists of the following fields from outside in:
- Outer Ethernet Header (14 bytes untagged / 18 bytes with 802.1Q): Contains the underlay source MAC (VTEP interface) and destination MAC (next-hop router), plus EtherType
0x0800for IPv4. The original inner 4-byte Frame Check Sequence (FCS) is stripped prior to encapsulation, and a new outer 4-byte FCS is appended at the tail of the frame. - Outer IP Header (20 bytes for IPv4 / 40 bytes for IPv6): Carries the ingress VTEP IP as the source and the egress VTEP IP (or underlay multicast group) as the destination, with IP Protocol set to
17(UDP) and the Don’t Fragment (DF) bit typically set to1. - Outer UDP Header (8 bytes):
- Source Port (2 bytes): Dynamically computed by the ingress VTEP using a hash of the inner frame’s Layer 2/Layer 3/Layer 4 headers (typically within ephemeral range
49152–65535). Varying this source port gives underlay routers entropy to distribute flows evenly across ECMP paths. - Destination Port (2 bytes): Set to IANA-assigned UDP port
4789(some Linux-based software overlays default to legacy port8472). - UDP Length (2 bytes) & Checksum (2 bytes): Length of the UDP header and encapsulated payload; checksum is typically transmitted as
0x0000over IPv4. - VXLAN Header (8 bytes):
- Flags (1 byte / 8 bits): Formatted as
R R R R I R R R. Bit 4 (theIflag,0x08) must be set to1to indicate a valid VNI; the remaining 7 reserved (R) bits are set to0on transmission. - Reserved (3 bytes / 24 bits): Set to
0on transmission and ignored on receipt. - VXLAN Network Identifier (3 bytes / 24 bits): Identifies the virtual overlay segment.
- Reserved (1 byte / 8 bits): Set to
0. - Inner Ethernet Frame (14-byte header + up to 1,500-byte payload): The original endpoint source/destination MAC addresses, EtherType, and Layer 3 payload (add 4 bytes if an inner 802.1Q VLAN tag is preserved inside the tunnel).
Step-by-Step Underlay MTU Calculation
Because hardware VTEPs do not fragment and reassemble VXLAN packets at line rate, every physical link along the underlay path must accommodate the full encapsulated IP packet size:
- Standard 1,500-Byte Workload over IPv4 Underlay:
$$\text{1,500 (Inner Payload)} + \text{14 (Inner Eth)} + \text{8 (VXLAN)} + \text{8 (UDP)} + \text{20 (Outer IPv4)} = \text{1,550 bytes}$$
If inner 802.1Q tags are preserved, increase the minimum underlay Layer 3 IP MTU to 1,554 bytes. - Standard 1,500-Byte Workload over IPv6 Underlay:
Replace the 20-byte IPv4 header with a 40-byte IPv6 header, requiring a minimum underlay IP MTU of 1,570 bytes (1,574 bytes with inner 802.1Q tagging). - Data Center Jumbo Frame Standard:
If virtual machines or storage nodes transmit 9,000-byte jumbo frames (9,000 + 50 = 9,050 bytes), configure all leaf uplinks and spine transit interfaces to 9,216 bytes (or at least9,100bytes) to guarantee headroom across the fabric.
Configuring jumbo MTU across every underlay router interface before turning up VXLAN tunnels eliminates the single most common cause of silent overlay packet drops.
VXLAN with MP-BGP EVPN in Spine-Leaf Architectures
While the VXLAN header defines how frames are encapsulated on the wire, the base VXLAN specification does not include a control plane for VTEPs to discover one another or learn host MAC addresses. Modern data centers solve this by pairing VXLAN data-plane forwarding with Multi-Protocol BGP Ethernet VPN (MP-BGP EVPN) over a two-tier Spine-Leaf topology.
Moving from Flood-and-Learn to MP-BGP EVPN
Early VXLAN deployments relied on data-plane flood-and-learn: when a VTEP needed to reach an unknown MAC address or forward an ARP broadcast, it flooded the encapsulated frame into an underlay IP multicast group spanning all VTEPs sharing that VNI. That approach required complex Protocol Independent Multicast (PIM) state in the underlay and wasted bandwidth with broadcast traffic.
In a modern Spine-Leaf EVPN-VXLAN fabric, every leaf switch connects to every spine switch via routed Layer 3 point-to-point links, leaves act as hardware VTEPs, and spines serve purely as high-speed IP forwarders and iBGP/eBGP EVPN signaling hubs:
- EVPN Route Type 2 (MAC/IP Advertisement Route): When an endpoint connects or sends a gratuitous ARP/ND packet to a local leaf VTEP, the VTEP advertises the host’s MAC address, IP address, and VNI to all remote VTEPs via BGP. Because remote VTEPs pre-populate their MAC and ARP tables in the control plane, leaves can perform local ARP suppression—answering local host ARP requests directly without flooding broadcasts across the fabric.
- EVPN Route Type 3 (Inclusive Multicast Ethernet Tag – IMET Route): VTEPs exchange Type 3 routes to automatically announce membership in specific VNIs. Using this list, a VTEP handles remaining Broadcast, Unknown Unicast, and Multicast (BUM) frames via ingress replication (head-end unicast copies) without requiring underlay multicast.
- EVPN Route Type 5 (IP Prefix Route): Carries IPv4 and IPv6 subnet prefixes and external routes across virtual routing and forwarding (VRF) instances, enabling external border connectivity and inter-subnet routing.
Distributed Anycast Gateway and IRB Models
To prevent traffic tromboning to centralized core routers when hosts in different subnets communicate, EVPN-VXLAN leaves implement Integrated Routing and Bridging (IRB) with a Distributed Anycast Gateway. Every leaf switch shares the exact same virtual gateway IP and virtual MAC address for a given subnet, so hosts always route at their local Top-of-Rack switch—even immediately after live-migrating to another rack. Inter-subnet routing follows one of two models:
- Asymmetric IRB: The ingress VTEP routes the packet from the source subnet into the destination subnet locally and bridges it over the destination Layer 2 VNI (
Source L2VNI → Destination L2VNI) to the egress VTEP, which merely bridges the frame out the local port. Because the ingress VTEP must hold the destination VLAN/VNI locally, every leaf in the tenant must be provisioned with all tenant VNIs regardless of whether hosts in those subnets are locally attached. - Symmetric IRB: The ingress VTEP routes the packet into a dedicated transit Layer 3 VNI (L3VNI) bound to the tenant VRF, tunnels it across the fabric, and the egress VTEP routes the packet from the L3VNI into the destination Layer 2 VNI (
Source L2VNI → Transit L3VNI → Destination L2VNI). Each leaf only needs the VNIs for subnets physically attached to its ports, making Symmetric IRB the preferred design for large multi-tenant fabrics.
Combining Spine-Leaf ECMP transport, EVPN control-plane MAC/IP learning, and Symmetric IRB delivers deterministic two-hop latency and massive scale without flood-and-learn overhead.
VXLAN vs. Geneve vs. NVGRE: Overlay Protocol Comparison
VXLAN is not the only Layer 3 network virtualization encapsulation protocol. As software-defined networking (SDN) controllers and cloud platforms evolved, engineers also introduced NVGRE and Geneve to address different hardware and metadata requirements.
| Criteria | VXLAN | Geneve | NVGRE |
|---|---|---|---|
| IETF Standard | RFC 7348 | RFC 8926 | RFC 7637 |
| Transport Protocol & Port | UDP (Destination Port 4789) | UDP (Destination Port 6081) | GRE (IP Protocol 47, no UDP header) |
| Tunnel Header Size | Fixed 8 bytes | Variable: 8-byte base + up to 252 bytes of TLV options | Fixed 8-byte GRE header |
| IPv4 Encapsulation Overhead | 50 bytes | 50+ bytes (scales with attached TLV metadata) | 42 bytes |
| Segment Identifier | 24-bit VNI (~16.7M segments) | 24-bit VNI (~16.7M segments) | 24-bit VSID (~16.7M segments) |
| Metadata Extensibility | Rigid (reserved bits only; no variable options) | Highly extensible via Type-Length-Value (TLV) options | Rigid (no variable metadata fields) |
| Underlay ECMP Load Balancing | Native via hashed ephemeral UDP source port | Native via hashed ephemeral UDP source port | Limited; lacks UDP ports, requiring GRE-key-aware routers |
| Primary Ecosystem Adoption | Physical Spine-Leaf switch ASICs (Cisco, Arista, Juniper, Nvidia), Kubernetes CNIs | SDN & cloud overlays (OVN/OpenShift, VMware NSX, Cilium, AWS GWLB) | Legacy Microsoft Hyper-V Network Virtualization |
Choose VXLAN for physical Spine-Leaf switch fabrics and hybrid environments requiring universal merchant-silicon ASIC interoperability; choose Geneve for pure software-defined overlays that embed security identities, telemetry, or service-chaining metadata inside packet headers; and treat NVGRE primarily as a legacy protocol in older Hyper-V deployments.
VXLAN in Kubernetes Networking: Flannel and Cilium CNIs
Beyond physical data center switches, VXLAN is one of the most widely deployed encapsulation modes in Kubernetes Container Network Interface (CNI) plugins, enabling flat pod-to-pod communication across worker nodes without reconfiguring underlying cloud VPCs or physical routers.
- Worker Nodes as Linux Software VTEPs: Kubernetes requires every pod to reach every other pod by its native IP address without Network Address Translation (NAT). To achieve this over arbitrary Layer 3 host networks, CNIs configure the Linux kernel on each worker node as a software VTEP. For historical reasons predating IANA’s port assignment, Linux kernel VXLAN interfaces in Kubernetes CNIs typically default to UDP destination port
8472rather than4789. - Flannel VXLAN Architecture: Flannel allocates a dedicated
/24pod subnet to each node out of the cluster CIDR and records each node’s underlay IP, pod subnet, and virtual VTEP MAC address in the Kubernetes API. On each host, pods connect via virtual Ethernet (veth) pairs to a Linux bridge (cni0) attached to aflannel.1VXLAN device (using VNI1). Theflannelddaemon dynamically updates kernel ARP, forwarding database (FDB), and routing entries so cross-node pod packets are encapsulated byflannel.1and sent directly to the destination worker node’s IP. - Cilium eBPF-Accelerated VXLAN: Cilium eliminates the
cni0Linux bridge andiptablesrule chains by attaching eBPF programs directly to container virtual interfaces and acilium_vxlankernel device. Instead of using the 24-bit VXLAN field solely for tenant segmentation, Cilium encodes the source pod’s numeric security identity directly into the VXLAN header, allowing the receiving node’s eBPF datapath to enforce zero-trust network policies immediately upon decapsulation. - VXLAN Overlay vs. Native BGP Routing Trade-Offs: Running Flannel or Cilium in VXLAN mode makes a cluster completely portable across bare metal and public clouds without consuming cloud VPC route-table quotas or peering BGP with Top-of-Rack switches. However, because of the 50-byte IPv4 encapsulation overhead calculated earlier, the CNI must lower each pod interface MTU (for example, to
1,450 byteson a1,500-bytehost network) and incurs minor CPU overhead compared to native routing or BGP modes.
For Kubernetes clusters spanning multiple subnets or restricted cloud environments where modifying underlay route tables is impractical, VXLAN provides reliable, zero-touch cross-node connectivity.
Step-by-Step VXLAN BGP EVPN Switch Configuration Template
When deploying VXLAN on physical data center switches, the configuration binds the underlay routing protocol, VLAN-to-VNI mappings, Symmetric IRB L3VNI, NVE tunnel interface, and MP-BGP EVPN control plane together. Use the following Cisco NX-OS template to configure a Spine-Leaf fabric using ingress replication.
! =====================================================================
! LEAF1 SWITCH CONFIGURATION (VTEP + SYMMETRIC IRB + ANYCAST GATEWAY)
! Prerequisite for ARP suppression: carve arp-ether TCAM region & reload
! hardware access-list tcam region arp-ether 256 double-wide
! =====================================================================
! 1. Enable VXLAN, EVPN, Routing, and VLAN Features
feature ospf
feature bgp
feature interface-vlan
feature vn-segment-vlan-based
feature nv overlay
nv overlay evpn
! 2. Configure Underlay Loopbacks and Jumbo-MTU Spine Uplinks
interface loopback0
description Underlay_Router_ID
ip address 10.0.0.11/32
ip router ospf UNDERLAY area 0.0.0.0
interface loopback1
description VTEP_NVE1_Source
ip address 10.0.1.11/32
ip router ospf UNDERLAY area 0.0.0.0
interface Ethernet1/1
description P2P_Uplink_to_Spine1
no switchport
mtu 9216
medium p2p
ip unnumbered loopback0
ip router ospf UNDERLAY area 0.0.0.0
no shutdown
router ospf UNDERLAY
router-id 10.0.0.11
! 3. Configure Distributed Anycast Gateway MAC and L2VNI (VLAN 10 -> VNI 10010)
fabric forwarding anycast-gateway-mac 0000.2222.3333
vlan 10
name App_Web_Subnet
vn-segment 10010
! 4. Configure Tenant VRF and Transit L3VNI (VLAN 999 -> VNI 50999)
vlan 999
name TENANT_A_L3VNI
vn-segment 50999
vrf context TENANT_A
vni 50999
rd auto
address-family ipv4 unicast
route-target both auto
route-target both auto evpn
interface Vlan999
description Symmetric_IRB_Transit_SVI
no shutdown
mtu 9216
vrf member TENANT_A
ip forward
interface Vlan10
description Anycast_Gateway_App_Web
no shutdown
mtu 9000
vrf member TENANT_A
ip address 192.168.10.1/24
fabric forwarding mode anycast-gateway
! 5. Configure VTEP NVE Interface with BGP Ingress Replication
interface nve1
no shutdown
host-reachability protocol bgp
source-interface loopback1
member vni 10010
suppress-arp
ingress-replication protocol bgp
member vni 50999 associate-vrf
! 6. Configure MP-BGP EVPN Peering to Spine Route Reflector
router bgp 65000
router-id 10.0.0.11
neighbor 10.0.0.1
remote-as 65000
description Spine1_EVPN_RR
update-source loopback0
address-family l2vpn evpn
send-community both
vrf TENANT_A
address-family ipv4 unicast
advertise l2vpn evpn
Pair the leaf configuration with an EVPN Route Reflector configuration on each spine switch (enabling retain route-target all so the spine reflects EVPN routes without needing local VNIs provisioned):
! =====================================================================
! SPINE1 SWITCH CONFIGURATION (UNDERLAY ROUTER + BGP ROUTE REFLECTOR)
! =====================================================================
feature ospf
feature bgp
nv overlay evpn
router bgp 65000
router-id 10.0.0.1
address-family l2vpn evpn
retain route-target all
neighbor 10.0.0.0/24
remote-as 65000
update-source loopback0
address-family l2vpn evpn
send-community both
route-reflector-client
Replicating the leaf template across additional ToR switches—changing only loopback0, loopback1, and router-id—brings new VTEPs into the fabric cleanly.
Troubleshooting VXLAN Connectivity and MTU Issues
When a VXLAN overlay fails to establish peerings or appears Up in the control plane while silently dropping application traffic, work from the physical underlay upward through the EVPN control plane in five sequential steps:
- Verify VTEP Source Loopback Reachability in the Underlay:
Confirm that the local VTEPLoopback1IP can reach every remote VTEPLoopback1IP over the underlay IGP (ping 10.0.1.12 source 10.0.1.11). If/32loopback prefixes are missing from OSPF/IS-IS/BGP routing tables, thenve1tunnel cannot encapsulate packets to the remote peer. - Isolate Silent MTU Blackholes Using DF-Bit Pings:
Small packets such as BGP keepalives, ARP messages, and standard 64-byte ICMP pings pass effortlessly across misconfigured1,500-bytelinks, while full-sized TCP/storage payloads drop silently when encapsulated. Test the exact underlay path MTU with the Don’t Fragment bit enabled: - On Cisco NX-OS:
ping 10.0.1.12 source 10.0.1.11 packet-size 8972 df-bit(tests a 9,000-byte IP packet; use1522to verify the minimum1,550-byteVXLAN threshold). - On Linux / Kubernetes nodes:
ping -M do -s 1522 <remote-node-ip>.
If large pings fail while small pings succeed, inspect every leaf uplink and spine port along the ECMP path for missing jumbo MTU settings. - Inspect NVE Interface State and Discovered Peers:
Runshow nve interfaceandshow nve peers(Cisco NX-OS) orshow vxlan vtep(Arista EOS). Verify thatnve1is administratively and operationallyUpand that remote VTEP IPs appear in the peer table. Ifnve1stays down, check that itssource-interface loopback1is up and not shared withloopback0router IDs when required by platform rules. - Audit VLAN-to-VNI, Route Target, and Anycast Gateway Consistency:
Runshow nve vniacross participating leaves to verify that identical VLANs map to the exact same 24-bit L2VNI and L3VNI numbers, EVPN import/export Route Targets match on both ends, and the Distributed Anycast Gateway virtual MAC address is identical on every leaf switch. - Check EVPN Route Exchanges, Firewall Ports, and Hardware TCAM:
Runshow bgp l2vpn evpnto confirm local endpoint MAC/IP entries are generated as Route Type 2 updates and remote Type 2 and Type 3 (IMET) routes are imported (*>). If routes exchange properly yet data-plane frames never arrive, verify that no transit firewall or switch ACL blocks UDP destination port4789(or8472for Linux CNI overlays) and check that hardwarearp-etherTCAM regions are properly carved whensuppress-arpis enabled.
Following this bottom-up sequence quickly separates physical MTU and routing faults from overlay VNI or BGP policy mismatches.
Ready-to-Deploy VXLAN Virtual Lab Topology (Containerlab, EVE-NG, and GNS3)
To test VXLAN encapsulation, packet captures, and EVPN routing safely on a local Linux machine or WSL2 environment without vendor licensing walls, save the following Containerlab topology as vxlan-evpn.clab.yml. It deploys a 1-Spine, 2-Leaf, 2-Host topology using open-source FRRouting (frr) and Alpine containers with pre-built VXLAN tunnel interfaces so host1 and host2 can ping across VNI 10010 immediately upon startup.
# Save as: vxlan-evpn.clab.yml
# Deploy: sudo containerlab deploy -t vxlan-evpn.clab.yml
# Test: docker exec -it clab-vxlan-evpn-lab-host1 ping -c 4 192.168.10.102
# Destroy: sudo containerlab destroy -t vxlan-evpn.clab.yml
name: vxlan-evpn-lab
topology:
nodes:
spine1:
kind: linux
image: quay.io/frrouting/frr:latest
exec:
- sysctl -w net.ipv4.ip_forward=1
- ip addr add 10.0.1.1/30 dev eth1
- ip addr add 10.0.2.1/30 dev eth2
- ip link set eth1 mtu 9216 up
- ip link set eth2 mtu 9216 up
- ip route add 10.0.0.11/32 via 10.0.1.2
- ip route add 10.0.0.12/32 via 10.0.2.2
leaf1:
kind: linux
image: quay.io/frrouting/frr:latest
exec:
- ip addr add 10.0.0.11/32 dev lo
- ip addr add 10.0.1.2/30 dev eth1
- ip link set eth1 mtu 9216 up
- ip route add 10.0.0.12/32 via 10.0.1.1
- ip link add br10 type bridge
- ip link set br10 up
- ip link add vxlan10 type vxlan id 10010 local 10.0.0.11 remote 10.0.0.12 dstport 4789
- ip link set vxlan10 master br10 up
- ip link set eth2 master br10 up
leaf2:
kind: linux
image: quay.io/frrouting/frr:latest
exec:
- ip addr add 10.0.0.12/32 dev lo
- ip addr add 10.0.2.2/30 dev eth1
- ip link set eth1 mtu 9216 up
- ip route add 10.0.0.11/32 via 10.0.2.1
- ip link add br10 type bridge
- ip link set br10 up
- ip link add vxlan10 type vxlan id 10010 local 10.0.0.12 remote 10.0.0.11 dstport 4789
- ip link set vxlan10 master br10 up
- ip link set eth2 master br10 up
host1:
kind: linux
image: alpine:latest
exec:
- ip addr add 192.168.10.101/24 dev eth1
- ip link set eth1 up
host2:
kind: linux
image: alpine:latest
exec:
- ip addr add 192.168.10.102/24 dev eth1
- ip link set eth1 up
links:
- endpoints: ["leaf1:eth1", "spine1:eth1"]
- endpoints: ["leaf2:eth1", "spine1:eth2"]
- endpoints: ["host1:eth1", "leaf1:eth2"]
- endpoints: ["host2:eth1", "leaf2:eth2"]
Once deployed, open vtysh on leaf1, leaf2, and spine1 (docker exec -it clab-vxlan-evpn-lab-leaf1 vtysh) to replace the static remote VTEP argument with dynamic OSPF and MP-BGP EVPN (advertise-all-vni), or adapt the same 1-Spine/2-Leaf cabling in EVE-NG or GNS3 using vendor virtual switch images (Cisco Nexus 9000v, Arista vEOS-lab / cEOS-lab, or Nvidia Cumulus VX).
Official Specification Reference: IETF RFC 7348
RFC 7348 is the authoritative Internet Engineering Task Force (IETF) document defining the Virtual eXtensible Local Area Network (VXLAN) encapsulation framework, packet format, VTEP forwarding rules, and operational requirements.
- Document Identifier: IETF RFC 7348
- Official Title: Virtual eXtensible Local Area Network (VXLAN): A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks
- Publication Date: August 2014
- Category / Status: Informational (ISSN:
2070-1721) - Authors: M. Mahalingam, D. Dutt, K. Duda, P. Agarwal, L. Kreeger, T. Sridhar, M. Bursell, C. Wright
- IANA Registered Port: UDP Destination Port
4789 - Canonical Specification URLs:
- RFC Editor:
https://www.rfc-editor.org/rfc/rfc7348 - IETF Datatracker:
https://datatracker.ietf.org/doc/html/rfc7348 - Companion IETF EVPN Control-Plane Standards:
- RFC 7432 (BGP MPLS-Based Ethernet VPN, February 2015) — Establishes the foundational BGP EVPN route types and procedures.
- RFC 8365 (A Network Virtualization Overlay Solution Using Ethernet VPN [EVPN], March 2018) — Standardizes MP-BGP EVPN as the control plane for VXLAN and other network virtualization overlays.
- RFC 9135 (Integrated Routing and Bridging in Ethernet VPN [EVPN], October 2021) — Formalizes Asymmetric and Symmetric IRB forwarding models for inter-subnet EVPN-VXLAN routing.
Consult RFC 7348 alongside RFC 8365 and RFC 9135 when verifying vendor protocol compliance or designing multi-vendor EVPN-VXLAN interoperability.
Conclusion
VXLAN bridges the gap between flexible Layer 2 workload mobility and resilient, high-capacity Layer 3 IP routing. By encapsulating Ethernet frames inside UDP packets identified by a 24-bit VNI—and pairing that data plane with MP-BGP EVPN in Spine-Leaf data centers or eBPF/kernel datapaths in Kubernetes clusters—network teams eliminate Spanning Tree bottlenecks and the 4,094-VLAN ceiling. With properly sized jumbo underlay MTUs, Symmetric IRB routing, and structured verification workflows, VXLAN provides a proven foundation for scalable cloud and enterprise network fabrics.












Comments