OSNTC.019: Spanning Tree Protocol (STP) — Loops, Root Bridge, BPDUs, Port Roles, and RSTP

Realistic Ethernet network switch with connected cables representing Spanning Tree Protocol and redundant switched links.

Spanning Tree Protocol (STP) is a Layer 2 protocol that prevents Ethernet switching loops while still allowing redundant physical links to exist. Redundancy is valuable because a backup cable can keep a network online after a failure, but two active Layer 2 paths can also create a loop that repeatedly circulates broadcast and unknown-unicast frames. STP solves that problem by building a loop-free logical topology on top of a physically redundant network.

PowerCert Animated Videos — Spanning Tree Protocol explained with switching loops, broadcast storms, BPDUs, root bridge selection, and blocked paths.

Why a Layer 2 Loop Is Dangerous

An Ethernet frame does not have the same hop-count protection that an IP packet gets from TTL. If redundant links create a loop between network switches, a broadcast such as an ARP request can be flooded from switch to switch repeatedly. The result can be a broadcast storm, duplicate frames, unstable MAC address tables, high switch CPU load, and eventually a network that becomes nearly unusable.

INE — Understanding and Implementing Spanning Tree Protocol, including why Layer 2 loops and broadcast radiation are dangerous.
Realistic network switch with connected Ethernet cables representing redundant Layer 2 links and Spanning Tree Protocol.
Redundant Ethernet links improve availability, but STP is needed to keep Layer 2 redundancy from becoming a forwarding loop. Photo by Manuel Luikenga on Unsplash.

BPDUs Are the Messages Switches Use to Build the Tree

STP switches exchange Bridge Protocol Data Units (BPDUs). Cisco’s current STP documentation explains that BPDUs carry information including the root bridge ID, path cost to the root, sending bridge ID, interface information, and protocol timers. Switches compare this information and agree on one logical tree. The protocol therefore depends on switches communicating their view of the topology instead of each switch making an isolated forwarding decision.

Cisco’s STP configuration guide describes this BPDU exchange directly, while Juniper’s STP overview describes the same root-election and path-cost process from the RSTP perspective.

Network Direction — Cisco CCNA Spanning Tree BPDUs and the Root Bridge.

The Root Bridge Is the Reference Point

STP elects one switch as the root bridge. The switch with the lowest Bridge ID wins. Bridge ID selection includes bridge priority and a MAC-derived identifier; if priorities are equal, the lower identifier breaks the tie. Every non-root switch then calculates its best path toward that root. In a planned enterprise network, engineers normally want a predictable distribution or core switch to become root instead of leaving the result to chance.

Network Warriors — STP root-bridge election, Bridge ID, root ports, designated ports, and alternate paths.

Root, Designated, and Alternate Ports Have Different Jobs

On each non-root switch, the root port is the port with the best path toward the root bridge. On each Ethernet segment, a designated port is selected to forward traffic toward that segment. A redundant port that would create a loop is placed into a non-forwarding role. In Rapid Spanning Tree terminology, an alternate port can remain ready as a backup path. This is the key idea: STP does not physically remove redundancy; it decides which redundant path must temporarily stop forwarding.

Jeremy’s IT Lab — Analyze a real STP topology and identify root, designated, and non-designated ports.

Path Cost Decides Which Link Is Better

STP assigns a path cost to links and adds those costs along the path toward the root bridge. Lower total cost is preferred. Faster links generally receive more favorable default costs, although administrators can tune cost when a specific traffic path is desired. Path cost is why a network with several physical routes can still choose one deterministic forwarding path while leaving another route available for failure recovery.

Network Direction — Spanning Tree root-port selection and path-cost calculation.

RSTP Converges Faster Than Classic STP

Rapid Spanning Tree Protocol (RSTP) improves recovery after topology changes. Classic IEEE 802.1D STP used slower timer-driven transitions, while RSTP introduced faster negotiation and clearer alternate-path behavior. Modern enterprise switches commonly use RSTP or vendor implementations based on it. The technician still needs the same foundation—root bridge, BPDUs, path cost, and port roles—but should expect modern networks to converge more quickly after a link failure.

Jeremy’s IT Lab — Rapid Spanning Tree Protocol, Rapid PVST+, port roles, states, BPDUs, and CLI verification.

STP Works Alongside VLANs and Physical Ethernet

STP lives at Layer 2, so it directly interacts with the Ethernet frames, switch ports, trunks, and VLANs already covered in this course. Depending on platform and mode, a switch may run one spanning tree for the network, separate instances per VLAN, or multiple VLANs mapped into shared spanning-tree instances. Before troubleshooting STP, always confirm that the physical link itself is healthy using the copper-cabling and link-negotiation checks from OSNTC.017 and OSNTC.018.

Jeremy’s IT Lab — Configuring STP (PVST+) and verifying spanning-tree behavior on VLAN-aware Cisco switches.
A current CCNA community discussion on why classic STP remains the foundation for understanding RSTP and modern spanning-tree behavior.

Basic Technician Verification

When troubleshooting a switched network, verify the topology before changing configuration. On Cisco IOS-style switches, show spanning-tree is the fundamental command. Confirm which switch is root, the local root path cost, each port role and state, and whether topology changes are occurring unexpectedly. If a redundant port is blocking, that can be completely normal. The problem is not that STP blocked a path; the problem is when the tree is different from the intended design or changes repeatedly.

Pedro Lino Cáceres — Physical Cisco-switch demonstration of STP, show spanning-tree, MAC flapping, and a real broadcast storm when STP is disabled.

Simple Lab

  1. Build three switches in a triangle in Cisco Packet Tracer or another lab environment.
  2. Connect a PC to two different switches so traffic has redundant switch paths available.
  3. Run show spanning-tree on each switch.
  4. Identify the root bridge.
  5. Identify each root port, designated port, and blocking or alternate port.
  6. Disconnect one active inter-switch link and observe which backup path transitions to forwarding.
  7. Reconnect the link and watch the topology reconverge.
Network Direction — How Spanning Tree works through topology calculation, blocking, topology changes, and port states.

Knowledge Check + Answers

  1. Why does STP exist? To prevent Layer 2 switching loops while preserving redundant physical links.
  2. What is a BPDU? A Bridge Protocol Data Unit used by switches to exchange STP topology information.
  3. What is the root bridge? The switch elected as the logical reference point for the spanning-tree topology.
  4. What does a root port do? It is the non-root switch port with the best path toward the root bridge.
  5. What does a designated port do? It is the forwarding port selected for a Layer 2 segment.
  6. Why might a healthy port be blocking? STP may intentionally block a redundant path to prevent a loop.
  7. What is RSTP? Rapid Spanning Tree Protocol, a faster-converging evolution of classic STP.

Elementary Conclusion

The easiest way to remember STP is: keep the backup cable, but block the loop. Switches exchange BPDUs, elect a root bridge, calculate the best paths, forward on the required ports, and hold redundant ports in reserve. If an active path fails, the topology can reconverge and use a backup. For a technician, the first questions are always: Who is root? Which ports are forwarding? Which port is blocked? Did the topology recently change?

Formip — A 2026 real-world outage walkthrough connecting broadcast storms, show spanning-tree, root bridge selection, BPDUs, and access-port protections.

Prior Networking Lessons

Editor’s Note

Featured image: User_Pascal via Unsplash, cropped to exactly 1200×630. Body image: Manuel Luikenga via Unsplash. Technical references include current Cisco and Juniper STP documentation. Every YouTube embed is distinct and directly related to the lesson section it follows. The social-media embed is directly about STP/RSTP field troubleshooting and root/port-role verification.

Support and donation options are available through BitcoinVersus.Tech.

BitcoinVersus.Tech is not a financial advisor. Content is provided for informational and educational purposes.

Leave a comment