Quiz Entry - updated: 2026.07.05
What is the Spanning Tree Protocol (STP) and how does it solve the Layer 2 loop problem?
STP is a loop-prevention protocol that creates a loop-free Layer 2 topology while still allowing physical redundancy.
* Loop-free tree after STP blocks redundant links. — GhosT, CC BY 3.0, via Wikimedia Commons. *
STP works by logically blocking certain ports on switches so that only one active path exists between any two devices. The physical links are still there — they're just not forwarding data frames.
Key behaviors:
- Allows redundant physical connections (for failover)
- Logically disables redundant paths to prevent loops
- Blocked ports still receive BPDUs (Bridge Protocol Data Units — control messages) but don't forward user data
- Defined in IEEE 802.1D
In the diagram, S2's port connecting to Trunk2 is blocked (shown with an X). Frames from PC1 travel through S3 → S1, not through the direct redundant link. S2 drops frames received on the blocked port.
Go deeper:
Spanning Tree Protocol (Wikipedia) — canonical end-to-end reference: loop prevention, BPDUs, root election, port states and all variants in one place.