Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.5.1. Root Port, Root Bridge, and Other Port Names

💡 First Principle: STP needs a single "center" of the network to build a loop-free tree. The root bridge is that center—every other switch calculates its best path toward the root, and redundant paths get blocked. Understanding port roles is understanding how STP decides what stays open and what gets shut down.

Loading diagram...
Key Terms:
TermDefinition
Root BridgeSwitch with lowest Bridge ID; all traffic flows toward it
Bridge IDPriority (default 32768) + VLAN ID + MAC address
Root Port (RP)Best path to root bridge on non-root switches (one per switch)
Designated Port (DP)Best path away from root bridge on each segment
Blocked/Alternate PortRedundant port disabled to prevent loops
Root Path CostCumulative cost to reach root bridge
Root Bridge Election:
  1. Compare Bridge Priority (lower wins, default 32768, increments of 4096)
  2. If tied, compare MAC address (lower wins)

Path Cost values (IEEE revised, commonly tested):

Link SpeedSTP Cost
10 Mbps100
100 Mbps19
1 Gbps4
10 Gbps2

Port role selection process: Each non-root switch selects one Root Port (lowest root path cost). On each network segment, the port with the best path to root becomes the Designated Port. All other ports are blocked. When costs tie, the switch uses sender Bridge ID, then sender port priority, then sender port number as tiebreakers.

Set Root Bridge (Primary/Secondary):
Switch(config)# spanning-tree vlan 10 root primary      ! Sets priority to 24576
Switch(config)# spanning-tree vlan 10 root secondary    ! Sets priority to 28672
Switch(config)# spanning-tree vlan 10 priority 4096     ! Manual priority

⚠️ Exam Trap: STP root bridge election is non-preemptive. If you add a switch with a lower Bridge ID after the network converges, it WILL become root—this can disrupt your entire topology. Always set priorities explicitly on your intended root and secondary root switches.