Pcornel
Networking · Network & Protocols › Ethernet & VLANs

VLAN & 802.1Q Trunk Reference

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

Back to the Topic

Answer

A VLAN is a separate Layer 2 network inside a switch. A trunk carries several VLANs over one link, marking each frame with its VLAN number in an 802.1Q tag; an access port belongs to a single VLAN and carries no tag.

Remember

A VLAN works end to end only if it exists on every switch in the path and is allowed on every trunk. switchport trunk allowed vlan 30 replaces the list — use add. The native VLAN is untagged and must be the same on both ends.

First checks

  • show vlan brief — the VLANs that exist and their access ports.
  • show interfaces trunk — trunk ports, native VLAN, and VLANs allowed and forwarding.
  • show interfaces <interface> switchport — one port's mode, access VLAN and native VLAN.
  • show spanning-tree vlan <id> — whether the VLAN is blocked on a trunk.

Verify in this order

access port in the right VLAN → VLAN exists and is active on each switch → allowed on each trunk, both ends → native VLAN equal → not blocked by spanning tree on every path → frames delivered in the same VLAN at the far end

Where it usually breaks

physical link → switchport/bundle membership → VLAN/instance state → STP/LAG decision → MAC forwarding → end-to-end frame path

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

Confirmation

Confirm action

Continue?