vxlanVirtual eXtensible Local Area Network Overlay24-Bit Data-Center Overlays on UDP 4789 (vtep1 <-> vtep2 vxlan)
What It Does on the Wire
When 4,094 VLANs stopped being enough, data centers wrapped Layer 2 inside UDP 4789 and got 16 million VNIs. vxlan vni 10050 stamps the exact 8-byte 0x08 VXLAN shim.
Virtual eXtensible Local Area Network (vxlan) stretches Layer 2 broadcast domains across routed Layer 3 leaf-spine fabrics by encapsulating inner Ethernet frames inside UDP datagrams on dstport 4789. The 8-byte RFC 7348 VXLAN header sets the I flag (0x08) and carries a 24-bit VXLAN Network Identifier (vni / vnid, supporting up to 16.7 million tenant segments 0..16777215).
FrameAssembly emits the outer Ethernet + IPv4/IPv6 + UDP (4789) + 8-byte VXLAN header plus an encapsulated inner Ethernet/IPv4 frame automatically—making EVPN-VXLAN data-plane testing immediate.
EVPN-VXLAN Data-Center Fabric & Underlay ECMP Testing
Vary outer srcport entropy (49152..65535) across multiple vxlan vni 10100 frames to verify spine ECMP load-balancing and VTEP firewall rules.
Legacy Linux VXLAN Port 8472 vs IANA Port 4789 Audits
Override dstport 8472 to test Kubernetes Flannel / legacy Linux VXLAN dissectors alongside standard IANA 4789 traffic.
NDR & Suricata VXLAN Decapsulation Verification
Validate that network detection sensors decode inner tenant headers inside vni segments.
Minimal Quickstart (vxlan_quickstart.frasm)
Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.
host vtep_leaf1 { ip 172.16.0.11 }host vtep_leaf2 { ip 172.16.0.12 }compile { vtep_leaf1 -> vtep_leaf2 vxlan vni 10100}What the Compiler Calculates So You Don't Have To
- Wraps the packet in UDP
dstport 4789with ephemeral outersrcportand computes the outer IPv4/IPv6 + UDP checksums. - Writes the 8-byte RFC 7348 VXLAN header (
08 00 00 00 <24-bit VNI> 00) with the mandatoryIbit (0x08) set. - Appends a valid inner Ethernet II + IPv4 frame when
payload/hexpayloadis omitted, and validatesvnibounds (0..=16777215).
Multi-Tenant EVPN-VXLAN Underlay Carrying L2VNI 10100 & L3VNI 50000
Simulates leaf VTEPs exchanging multi-tenant VXLAN traffic across ECMP UDP source ports, plus an IPv6 underlay VXLAN encapsulation.
host leaf1_vtep { ip 10.255.0.11 mac 00:1c:73:aa:00:11 }host leaf2_vtep { ip 10.255.0.12 mac 00:1c:73:aa:00:12 }host vtep6_a { ip 2001:db8:255::11 }host vtep6_b { ip 2001:db8:255::12 }compile { // Tenant A L2VNI 10100 with outer UDP entropy port 52101 and underlay VLAN 4090 leaf1_vtep -> leaf2_vtep vxlan vni 10100 srcport 52101 vlan 4090 dscp 26 wait 1ms // Tenant B Symmetric IRB L3VNI 50000 with different ECMP hash port 58420 leaf2_vtep -> leaf1_vtep vxlan vnid 50000 srcport 58420 vlan 4090 dscp 46 wait 2ms // IPv6 underlay VXLAN on legacy Linux port 8472 vtep6_a -> vtep6_b vxlan vni 20200 dstport 8472 flowlabel 0x33445}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show vxlan_evpn_fabric.frasm
# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly vxlan_evpn_fabric.frasm vxlan_evpn_fabric.pcap
frameassembly vxlan_evpn_fabric.frasm vxlan_evpn_fabric.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse vxlan_evpn_fabric.pcap vxlan_evpn_fabric_edited.frasmAll vxlan Keywords & Header Options
Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after vxlan:
src_host -> dst_host vxlan [vni|vnid <0..16777215>]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| vni <0..16777215> | vnid <0..16777215> | 24-bit unsigned integer (0..16777215) | 1 | Sets the 24-bit VXLAN Network Identifier in bytes 4..6 of the 8-byte VXLAN header (vnid is an exact alias for vni). |
| srcport <0..65535> | dstport <0..65535> | 16-bit UDP ports | srcport 49152, dstport 4789 | Controls outer UDP entropy srcport for spine ECMP hashing or overrides dstport (e.g., 8472 for Flannel / early Linux VXLAN). |
Cross-Layer Wrappers Valid with vxlan
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
10 options
Cross-Layer Wrappers Valid with vxlan
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
| Option | Range / Format | Default | Effect on Packet |
|---|---|---|---|
| wait <number><ns|us|ms|s|m> | Time gap (ns, us, ms, s, m) | 10ms | Advances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back). |
| payload "<text>" | hexpayload "<hex>" | Quoted text or hex bytes (choose one) | Omitted | Appends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums. |
| srcmac <mac> | dstmac <mac> | Colon, hyphen, or Cisco dot MAC | Host MAC / RFC multicast MAC | Overrides the 14-byte Ethernet II source or destination MAC address for this single packet. |
| vlan <0..4095> [pcp <0..7>] [dei <0|1>] | VLAN ID 0..4095, PCP 0..7, DEI 0..1 | Untagged | Wraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority. |
| qinq <0..4095> [innervlan <0..4095>] | Outer S-VLAN 0..4095, Inner C-VLAN 0..4095 | Untagged (innervlan 1 when qinq is set) | Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100). |
| mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>] | Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255 | Unlabeled (at most 1 mpls tag per packet) | Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header. |
| ttl <0..255> [dscp <0..63>] [ecn <0..3>] | TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3 | ttl 64, dscp 0, ecn 0 | Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings. |
| ipid <0..65535> [df] [mf] [fragoffset <0..8191>] | IPv4 ID, DF/MF flags, fragment offset 0..8191 | ipid 1, flags 0, fragoffset 0 | Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6). |
| flowlabel <0..1048575> | 20-bit IPv6 Flow Label (0..1048575) | 0 | Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts). |
| srcport <0..65535> | dstport <0..65535> | Port number 0..65535 | srcport 49152 (remembered), UDP 4789 (VNI 1) | Overrides source or destination port and remembers the port pair automatically on <- replies. |
Gotchas & Quick Fixes
24-Bit VNI Upper Bound (16,777,215)
leaf1 -> leaf2 vxlan vni 20000000leaf1 -> leaf2 vxlan vni 16777215VXLAN VNIs occupy 24 bits (0..=16777215 / 0xffffff). Values exceeding 16777215 are rejected by semantic validation.
VXLAN Runs Exclusively Over UDP (No transport tcp)
leaf1 -> leaf2 vxlan vni 100 transport tcpleaf1 -> leaf2 vxlan vni 100Per RFC 7348, VXLAN is strictly UDP-encapsulated and is not in the 9-protocol transport whitelist.