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
| Component | Description | Details |
|---|---|---|
| VNI | VXLAN Network Identifier | 24-bit field (16.7M networks) |
| VTEP | VXLAN Tunnel Endpoint | Encap/decap device (physical or virtual) |
| UDP Port | Transport protocol port | 4789 (IANA standard) |
| Outer IP | VTEP addressing | Source and destination VTEP IPs |
| Multicast | BUM traffic handling | Broadcast, Unknown unicast, Multicast |
| EVPN | Control plane (optional) | MP-BGP for MAC/IP distribution |
How VXLAN Works
- VM1 sends Ethernet frame to VM3 on different host
- Source VTEP looks up destination MAC and VNI in forwarding table
- Encapsulation: Add 8-byte VXLAN header with VNI
- UDP/IP encapsulation: Wrap in UDP packet with dest port 4789
- Routing: Packet routed across Layer 3 network to destination VTEP
- 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.
! VXLAN Configuration for LEAF-01
conf t
hostname LEAF-01
! Enable VXLAN features
feature nv overlay
feature vn-segment-vlan-based
! Loopback interface for VTEP
interface Loopback0
description VTEP Source Interface
ip address 10.1.1.1/32
ip router ospf 1 area 0.0.0.0
no shutdown
! Underlay interface
interface Ethernet1/1
description Underlay Interface
no switchport
ip address 192.168.100.1 255.255.255.0
ip router ospf 1 area 0.0.0.0
no shutdown
! VLAN to VNI mapping
vlan 10
vn-segment 10010
! NVE interface (VTEP)
interface nve1
description VXLAN VTEP Interface
no shutdown
source-interface loopback0
member vni 10010
mcast-group 239.1.1.10
! Access port configuration example
interface Ethernet1/10
description Access Port
switchport access vlan 10
no shutdown
! OSPF for underlay routing
router ospf 1
router-id 10.1.1.1
!
copy running-config startup-config
Notes:
- VTEP source: Loopback0 (10.1.1.1)
- VNI 10010 mapped to VLAN 10
- Using multicast group 239.1.1.10 for BUM traffic
- Data-plane learning mode (flood-and-learn)
- Configure OSPF or another IGP for underlay reachability
- Ensure MTU 1600+ on all underlay interfaces