Spanning Tree Protocol (STP & RSTP)
STP (IEEE 802.1D) and RSTP (IEEE 802.1w) are Layer 2 loop-prevention network protocols that block redundant switch links to create a loop-free logical topology.
STP prevents Layer 2 loops by blocking redundant switch ports. Lowest Bridge ID wins Root Bridge election.
In Simple Terms
Visual Diagram & Flow
Without STP, any redundant switch cabling creates instant Layer 2 broadcast storms and CAM table instability.
How It Works (Technical Breakdown)
Traffic lights at a 4-way intersection. If all lights were green simultaneously, cars would crash (broadcast storm). STP sets redundant paths to RED (blocking) until a main road is closed.
Three switches (SW1, SW2, SW3) connected in a loop. SW1 (Priority 4096) is elected Root Bridge. The link between SW2 and SW3 is automatically blocked on port Gi0/2. If SW1-SW2 cable is cut, Gi0/2 immediately transitions to Forwarding.
Leaving switch STP priority at default (32768), allowing an old, slow access switch to accidentally win the Root Bridge election.
Prerequisites
Next & Related Concepts
Explore the complete curriculum roadmap.Concept Mastery Quiz
Test your comprehension with active-recall questions.
Active Recall Flashcards
Click each flashcard to reveal the answer and test your memory.
Content Versioning
Audit trail of revisions and updates for this knowledge topic.
| Version | Change Summary | Author | Timestamp |
|---|---|---|---|
| v1 (Current) | Active production content | system | Sun, Aug 23, 2026 11:09 AM |