VLANs, Trunking & STP
Read this concept as one more decision made about a packet in flight. The widget below lets you change the inputs and watch the consequence instead of memorising the rule.
Why it matters
Switches can separate broadcast domains logically without new cabling, but tags and loop-prevention messages both change the frames an observer sees. Misconfiguration here breaks containment rather than just connectivity.
On the wire
An 802.1Q tag inserts a TPID, a 12-bit VLAN ID, and priority bits into the Ethernet header; trunk ports carry tagged frames for many VLANs while access ports usually strip the tag. STP exchanges BPDUs to elect a root bridge and block redundant ports so a Layer 2 loop cannot persist.
When it breaks
A native VLAN mismatch makes frames land on the wrong VLAN and STP BPDUs go unseen, so a physical loop stays live. A missing BPDU guard on an access port lets an attacker inject BPDUs and force a topology change that moves or blocks ports.
Frame builder
Click a field to flip a bit, then send it. The FCS covers Destination MAC through Data/Pad.
CRC-32 covers Destination MAC through Data/Pad; preamble and SFD are outside the FCS. Corrupt a field to see what happens.