Table of Contents
Spanning Tree Protocol (STP) prevents Layer 2 loops when switches have redundant links. It allows one logical forwarding path through the network and keeps some links from forwarding ordinary traffic until they’re needed.

How switches agree on a loop-free path
Switches exchange Bridge Protocol Data Units, or BPDUs, to elect a root bridge and determine paths toward it. Paths that would create a loop can stay physically connected while their alternate ports block normal traffic. If a forwarding link fails, STP can recalculate the topology and use a backup path.

Classic STP and Rapid STP port states
Classic STP uses blocking, listening, learning, forwarding, and disabled states. A learning port can record source MAC addresses without forwarding user frames. Rapid STP groups the non-forwarding and non-learning states into discarding and can converge faster when the switches and topology support it. See Cisco’s RSTP explanation.
Check the topology before changing settings
Map the switch-to-switch links and decide where the root bridge belongs. On a Cisco switch, show spanning-tree can report the root and port states. Compare what you see with the expected topology, then test failover during an appropriate maintenance window. A blocked redundant port can be normal. Repeated topology changes deserve investigation.

If you run multiple VLANs, check which spanning-tree instance each uses. See how VLANs work on Cisco switches for background.
Reader Comments 0
Sign in with email or Google to join the discussion.