Protocol 14 of 81Layer 3FrameAssembly v3.1.2
llms-full.txt
vxlanVirtual eXtensible Local Area Network Overlay

24-Bit Data-Center Overlays on UDP 4789 (vtep1 <-> vtep2 vxlan)

Default Port / Protocol
UDP 4789 (VNI 1)
Host Endpoint Rule
Dual-Stack IPv4/IPv6
Wireshark Display Filter
vxlan
Standards & Specs
RFC 7348
Wire Stack:Ethernet II[802.1Q / QinQ / MPLS]IPv4 / IPv6VXLAN (UDP 4789 (VNI 1))

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.

vxlan_quickstart.frasm6 lines
Open in 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 4789 with ephemeral outer srcport and 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 mandatory I bit (0x08) set.
  • Appends a valid inner Ethernet II + IPv4 frame when payload/hexpayload is omitted, and validates vni bounds (0..=16777215).
Multi-Frame Lab · Ready to Compile

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.

vxlan_evpn_fabric.frasm13 lines
Open in Playground
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
}
Terminal Commands (FrameAssembly CLI v3.1.2)
# 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.frasm

All 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 / OptionAccepted ValueDefaultEffect on Packet
vni <0..16777215> | vnid <0..16777215>24-bit unsigned integer (0..16777215)1Sets 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 portssrcport 49152, dstport 4789Controls 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
OptionRange / FormatDefaultEffect on Packet
wait <number><ns|us|ms|s|m>Time gap (ns, us, ms, s, m)10msAdvances 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)OmittedAppends 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 MACHost MAC / RFC multicast MACOverrides 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..1UntaggedWraps 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..4095Untagged (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..255Unlabeled (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..3ttl 64, dscp 0, ecn 0Sets 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..8191ipid 1, flags 0, fragoffset 0Sets 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)0Sets 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..65535srcport 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)

Avoid
leaf1 -> leaf2 vxlan vni 20000000
Valid v3.1.2 Syntax
leaf1 -> leaf2 vxlan vni 16777215

VXLAN VNIs occupy 24 bits (0..=16777215 / 0xffffff). Values exceeding 16777215 are rejected by semantic validation.

VXLAN Runs Exclusively Over UDP (No transport tcp)

Avoid
leaf1 -> leaf2 vxlan vni 100 transport tcp
Valid v3.1.2 Syntax
leaf1 -> leaf2 vxlan vni 100

Per RFC 7348, VXLAN is strictly UDP-encapsulated and is not in the 9-protocol transport whitelist.

Field Guide 05
VLANs, QinQ, MPLS, Tunnel Soup & Dual-Stack IPv6