Course contents

Chapter 6: Spanning Tree ProtocolLesson 4 of 25

Introduction to Common Spanning Tree (CST)

One spanning tree for the whole switched network, whatever the VLANs.

Intermediate · 5 min read

Technical definition

CST (Common Spanning Tree) is the single spanning-tree instance defined by the original IEEE 802.1D standard and shared by all VLANs. Because there is only one tree, a port blocked to prevent a loop is blocked for every VLAN, and all VLANs follow the same path to the root bridge.

Two facts about Ethernet that make loops deadly

  1. Switches copy broadcasts everywhere. A broadcast is for every device in the VLAN. So a switch sends a copy out of every port, except the port it came in on.
  2. Ethernet frames never expire. They have no TTL (time to live) like IP packets do. So nothing stops a frame that keeps travelling.

Put these two facts together in a network with a loop. One broadcast is copied again and again, forever. This is a broadcast storm. It only ends when a device crashes or someone pulls a cable. So a switched network must never have an active loop.

From no redundancy to too much

Early Ethernet networks were simple chains of switches with no backup links, so they had no loops. But as companies came to depend on the network, having no backup became a problem.

Diagram
Two buildings joined by one link, then two
Two buildings joined by one link, then two
link 1link 2 (backup)SW1Building 1SW2Building 2UsersServers

Device key: SW1, SW2 (switch) · Users (computer)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.

  1. 1. One link between buildings: it works. But if that cable is cut, users can't reach any server.
  2. 2. So a second link is added… …and now the two switches form a loop. A broadcast from SW1 goes over both cables, comes back over the other one, and goes round forever.

Engineers needed a way to keep the backup cable connected without creating a loop. The answer was the Spanning Tree Protocol. It became the standard IEEE 802.1D in 1990. It made large switched networks with backup links possible.

Common looped shapes

Many people think a loop needs three or more switches. But two cables between the same two switches already make a loop. Bigger networks are made of these shapes:

ShapeLoop formed byPorts STP blocks
Pair with two linksTwo parallel cables1
TriangleThree switches, three links1
SquareFour switches, four links1
Square with a diagonalTwo overlapping loops2

The rule: STP blocks one port for every extra path. This leaves exactly one working path between any two switches.

Loops in real networks are often accidental. A patch cable plugged from one wall socket into the socket beside it, both patched to the same switch, makes the two-link shape from the first row of the table.

One cable forwards, the other waits

Diagram
STP blocking the backup link between two buildings
STP blocking the backup link between two buildings
activeSW1Building 1SW2Building 2UsersServers

Device key: SW1, SW2 (switch) · Users (computer)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type. Blocked: forwarding prevented by a port or policy. Down: failed link. Read the step for the cause.

  1. 1. One active path. STP blocks one end of the second cable, so there is no loop.
  2. 2. The backup waits. If the active cable fails, STP unblocks the second one.

Why "Common" Spanning Tree?

The original standard builds one tree for the whole network. Every VLAN shares that one tree. So if a port is blocked, it is blocked for all VLANs at once:

Diagram
Common Spanning Tree: every VLAN uses the same tree
Common Spanning Tree: every VLAN uses the same tree
DPRPDPRPDPBLKidle for all VLANsSW1SW2SW3VLAN 10EmployeeVLAN 20Guest

Device key: SW1, SW2, SW3 (switch) · Employee, Guest (computer)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type. Blocked: forwarding prevented by a port or policy. Down: failed link. Read the step for the cause.

  1. 1. VLAN 10 uses the tree… Employee traffic goes up to the root, SW1.
  2. 2. …and so does VLAN 20. Guest traffic takes the same tree.
  3. 3. The backup link sits idle. SW2–SW3 is blocked for every VLAN. Its bandwidth is wasted until something fails.
Diagram
Why "Common" Spanning Tree?
Why "Common" Spanning Tree?
AdvantageLimitation
Simple: one tree to understandNo load balancing: blocked links are idle for every VLAN
Little work for the switch: one set of BPDUsOne root for all VLANs, so some VLANs take long paths
Standard: every vendor supports itSlow convergence: 30–50 seconds
Each item on the left, with what it means on the right.

CST is old now. It has been replaced by Per-VLAN Spanning Tree (PVST+), Rapid Spanning Tree (RSTP) and MST. Modern Cisco switches don't run plain CST at all. They run PVST+, Rapid PVST+ or MST. But all of these use the same basic steps, roles and timers. That's why the rest of the Common Spanning Tree lessons studies the original in detail. (When Cisco PVST+ switches connect to switches that run only one standard tree, they use VLAN 1 to work together.)

Test yourself on loops and CST

Predict · scenario 1

Two switches are connected by two cables and nothing else. Is that a loop?

Predict · scenario 2

With Common Spanning Tree, a link is blocked for VLAN 10. What about VLAN 20 on the same link?