NetOps Toolkit

Cisco IOS

VXLAN Config Generator

Generate Cisco VXLAN configuration with VTEP settings

What is VXLAN?

VXLAN (Virtual Extensible LAN) is a network virtualization technology that addresses scalability problems in large cloud computing deployments. It uses a MAC-in-UDP encapsulation scheme to extend Layer 2 segments across Layer 3 networks.

Key Benefits:

  • Supports up to 16 million logical networks (24-bit VNI vs. 4096 VLANs)
  • Overcomes physical infrastructure limitations
  • Enables multi-tenancy in data centers
  • Leverages ECMP for optimal traffic distribution
  • Maintains Layer 2 adjacency across Layer 3 networks

VTEP (VXLAN Tunnel Endpoint)

VTEP devices perform VXLAN encapsulation and de-encapsulation. Each VTEP has:

  • Local LAN interface: Bridges communication with local endpoints
  • IP interface: Connects to the transport IP network (infrastructure VLAN)

VTEPs use their unique IP address to encapsulate Ethernet frames and transmit them over the IP network to destination VTEPs.

VXLAN Packet Format

Outer Ethernet Header (14 bytes) - Source/Dest MAC of transport devices
Outer IP Header (20 bytes IPv4 / 40 bytes IPv6) - VTEP source/dest IPs
Outer UDP Header (8 bytes) - Dest Port: 4789 (IANA), Src Port: flow hash
VXLAN Header (8 bytes) - Flags + VNI (24-bit) + Reserved
Inner Ethernet Frame - Original L2 frame with payload
Total Overhead: 50 bytes (IPv4) or 70 bytes (IPv6). Increase MTU to 1554+ (IPv4) or 1574+ (IPv6) to accommodate encapsulation.

Key Components

ComponentDescriptionDetails
VNIVXLAN Network Identifier24-bit field (16.7M networks)
VTEPVXLAN Tunnel EndpointEncap/decap device (physical or virtual)
UDP PortTransport protocol port4789 (IANA standard)
Outer IPVTEP addressingSource and destination VTEP IPs
MulticastBUM traffic handlingBroadcast, Unknown unicast, Multicast
EVPNControl plane (optional)MP-BGP for MAC/IP distribution

How VXLAN Works

  1. VM1 sends Ethernet frame to VM3 on different host
  2. Source VTEP looks up destination MAC and VNI in forwarding table
  3. Encapsulation: Add 8-byte VXLAN header with VNI
  4. UDP/IP encapsulation: Wrap in UDP packet with dest port 4789
  5. Routing: Packet routed across Layer 3 network to destination VTEP
  6. Destination VTEP de-encapsulates and forwards inner frame to VM3

Use Cases

Data Center Virtualization
Multi-tenant isolation with 16M segments
VM Mobility
Layer 2 adjacency across data centers
Hybrid Cloud
Extend on-prem networks to cloud
Network Segmentation
Micro-segmentation for security
MTU Considerations: VXLAN adds 50-70 bytes of overhead. Configure jumbo frames (MTU 1600+) on all underlay devices to prevent fragmentation.
ECMP Load Balancing: VXLAN encodes flow information in the UDP source port, enabling routers to perform flow-based load balancing across multiple paths.