TechKnowSurge
Cisco CCNA 2.5 Cisco CCNA 1.13
InteractiveNetworkFree

STP Root Bridge Election Simulator

Work the spanning-tree algorithm one decision at a time - root bridge election, root path cost, root port and designated port tiebreakers, and which ports block.

Complete this interactive to capture a CTF flag worth 5 points.

About this interactive

Spanning tree is usually taught as a finished picture - a topology with every port already labelled root, designated or blocking - and the picture never shows which comparison produced which label. This drill runs the algorithm forwards instead, one decision per typed answer. It starts on the arithmetic the election rests on: the default priority of 32768, the 4096 increment that is the only step priority can move in, and the extended system ID that adds the VLAN number to every advertised value. Then it elects root bridges from tables of priorities and MAC addresses, including the cases students most often get backwards - the switch with the lowest MAC address in the room losing to one with a lower priority, and a per-VLAN priority that applies in one VLAN and not the next. Root path cost comes next, accumulated the way a switch actually accumulates it, by adding the local port cost to the cost that arrived in the BPDU, which is what makes a two-hop gigabit path cheaper than a single 100 Mbps link. Root ports are elected on lowest cost and then on the two tiebreakers in order, sender bridge ID and sender port ID, each with an item where that tiebreaker is the only thing deciding. Designated ports are settled per segment, and everything left over is shown going into the blocking state. Two full topologies are then worked from first comparison to last blocked port, so the rules are seen assembling a loop-free tree rather than only being recited.

What you'll learn

Aligned to

Cisco CCNA
2.5 Interpret basic operations of Rapid PVST+ Spanning Tree Protocol
1.13 Describe switching concepts

Key terms

Spanning Tree Protocol
STP
A network protocol that prevents loops in Ethernet networks by creating a loop-free logical topology.
Spanning Tree Algorithm
STA
The original loop-prevention algorithm developed by Radia Perlman that forms the basis of IEEE 802.1D STP, computing a loop-free logical tree topology over a redundant switched network. STA elects a root bridge and places redundant links in a blocking state to prevent loops.
Bridge Protocol Data Unit
BPDU
A data message exchanged between switches running Spanning Tree Protocol to detect network loops and elect a root bridge. BPDUs contain the sending switch's BID and path cost information used to build the loop-free spanning tree.
Bridge ID
BID
A unique identifier used in the Spanning Tree Protocol consisting of a configured priority value and the bridge's MAC address. The BID is used in STP elections to determine which switch becomes the root bridge.
Bridge Priority
A configurable numeric value within the Bridge ID, defaulting to 32768 and incrementing in multiples of 4096, used to influence which switch is elected as the root bridge in STP.
Extended System ID
A component of the Bridge ID that encodes the VLAN identifier, allowing separate STP root bridge elections to be held on a per-VLAN basis.
Root Bridge
The switch elected as the reference point for the Spanning Tree Protocol topology, determined by the switch with the lowest Bridge ID (priority + MAC address). All other switches calculate their best path to the root bridge and block redundant links to create a loop-free tree.
Root Port
The port on a non-root switch that provides the least-cost path to the root bridge.
Designated Port
DP
In STP, the port on each network segment that provides the best path to the root bridge and is placed in a forwarding state. Each segment has exactly one designated port, which is selected based on the lowest cumulative path cost to the root.
Non-Designated Port
An STP port role that is blocked to prevent loops, maintained in a non-forwarding state based on STP information received from neighboring switches.
Alternate Port
A switch port that is not elected as a root port or designated port and is placed in a blocking state to prevent loops, serving as a backup path.
Blocking State
An STP port state in which a port does not forward frames but still receives BPDUs, preventing network loops in redundant topologies.
Path Cost
A value assigned to a switch port based on link speed, used by STP to determine the shortest path to the root bridge.
Root Path Cost
The cumulative cost calculated by a switch to reach the root bridge, based on the speed of each link along the path.
Port ID
A two-byte STP identifier assigned to each switch port, consisting of a priority value and an interface number, used as a tiebreaker when selecting a root port.
MAC Address
A 48-bit hardware address assigned to a network interface and written as six hexadecimal octets, such as 00:1A:2B:3C:4D:5E. It identifies a device uniquely on a local network segment, and switches forward frames by looking it up in their MAC address table.

Topics

Interactive Calculation Spanning Tree Switching Stp

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →