Use it when mapping VLANs or VRFs to VNIs, or when a VNI is down or mismatched between VTEPs.
VNI
The VXLAN Network Identifier (VNI) is a 24-bit segment ID in the VXLAN header, allowing about 16 million segments instead of 4094 VLANs.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show nve vniShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Layered verification and original-test closure Verify boundary
Step 2 Observation → implication → next check Narrow the fault
Step 3 Common mistakes Narrow the fault
- VNI to VLAN mapping not identical on all VTEPs.
- Reusing VNIs for different segments.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- The VNI (VXLAN Network Identifier) is a 24-bit segment ID, allowing about 16 million segments.
- A Layer 2 VNI maps to a VLAN; a Layer 3 VNI maps to a VRF.
- Both ends must map the same VNI to the same segment.
show nve vni— VNI, mcast/ingress replication, stateshow running-config | section vlan configuration|member vni— VLAN-to-VNI mapping
ReferenceHow it works1 section · depth on demand
Operational mechanics and ownership
VNI — A VXLAN VNI is a 24-bit logical segment identifier carried in the VXLAN header. Matching VLAN numbers are not required across sites; the VLAN-to-VNI mapping at each VTEP is what matters. The VTEP owns local VLAN/VRF-to-VNI binding and uses the VNI during encapsulation/decapsulation. A tunnel can be up while one VNI is missing or mapped to the wrong local segment.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
The VNI: VXLAN's segment identifier
RFC 7348 identifies each VXLAN overlay segment with a 24-bit VXLAN Network Identifier (VNI). That allows up to 16 million segments in one administrative domain, against 4094 usable VLANs. Inner MAC addresses can overlap between VNIs without conflict, because the VNI keeps the segments apart.
VNI in the header (RFC 7348)
| Field | Bits | Value |
|---|---|---|
| Flags | 8 | I bit set to 1 for a valid VNI; other bits reserved (0) |
| Reserved | 24 | 0 |
| VNI | 24 | Segment ID |
| Reserved | 8 | 0 |
Two kinds of VNI in BGP EVPN (Cisco Catalyst 9300 BGP EVPN VXLAN guide)
| VNI type | Mapped to | Used for |
|---|---|---|
| Layer 2 VNI | A local VLAN (bridge domain) | Bridging within one subnet across VTEPs |
| Layer 3 VNI | A VRF | Routing between subnets of that VRF across VTEPs |
LEAF1(config)# vlan configuration 20
LEAF1(config-vlan-config)# member evpn-instance 20 vni 10020
LEAF1(config)# vlan configuration 999
LEAF1(config-vlan-config)# member vni 50001
LEAF1(config)# vrf definition CORP
LEAF1(config-vrf)# vnid 50001
LEAF1(config)# interface nve1
LEAF1(config-if)# source-interface Loopback1
LEAF1(config-if)# host-reachability protocol bgp
LEAF1(config-if)# member vni 10020 ingress-replication
LEAF1(config-if)# member vni 50001 vrf CORP
LEAF1# show nve peers
Interface VNI Type Peer-IP RMAC/Num_RTs eVNI state flags UP time
nve1 50001 L3CP 10.255.255.2 a4bb.6d22.0001 50001 UP A/M/4 2d03h
nve1 10020 L2CP 10.255.255.2 6 10020 UP N/A 2d03h
LEAF1# show nve vni
Interface VNI Multicast-group VNI state Mode BD cfg vrf
nve1 10020 N/A Up L2CP 20 CLI N/A
nve1 50001 N/A Up L3CP N/A CLI CORP
Numbering plan
| Practice | Example |
|---|---|
| Encode the VLAN in the L2 VNI | VLAN 20 → VNI 10020 |
| Separate range for L3 VNIs | VRF CORP → 50001, VRF GUEST → 50002 |
| Same VNI for the same segment on every VTEP | VLAN numbers can differ per switch, but the VNI must match |
VNI and VLAN are only locally linked
The VLAN ID is local to each switch: VLAN 20 on one leaf and VLAN 120 on another can map to the same VNI 10020, and the hosts are in the same segment. The VNI is the fabric-wide identifier; the VLAN is only the access-side handle.
Documented example, not captured output.
Quick reference
The VNI is VXLAN's segment number, similar to a VLAN ID but 24 bits long, so millions of separate segments are possible instead of 4,094. A Layer 2 VNI represents one bridged network; a Layer 3 VNI represents a VRF and carries routed traffic between leaves. Consistent VLAN-to-VNI mapping across the fabric is what makes a segment the same segment everywhere.
The VNI (VXLAN Network Identifier) is a 24-bit segment ID — about 16 million segments, compared with 4094 VLANs. An L2 VNI maps to a VLAN/bridge domain; an L3 VNI identifies a VRF for routed traffic in symmetric IRB.
vlan 100
vn-segment 10100 ! NX-OS: VLAN 100 → L2 VNI 10100
interface nve1
member vni 10100
ingress-replication protocol bgp
member vni 50001 associate-vrf
show nve vni
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Virtualization & Overlays → VXLAN → VNI. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc7348.html · confidence 94%