Vol. I · No. 46The protocol sectionSat, 10 Oct 2026
Layer 2 · The Link · many networks on one wire

802.1Q

VLAN tagging

802.1Q is a label that keeps networks apart. It inserts a four-byte tag into the Ethernet frame, naming which VLAN the frame belongs to, so one physical link can carry many isolated networks without their traffic ever mixing.

802.1Q tags a frame with its VLAN — so one cable carries many networks that still cannot see each other.

Operates at
Layer 2
inside the frame
Tag size
4 bytes
after the source MAC
VLAN IDs
1 – 4094
12 bits
Carried on
Trunk ports
access ports are untagged

How it works

The tag slipped into an ordinary frame
Four bytes, inserted after the source address
Destination MAC
Source MAC
TPID 0x8100
PCP
DEI
VLAN ID (12 bits)
EtherType
Payload

A switch reads the VLAN ID and will only forward the frame out of ports that belong to that VLAN. The PCP field carries priority, which is how voice traffic gets ahead of a file copy.

The main points

What 802.1Q does, step by step

1
Assign the port

An access port is configured for one VLAN; anything arriving on it belongs to that network.

2
Tag on the trunk

When the frame leaves for another switch, the switch inserts the 802.1Q tag naming its VLAN.

3
Forward within the VLAN

The receiving switch reads the tag and considers only the ports in that VLAN — the rest never see it.

4
Strip on the way out

Delivering to an access port, the tag is removed again; the host never knows it was there.

Terms worth knowing
Access port — one VLAN, untagged
Trunk port — many VLANs, tagged
Native VLAN — the untagged one on a trunk

In cybersecurity

VLANs are the standard way to segment a LAN — but the separation is a switch configuration, and a misconfigured trunk undoes all of it.

VLAN hopping

Double-tagging exploits the native VLAN to send a frame into a VLAN the attacker isn’t in.

Switch spoofing

A host that negotiates a trunk gets every VLAN at once — disable dynamic trunking on access ports.

Prune the trunk

Allow only the VLANs a link actually needs, rather than all 4094 by default.

Unused native VLAN

Give the native VLAN an ID that carries nothing, so a stray untagged frame lands nowhere.

Not a firewall

VLANs separate broadcast domains; what may cross between them is an ACL’s job.

Segmentation pays

Guests, cameras and payment systems on their own VLANs shrink what one breach reaches.

Rides in the stack

Ethernet802.1QIP, …

It isn’t carried by Ethernet so much as it is part of it — the tag lives inside the frame header itself.

Works with

Ethernet

See it on Linux

ip link

The tag & the ranges

Tag fields
TPID0x8100
PCPpriority
DEIdrop hint
VIDthe VLAN
VLAN IDs
0priority only
1default
2 – 4094usable
4095reserved