What is VNI?
VXLAN Network Identifier
A VNI (VXLAN Network Identifier) is the 24-bit number identifying one VXLAN segment, like a VLAN ID but with about 16 million possible values.
A VLAN ID is only 12 bits, so a network can have at most about 4,000 VLANs, which is not enough for large data centres and multi-tenant clouds. VXLAN (RFC 7348) wraps each Ethernet frame in an 8-byte VXLAN header inside a UDP packet (port 4789), and that header carries the VNI. With 24 bits there are 16,777,216 possible values, so each tenant or segment can have its own. Every VTEP that has local hosts in a segment maps the segment to the same VNI. Inside a switch, the VNI is usually tied to a local VLAN or bridge, and VLAN IDs only need to be consistent on each switch, while the VNI is what has to match across the whole fabric. With EVPN as the control plane, each VTEP advertises the VNIs it serves and the MAC addresses behind them, and route targets, often derived automatically from the AS and the VNI, decide which routes are imported into which segment.
Data-centre engineers distinguish two kinds. A layer-2 VNI stretches one subnet across many switches, so hosts in different racks share a broadcast domain. A layer-3 VNI belongs to a tenant VRF and carries routed traffic between subnets in designs with symmetric routing at each leaf. The most common configuration mistake is simply a mismatch: the same segment configured with different VNIs on different leaves, which leaves the hosts unable to reach each other while the fabric itself looks healthy. The EVPN and VXLAN lesson builds VNI 100 across two leaves and shows the VNI in real VXLAN packets.
Lessons that use VNI
- EVPN and VXLAN: layer 2 over a routed fabricTeaches this term · Advanced · 45 min
Stretch a layer-2 segment across a routed leaf-spine fabric: VXLAN for the data plane, BGP EVPN for the control plane. Built with FRR: the underlay, VNIs, type-2 and type-3 routes, route targets, and the VXLAN packets on the wire.