VXLAN Header & VNI Decoder
Decode an 8-byte VXLAN header and inspect the flags field, VNI-valid I bit, reserved bits, 24-bit VXLAN Network Identifier, hexadecimal VNI value and reserved header bytes.
0x08 in the first flags byte is the
VNI-valid I bit. The VNI itself occupies bytes 4, 5 and 6 in network byte order,
providing a 24-bit numeric range from 0 through 16,777,215.
—
—
—
—
What Is a VXLAN Header?
VXLAN, or Virtual eXtensible Local Area Network, encapsulates Layer 2 Ethernet traffic inside UDP. A standard VXLAN encapsulation places an eight-byte VXLAN header between the outer UDP header and the encapsulated Ethernet frame.
The main identifier in the header is the 24-bit VXLAN Network Identifier, usually called the VNI.
VXLAN Header Format
Byte 0:
Flags
Bytes 1–3:
Reserved
Bytes 4–6:
VXLAN Network Identifier (VNI)
Byte 7:
Reserved
Total:
8 bytesVXLAN Flags Byte
In the conventional VXLAN header, the VNI-valid I bit corresponds to hexadecimal mask 0x08.
Standard Flags:
00001000
↑
I bit
Hex:
08When the I bit is set, the VNI field is valid. Reserved flag bits are expected to remain zero in the standard VXLAN format.
What Is a VXLAN VNI?
VNI means VXLAN Network Identifier. It identifies the VXLAN overlay segment to which the encapsulated Ethernet frame belongs.
The VNI occupies 24 bits, allowing a substantially larger segmentation space than the 12-bit VLAN ID field used by IEEE 802.1Q VLAN tagging.
VXLAN VNI Range
VNI width:
24 bits
Raw numeric range:
0 to 2^24 - 1
Maximum:
16,777,215
Hex maximum:
0xFFFFFFThe raw header can represent the complete 24-bit range, although operational deployments may apply additional conventions or restrictions.
How Is the VNI Decoded?
The three VNI bytes are interpreted in network byte order, with the first byte being the most significant.
VNI Bytes:
00 13 88
Calculation:
(0x00 << 16)
+
(0x13 << 8)
+
0x88
= 0x001388
= 5000VXLAN Header Example
08 00 00 00 00 13 88 00
08
Flags
I = 1
00 00 00
Reserved
00 13 88
VNI = 5000
00
ReservedVXLAN Reserved Fields
The standard VXLAN header reserves most of its non-VNI bits. Reserved bits and bytes are normally transmitted as zero and ignored when received according to the base header rules.
Extensions or VXLAN-related variants can define additional semantics, so this tool deliberately identifies itself as a decoder for the standard base VXLAN header rather than treating every eight-byte VXLAN-related format as identical.
VXLAN vs VLAN
| Feature | VLAN | VXLAN |
|---|---|---|
| Segment Identifier | VLAN ID | VNI |
| Identifier Width | 12 bits | 24 bits |
| Raw ID Space | 4,096 values | 16,777,216 values |
| Transport | Ethernet tagging | Overlay over UDP/IP |
VXLAN UDP Encapsulation
A complete VXLAN packet normally includes an outer Ethernet frame, IP header, UDP header, VXLAN header and an encapsulated inner Ethernet frame.
Outer Ethernet
↓
Outer IP
↓
UDP
↓
VXLAN Header
↓
Inner Ethernet
↓
Inner PayloadThis page decodes only the eight-byte VXLAN header and does not attempt to parse the surrounding IP, UDP or inner Ethernet headers.