Abstract


  • Eliminates loops in a network topology made of switches and cables (Ethernet), which can occur when multiple switches are connected in a redundant manner
  • The resulted paths form a tree, free of loops

Prevent crashing of the entire network

Ethernet has no TTL like IP packets, so a looping frame could literally go forever until the network dies.

As we have more and more looping frames in the network, we can crash the entire network!

STP is old!

STP was released in the 1980s, it has slow convergence times (~30secs), potentially causing temporary disruptions during topology changes.

We have RSTP for fast recovery, and MSTP for handling multiple VLANs efficiently. TRILL/SPB allows using all paths without loops (like smarter STP with load balancing).

Root Bridge

  • The central point in the STP topology, chosen based on priority (default 32768, but you can configure it) and MAC address

STP Port


Root Port

  • The port on each non-root bridge that provides the best path to the root bridge

Designated Port

Blocked Port

  • Redundant ports that are placed in a non-forwarding state to prevent loops

STP Port State

  • The state is different stages a switch port goes through while STP decides if it should forward traffic or stay blocked, to prevent loops

5 states

  1. Disabled: Port is turned off / admin shut down. Not part of the “tree”
  2. Blocking: Port is on, but only listens for BPDUs, no user traffic goes through which avoids loops while STP is deciding
  3. Listening: Port listens to BPDUs to figure out if it should forward or block. Still doesn’t forward user traffic yet
  4. Learning: Port begins learning MAC addresses (filling up the switch’s MAC table). Still doesn’t forward user traffic yet.
  5. Forwarding: Port is fully active. Forwards user traffic and still processes BPDUs.

Listening and learning take about 30secs before a port starts forwarding frames.

STP Workflow


STP Election

STP Path Calculation

STP Port Role Assignment

STP Traffic Forwarding