Routelearn.net
Course menu

Spanning Tree Protocol

A complete course on how switched networks keep spare links without loops. You'll learn why STP exists, and how to configure, protect and troubleshoot it on Cisco switches.

Intermediate · 24 lessons · Before this: Ethernet & Switching, VLAN

STP (Spanning Tree Protocol) is a Layer 2 protocol that lets switches with redundant links agree on a single loop-free path through the network. The switches exchange BPDUs, elect a root bridge and block the ports that would form a loop, unblocking them if an active link fails.

In simple terms: Spare cables between switches are useful, but they can make frames go round in circles forever. STP switches off just enough ports to stop the loops and turns them back on when a link breaks.

Spare links keep a network running when a cable or switch fails. But they also create switching loops, which can stop the whole network in seconds. Spanning Tree Protocol (STP) keeps the spare links and removes the loops. It blocks just the right ports, and unblocks them when something breaks.

DPRPDPRPDPALTSW1priority 24576SW2priority 32768SW3priority 32768PC APC B
  1. 1. One active path. Traffic follows the tree through the root bridge, SW1.
  2. 2. One backup path, blocked. The SW2–SW3 link is ready to use, but blocked, so there is no loop.
This three-switch network is used throughout the course.

About this course

First you'll learn the main idea: why STP is needed and what it does. Then you'll see how it works in the original Common Spanning Tree (CST): the steps it follows, port roles, states, timers and topology changes. Next comes Cisco's Per-VLAN Spanning Tree (PVST+) and how to tune it. After that you'll learn Rapid Spanning Tree (RSTP) and the guard features that protect the tree. Every lesson has animated diagrams, commands where needed, and practice questions. Two final labs bring it all together.

What you'll learn

Why STP exists

How spare links create loops between switches, and how STP stops the loops but keeps the spare links.

How STP operates

How switches choose a root bridge, port roles and port states, and how STP decides which paths stay open.

Configure and tune STP

Per-VLAN roots, cost and priority tuning, PortFast, UplinkFast and BackboneFast.

Protect the tree

BPDU Guard, Root Guard, BPDU Filter, Loop Guard and UDLD keep the network stable and safe.

Skills you'll gain

  • Spanning Tree Protocol
  • STP troubleshooting
  • PVST+ & RSTP
  • STP optimisation
  • Network redundancy
  • Layer 2 design
  • Loop prevention
  • Cisco STP configuration

Who is this for?

CCNA and CCNP students, and anyone working with Cisco switches. If you understand VLANs and basic switching, you're ready.

Start the first lesson →