Pcornel
Virtualization · Virtual Networking

VLAN

Cheat sheet · https://pcornel.dk/topic.php?topic=3524

Back to the Topic

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.

Remember

  • 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.

First 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

Verify in this order

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

Where it usually breaks

First mismatch in guest NIC → virtual switch/bridge → VLAN/port group/security policy → physical uplink → routed path → peer/workload; preserve identity/native error/pre-state before mutation.

Virtual Networking → VLAN reference map

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

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3524

Confirmation

Confirm action

Continue?