Switching & routing

VLAN trunking with 802.1Q

Two switches joined by an 802.1Q trunk that carries VLAN 10, VLAN 20 and the native VLAN as tagged or untagged frames.

Access portAccess portAccess portAccess port802.1Q trunk802.1Q trunkAccess portAccess portAccess portAccess portUntagged frameSwitch 1192.0.2.2Switch 1 — 192.0.2.2Switch 2192.0.2.3Switch 2 — 192.0.2.3VLAN 10 host192.0.2.11VLAN 10 host — 192.0.2.11VLAN 20 host198.51.100.11VLAN 20 host — 198.51.100.11VLAN 10 server192.0.2.21VLAN 10 server — 192.0.2.21Native VLAN 99 host203.0.113.11Native VLAN 99 host — 203.0.113.11
Legend

Current step

Untagged at the access port

A frame from a host arrives with no VLAN tag; the access port assigns it to VLAN 10.

Port mode
Access
Assigned VLAN
10
Tag on the wire
None
An 802.1Q tag adds four bytes to the Ethernet header and names the VLAN a frame belongs to. Only the native VLAN crosses the trunk untagged, so both ends must agree on it.

Documentation example: addresses use the RFC 5737 ranges and ASNs use the reserved private range. Nothing here connects to a real network.

Tags

  • switching
  • vlan
  • trunk
  • 802.1q
  • tagging

Lessons using this diagram