Spanning Tree Protocol
Course Contents
1. Introduction to Spanning Tree Protocol
The Spanning Tree Protocol is a well known protocol that have a huge task to achieve. This task is to make sure we never have a network loop in our network.
Why would we have a network loop ?
In a typical network topology you can have multiple path leading to a destination and having multiple path can be dangerous. Let’s me show you with the example below:
How Loops Happen
Imagine a simple network with three interconnected switches (SW1, SW2, SW3) and two devices (PC1 and PC2).
Each switch is linked to the others for redundancy. In this setup:
- PC1 sends a broadcast request (ARP request to communicate with PC2).

2. The switches forward the broadcast to all ports excluding the one it arrived.

3. SW2 and SW3 receive the broadcast and again send this broadcast to all of theirs ports, creating a network loop.

2. Why Loops Are a Problem
Loops can cause severe network disruptions:

- Broadcast storms: Endless circulation of broadcast frames saturates the network, leaving no bandwidth for legitimate traffic.
- MAC table instability: Switches struggle to learn the correct location of devices, leading to unpredictable behavior.
- Network crashes: Excessive traffic overwhelms the network, potentially causing devices to disconnect.
3. How STP Stops Loops
The Spanning Tree Protocol (STP) solves the problem of loops by blocking redundant paths. In any network segment where multiple paths exist, STP determines the best path and temporarily disables the others.

By doing so:
- Loops are eliminated: Only one active path is used for communication.
- Backup paths remain available: If the active path fails, a blocked path is automatically activated to maintain connectivity.
- Network performance is stabilized: STP ensures efficient traffic flow without disruptions.

Now that we understand the importance of STP in preventing network loops, let’s dive deeper into the foundational concepts in How Spanning Tree Protocol Works.