STP/RSTP Loop Prevention and Bridge Roles
Key Takeaways
- STP prevents Layer 2 loops by blocking redundant paths while keeping backup paths available.
- RSTP provides faster convergence than original STP while keeping the same basic loop-prevention purpose.
- The root bridge is the logical center of the spanning tree and should be intentionally selected in production networks.
- Port roles and states explain why one redundant link forwards while another blocks or discards.
- Loop symptoms include broadcast storms, MAC table instability, high CPU, and widespread switching outages.
Layer 2 Ethernet has no TTL field like IP. If a physical switching loop exists, broadcasts and unknown unicast frames can circulate and multiply. Spanning Tree Protocol prevents that by creating a loop-free logical topology.
Why STP Exists
| Problem | Result without STP |
|---|---|
| Redundant switch links | Frames can loop indefinitely |
| Broadcast frames | Broadcast storm can consume bandwidth and CPU |
| MAC learning on multiple ports | MAC address table flapping |
| Unknown unicast flooding | Excessive traffic across the switching domain |
STP lets you build redundant physical paths while blocking selected logical paths. If the active path fails, a blocked path can transition and restore connectivity.
STP and RSTP
| Feature | STP | RSTP |
|---|---|---|
| Standard family | 802.1D | 802.1w |
| Main purpose | Prevent loops | Prevent loops with faster convergence |
| Convergence | Slower | Faster |
| Exam focus | Root bridge, blocked ports, loop prevention | Faster recovery and similar roles |
RSTP is generally the better modern answer when a scenario asks for faster Layer 2 convergence and the environment supports it.
Bridge ID and Root Bridge
Switches elect a root bridge. The bridge ID includes priority and MAC address. The lowest bridge ID wins.
| Factor | Selection impact |
|---|---|
| Bridge priority | Lower priority is preferred |
| MAC address | Tie-breaker when priorities match |
| Root bridge placement | Should be a central, stable switch |
| Unplanned root | Can cause inefficient paths |
In PBQs, if the root bridge is an access switch in a closet, the likely fix is to set a lower priority on the intended core or distribution switch.
Port Roles and States
| Role or state | Meaning |
|---|---|
| Root port | Best path from a non-root switch toward the root bridge |
| Designated port | Forwarding port for a network segment |
| Alternate port | Backup path that can replace a root port |
| Blocking/discarding | Does not forward user traffic to prevent loops |
| Forwarding | Sends and receives normal traffic |
| Edge port | Port connected to an endpoint, not another switch |
Different vendor outputs use slightly different labels, especially between STP and RSTP. The exam usually tests the concept: a redundant path may be intentionally non-forwarding.
Loop Symptoms
| Symptom | Why it points to a loop |
|---|---|
| Network-wide slowness after adding a switch | Broadcast storm or loop introduced |
| MAC address appears on multiple switch ports repeatedly | MAC table flapping |
| Switch CPU spikes | Control plane overwhelmed by Layer 2 churn |
| All VLANs on a switch become unstable | Trunk loop or redundant path issue |
| Link lights blink constantly with little useful traffic | Flooding or storm condition |
PBQ Guidance
If the PBQ shows redundant links:
- Identify the intended root bridge.
- Confirm all switches run compatible STP/RSTP settings.
- Expect one redundant path to block or discard.
- Use edge-port features only on endpoint ports.
- Do not disable STP to make a blocked link forward.
Common Traps
| Trap | Better reasoning |
|---|---|
| Assume a blocking port is broken | It may be preventing a loop |
| Disable STP because a redundant link is unused | That can create a broadcast storm |
| Let access switches become root bridge | Root should usually be planned near the network core |
| Enable edge-port behavior on switch-to-switch links | Edge settings belong on endpoint-facing ports |
| Troubleshoot Layer 3 first during a broadcast storm | Stabilize Layer 2 before routing tests are meaningful |
What is the main purpose of STP?
Which switch becomes the STP root bridge?
Which symptoms commonly suggest a Layer 2 loop? Select two.
Select all that apply