Protocol in Code · Track

STP

root election, path cost, and port roles as the comparisons that kill Ethernet loops

5 sessions Course material (English)

Sessions

STP track sessions

Session 01

The Root Is the Lowest ID

Every bridge on a LAN could claim to be the root of the spanning tree. What single comparison decides which one actually is, and why does that comparison run backwards from every other election in this course?

Open Session 01
Session 02

Cost Decides the Path to Root

Every bridge now agrees who the root is (Session 01). If a bridge has more than one port that could eventually reach the root, which one does it pick, and what exactly gets added up along the way?

Open Session 02
Session 03

Ports Have Roles

A bridge knows the root (Session 01) and can compare paths and BPDUs (Session 02, and blocking.py). What role does each of its own ports end up with, and how many of those roles can be "the way to root" at once?

Open Session 03
Session 04

Blocking Is How Loops Die

Ethernet frames have no TTL, so a loop floods forever — what exact comparison decides which port stops forwarding, and why is that comparison enough to break every loop in the topology?

Open Session 04
Session 05

Build the Toy Spanning Tree Loop

What does convergence actually look like when root election, path cost, and blocking are wired into a round-by-round exchange between real bridge objects instead of four separate demos?

Open Session 05