Quiz Entry - updated: 2026.07.05
What is a root port, and how does STP (Spanning Tree Protocol) select it?
The root port is the port on a non-root switch that has the lowest-cost path (internal root path cost) to the root bridge.
* Root-port selection by lowest cumulative cost. *
Rules:
- Every non-root switch selects exactly one root port
- The root bridge itself has no root ports (it IS the root)
- The root port is the port closest to the root bridge in terms of cumulative path cost
How the cost is calculated: The internal root path cost = sum of all individual port costs along the path to the root bridge.
Worked example — switch S2 has two ways to reach root bridge S1:
- via Path 1: a direct, single 100 Mbps link — cost = 19 × 1 = 19
- via Path 2: indirectly through switch S3, over two 100 Mbps links — cost = 19 × 2 = 38
- Path 1 wins because 19 < 38, so the port facing Path 1 (e.g. F0/1) on S2 becomes the root port
(A single 100 Mbps link has an STP cost of 19; you add up the cost of every link along the path.)
Tip: Always trace the path and add up each segment's cost. The lowest total cost wins.
Go deeper:
Spanning-Tree Port Roles (NetworkAcademy.IO) — derives the single lowest-cost root port per non-root switch.