Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.2.2. Spanning Tree Protocol

Redundant links prevent single points of failure—but they create Layer 2 loops. Without STP, a broadcast frame travels both paths, creating copies that travel both paths, exponentially multiplying until the network crashes (broadcast storm).

STP (Spanning Tree Protocol): Prevents loops by blocking redundant paths while keeping them available for failover.

802.1D Port States:
  1. Blocking: Not forwarding frames; listening to BPDUs to learn topology
  2. Listening: Processing BPDUs, participating in root bridge election
  3. Learning: Building MAC table but still not forwarding
  4. Forwarding: Normal operation—learning and forwarding
  5. Disabled: Administratively shut down
Port Roles:
  • Root Port: Best path to root bridge (one per non-root switch)
  • Designated Port: Best path for a segment to reach root
  • Blocked/Alternate: Backup path, kept in standby

Root bridge election: The switch with the lowest bridge ID becomes root. Bridge ID = priority (default 32768) + MAC address, so if nobody changes the priority, the switch with the lowest MAC address wins.

Convergence: Classic 802.1D STP takes 30–50 seconds to reconverge (up to 20 s max age, then 15 s listening and 15 s learning). RSTP (802.1w) replaces the timers with a handshake between switches and converges in a few seconds.

Edge-port features:
FeatureWhat it does
PortFastMoves an end-device port straight to forwarding, skipping the ~30 s of listening and learning (so DHCP isn't delayed)
BPDU GuardUsed with PortFast on access ports: error-disables the port if a BPDU arrives, so a switch plugged in there can't join STP or become root
Root GuardUsed on ports facing other switches, which legitimately send BPDUs: blocks the port if a BPDU claims a better root
MTU and Jumbo Frames:
  • MTU (Maximum Transmission Unit): Largest frame size allowed (standard Ethernet: 1500 bytes)
  • Jumbo frames: Larger MTU (typically 9000 bytes) for reduced overhead on storage/backup traffic
  • Must be configured consistently across entire path—MTU mismatch causes fragmentation or drops
See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•20 professional certifications