Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

VLAN · Virtual Networking

Direct answer

A VLAN in virtual networking segments Layer 2 traffic by mapping VM-facing ports and virtual/physical uplinks to an IEEE 802.1Q VLAN identity or equivalent logical segment.

When to use this

Use this Topic to verify that a VM belongs to the intended broadcast domain and that VLAN handling is consistent from the virtual port through the host uplink to the physical network.

First 30 seconds

1. VLAN separates broadcast domains with 802.1Q tags.

2. The physical switch port must trunk the VLAN.

3. Native VLAN mismatch causes leaks.

4. Guest or vSwitch tags — not both.

5. Document VLAN IDs.

Operational verification

guest frame → tag on vSwitch/guest → trunk → physical switch

Evidence · next step

Verify the adjacent physical switch VLAN state and return traffic.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

It does not show all upstream VLAN paths, gateways or remote services are healthy.

Next check: Verify the adjacent physical switch VLAN state and return traffic.

Platform / version applicability
virtualization-network
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformvirtualization-network
Scope / prerequisiteUse this Topic to verify that a VM belongs to the intended broadcast domain and that VLAN handling is consistent from t…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

guest frame → virtual port VLAN classification/tagging → virtual switch/bridge → host uplink → physical trunk/access port → VLAN forwarding

Step 2 Effective-state and workload closure Verify boundary

Correlate guest counters/routes with virtual-port and uplink counters for the same test, validate VLAN/policy on the exact path, then repeat the original guest transaction.

Step 3 Verification path Verify boundary

Exercise one safe negative or boundary case implied by wrong bridge/port group, VLAN mismatch, disconnected vNIC, missing uplink, MAC/security policy rejection, MTU mismatch or stale tap/device state.

Step 4 Branching troubleshooting Narrow the fault

Concrete boundaries: guest socket/route → virtual NIC → host/hypervisor queue → bridge/vSwitch/port group → VLAN/security policy → physical uplink → external network → return → guest workload.

Step 5 Where it fails Narrow the fault

Walk guest NIC → virtual switch/bridge → VLAN/port group/security policy → physical uplink → routed path → peer/workload and stop where observed state diverges.

Common failure classes are wrong bridge/port group, VLAN mismatch, disconnected vNIC, missing uplink, MAC/security policy rejection, MTU mismatch or stale tap/device state. Also consider stale management inventory, asynchronous task overlap, host capability mismatch, guest-agent/driver lag, CPU feature masking, NUMA pressure, backing-store latency, bridge/VLAN mismatch, MTU mismatch, snapshot chains, lock ownership and partial cluster membership.

Evidence references

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.

observation · 1
Key points
  • VLAN configuration can be applied at the VM/port group, virtual switch/bridge or guest depending on design; avoid tagging twice unintentionally.
  • VLAN ID configured does not prove the frame leaves the host with the intended tag.
  • An access-style VM port normally presents untagged Ethernet to the guest while the virtualization layer associates it with one VLAN.
  • End-to-end VLAN success requires consistent allowed/native/access semantics on the physical network.
Key checks
  • bridge vlan show — VLANs on Linux bridge ports
  • Get-VMNetworkAdapterVlan — Hyper-V access/trunk VLAN
  • esxcli network vswitch standard portgroup list — ESXi VLAN IDs
ReferenceWhat it is1 section · depth on demand

In depth

In virtual networking, a VLAN is a logical Layer 2 segment that virtual switches enforce on VM ports and carry over physical uplinks with 802.1Q tags. VLANs let one host connect VMs to many networks through a few physical NICs.

ComponentVLAN role
VM virtual NICConnected to a port/port group with a VLAN
Virtual switchTags/untags frames, enforces separation
Host uplinkTrunk carrying all VLANs used on the host
Physical switchMust allow the same VLANs on the trunk
Overlay (VXLAN/Geneve)Alternative for many segments beyond 4094
# Linux bridge (Proxmox) VLAN-aware
cat /etc/network/interfaces | grep -A5 vmbr0
bridge vlan show dev tap101i0

Keep VLAN assignments documented and consistent across all hosts in a cluster — otherwise migrated VMs lose connectivity.

ReferenceWhy it matters1 section · depth on demand

Internals and state

A guest packet leaves the guest IP stack through a virtual NIC, is processed by hypervisor/host tap or synthetic device queues, traverses a bridge/vSwitch/port-group and VLAN/security policy, then reaches a physical uplink and external network.

Management-plane “connected” state does not show VLAN admission, host forwarding, offload behavior or return traffic.

Local intent: A VLAN in virtual networking segments Layer 2 traffic by mapping VM-facing ports and virtual/physical uplinks to an IEEE 802.1Q VLAN identity or equivalent logical segment.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

A correct VLAN setting at one boundary shows only local policy, but it does not show the next boundary expects or transports the same VLAN.

Networking owns 802.1Q and switching theory; Virtual Networking owns where the hypervisor classifies/tags VM traffic.

A guest packet leaves the guest IP stack through a virtual NIC, is processed by hypervisor/host tap or synthetic device queues, traverses a bridge/vSwitch/port-group and VLAN/security policy, then reaches a physical uplink and external network. Management-plane “connected” state does not show VLAN admission, host forwarding, offload behavior or return traffic. Close with Correlate guest counters/routes with virtual-port and uplink counters for the same test, validate VLAN/policy on the exact path, then repeat the original guest transaction. and state what the evidence does not show.

Mechanics

The responsible chain spans guest vNIC, virtual switch/bridge, policy/VLAN and physical uplink.

For Virtual Networking → VLAN, stable identity is cluster/host + VM + vNIC + bridge/switch/port-group + VLAN/network.

Follow the path in order: guest NIC → virtual switch/bridge → VLAN/port group/security policy → physical uplink → routed path → peer/workload. It can coexist with stale placement, missing guest drivers, wrong VLAN/bridge mapping, inaccessible backing storage, CPU incompatibility or a workload that cannot use the resource.

The operating invariants are: attachment, VLAN/policy and uplink identity agree end to end; counters move on the expected path.

Important negative cases include wrong bridge/port group, VLAN mismatch, disconnected vNIC, missing uplink, MAC/security policy rejection, MTU mismatch or stale tap/device state.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docvirtualization-network current

Authoritative/upstream documentation reviewed for bounded claims in Virtual Networking → VLAN. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://libvirt.org/formatnetwork.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
vm vlanvirtual vlan802.1q virtualizationvlan id vm
Embedded reference data

Quick lookup tables

Virtual Networking → VLAN reference map

Fast virtual-network boundaries for Virtual Networking → VLAN.

BoundaryMeaningEvidence limit
Guest-facingTagged or untagged presentationDesign choice
Virtual portVLAN classificationHypervisor policy
UplinkTag carried/removedHost egress
Physical switchAllowed/native/accessExternal dependency
Confirmation

Confirm action

Continue?