LearningAid

VLANs and STP

How a switched network is split into VLANs and kept loop-free. Work through the three steps below: learn the cards, test yourself, then tick off what you can explain.

1. Learn

Three animated cards. Watch the bar move down each row, then read the notes.

Animated card of the five STP port states

STP port states

  • Blocking: receives BPDUs only. No data, no MAC learning. Up to 20s (max age).
  • Listening: sends and receives BPDUs, still no MAC learning. 15s.
  • Learning: builds the MAC table but still does not forward data. 15s.
  • Forwarding: normal operation.
  • Disabled: the port is shut down by an admin.

Classic STP can take up to 50s to converge (20 + 15 + 15). Rapid PVST+ (802.1w) takes a few seconds.

Download PNG

Animated card of the six STP decision steps

STP decision order

  • Root bridge: lowest bridge priority first (default 32768, in steps of 4096), then lowest MAC address.
  • Root port on each non-root switch: lowest root path cost, then lowest sender bridge ID, then lowest sender port priority (default 128), then lowest sender port ID.
  • Lower always wins.

Bridge ID = priority + VLAN ID + MAC address. With per-VLAN STP, each VLAN can have its own root.

Download PNG

Animated card of six VLAN and trunking concepts

VLANs and trunking

  • Access port: carries one VLAN, untagged, to an end device.
  • Trunk port: carries many VLANs between switches using 802.1Q.
  • 802.1Q tag: 4 bytes with a 12-bit VLAN ID, usable range 1 to 4094.
  • Native VLAN: sent untagged on a trunk. VLAN 1 by default.
  • Voice VLAN: a separate VLAN for an IP phone, with a PC behind it.
  • Inter-VLAN routing: needs a router or a Layer 3 switch (SVI).

The native VLAN must match on both ends of a trunk. A mismatch causes CDP errors and VLAN leakage.

Download PNG

2. Practice

Nine quick questions. Pick an answer to see the result.

Score: 0 / 0

3. Master

Tick each item only when you can explain it out loud without looking.

0 of 0 done
VLANs and STP mastered. Nice work.