Back to Glossary Index
Loop PreventionDomain 2.0

STP Spanning Tree Protocol (IEEE 802.1D)

Unlike Layer 3 IP Packets which contain a TTL (Time to Live) field to destroy looping traffic, Layer 2 Ethernet Frames have no built-in mechanism to die. If a physical loop exists in a switch topology, a broadcast frame will circulate endlessly, multiplying until it creates a catastrophic "Broadcast Storm" that melts the network CPU. STP prevents this by mathematically disabling redundant links.

Port Roles

After the switches elect a Root Bridge (using BPDUs), the remaining switches evaluate the bandwidth cost to reach the Root and assign strict roles to their physical ports:

Port RoleFunction
Root Port (RP)Every non-root switch selects exactly one port as its Root Port. This is the interface that offers the lowest total bandwidth cost to reach the Root Bridge. It is always forwarding.
Designated Port (DP)Every collision domain (link) selects one Designated Port. This is the port permitted to forward traffic onto the segment. (Note: All ports on the Root Bridge are always Designated Ports).
Blocking PortIf a port is neither a Root Port nor a Designated Port, it becomes a Blocking (or Alternate) port. It receives BPDUs to monitor the link health, but strictly refuses to forward user data frames, successfully breaking the loop.

CCNA Exam Gotchas

[!]

The 50-Second Convergence Delay

Legacy 802.1D STP is notoriously slow. When a port turns on, it forces traffic to wait through a 15-second Listening phase, and a 15-second Learning phase. If a primary link fails, it takes 20 seconds just to notice (Max Age Timer). That is a total of 50 seconds of network downtime.

Modern networks bypass this issue by running Rapid Spanning Tree Protocol (RSTP - 802.1w) which converges in milliseconds, and by using spanning-tree portfast on endpoints to skip the timers entirely.

[!]

PVST+ (Per-VLAN Spanning Tree)

Cisco's proprietary implementation runs a completely separate mathematical instance of STP for every single VLAN. This allows engineers to perform load balancing: Switch A can be the Root Bridge for VLAN 10 (forwarding on the left link, blocking the right), while Switch B is the Root Bridge for VLAN 20 (forwarding on the right, blocking the left).