Spanning Tree Protocol (STP)
An L2 protocol (Radia Perlman, 1985, IEEE 802.1D) that prevents loops in switched networks by logically blocking redundant links so the topology becomes a tree. Without STP, a single cable loop creates a broadcast storm that paralyzes the network.
Problem: switches forward broadcasts everywhere; a loop makes frames circulate forever and multiply → collapse. STP elects a "root bridge" and blocks ports until only one path remains; on failure, a backup link opens. Classic weakness: slow convergence (30-50 s in the original STP) → RSTP (802.1w) and later MSTP sped it up. Radia Perlman even wrote a poem about the algorithm. Modern criticism: STP "wastes" redundant links (blocked) → data centers prefer L3 + ECMP or fabric techniques (TRILL, SPB) that use all links.