🌐

STP Overview and Fundamentals

Jul 23, 2025

Overview

This lecture covers the fundamentals of Spanning Tree Protocol (STP), its types, problems it solves in switching environments, and how it operates to prevent network loops.

Introduction to STP

  • Spanning Tree Protocol (STP) prevents loops in redundant switch networks.
  • The main STP versions: standard STP (802.1D), PVST (Cisco's per-VLAN STP), Rapid STP (802.1w), and Rapid PVST.
  • STP is essential for network efficiency and preventing issues in large, VLAN-rich networks.

Problems Solved by STP

  • Without STP, network loops cause broadcast storms—uncontrollable, repeated broadcast frame flooding.
  • Switching loops can cause unstable MAC address tables due to continuous updates from looping frames.
  • Duplication of frames occurs, confusing endpoint devices and congesting the network.

How STP Works: High-Level Steps

  • Elect a root bridge (the main switch for STP decisions).
  • All root bridge interfaces are set to forwarding state.
  • Each non-root switch chooses a root port (best path to the root bridge).
  • Remaining links identify designated ports (best cost to the root on each network segment).
  • All other ports become blocked ports to prevent loops.

STP Port Roles and States

  • Root port: best path to reach the root bridge.
  • Designated port: best cost port to the root bridge on each segment.
  • Non-designated (blocked) port: all other ports, placed in a blocking state.
  • Port states: Disabled (shut), Blocking (not forwarding), Listening (not forwarding/learning), Learning (learning MACs, not forwarding), Forwarding (normal operation).

STP Election Process and Port Cost

  • Root bridge elected based on lowest Bridge ID (priority + MAC address).
  • Switches exchange Bridge Protocol Data Units (BPDUs) to share Bridge IDs.
  • Port cost is based on link speed; newer standards use updated cost metrics.
  • Tiebreakers for best path: neighbor Bridge ID, port priority, port number.

STP Timers and Convergence

  • Hello timer: 2 seconds (interval between BPDUs).
  • Max Age: 20 seconds (how long to wait before acting on lost BPDUs).
  • Forward Delay: 15 seconds (time spent in listening and learning states each).
  • Total convergence time can be up to 50 seconds, causing temporary network downtime.

Improving Convergence

  • Rapid STP (802.1w) offers faster convergence, recommended for modern networks.
  • Features like PortFast and BPDU Guard can help on access ports (not covered in detail).

Key Terms & Definitions

  • STP (Spanning Tree Protocol) — A protocol that prevents switching loops.
  • Root Bridge — The central switch chosen by lowest priority and MAC address.
  • BPDU — Bridge Protocol Data Unit; used by switches to share STP information.
  • Port Cost — Numerical value assigned to each port, based on link speed.
  • Broadcast Storm — Excessive broadcast traffic due to looped frames.
  • Port Roles — Root port, designated port, non-designated (blocked) port.
  • Port States — Disabled, Blocking, Listening, Learning, Forwarding.
  • Convergence — The process of STP stabilizing the network after changes.

Action Items / Next Steps

  • Review and memorize port costs and STP port roles.
  • Practice the STP election and convergence process with diagrams.
  • Prepare for further study on Rapid STP and STP enhancements.