STP Cost / Root Bridge
Sum the STP path cost of a route to the root (by link speed, short and long IEEE 802.1t/w cost) and find the root bridge by priority and MAC among several switches.
Per-link breakdown
Cost by speed table (IEEE)
| Speed | Short cost (16-bit) | Long cost (32-bit) |
|---|
How STP / RSTP works
Long cost IEEE 802.1t/w (RSTP/MST) uses 32 bits:
cost = 20·10¹² / bps. It is the default on modern gear.
Short cost Classic STP (16 bits) saturates early:
any link ≥ 10 Gb stays at 2, which is why long cost is preferred.
Path cost Each switch picks its root port by the lowest cumulative cost to the root (sum of the links on the path).
Bridge ID priority (16 bits) + MAC (48 bits).
Priority comes in multiples of 4096 (default 32768).
Lowest priority wins; on a tie, the lowest MAC.
Runs locally in your browser · no sign-up · nothing leaves your browser