liveBook · Manning

Root port

As explained in Acing the CCNA Exam: Volume 1 Fundamentals and Protocols

Root port selection is the spanning-tree procedure for choosing the port on a non-root bridge that provides its best path toward the root bridge.

Root port selection is the STP procedure in which every non-root switch chooses one port as its best path toward the root bridge. The selected port normally forwards traffic and provides the switch’s only active path to the root, while redundant paths remain available for loop prevention. section 14.3.2 section 15.2.3

Evaluate candidate ports using these tie-breakers, in order:

  • Choose the port with the lowest root cost. Root cost represents the total cost of the path toward the root, not merely the local port’s cost; lower is better. section 14.3.2
  • If costs tie, choose the port connected to the neighbor with the lowest bridge ID (BID). section 14.3.2
  • If both cost and neighbor BID tie, choose the port connected to the neighbor’s lowest port ID. section 14.3.2
  • Use BPDU information for every comparison. The root bridge advertises root cost 0, and downstream switches add the cost of the receiving port before forwarding the BPDU. section 14.3.2

Worked selection

SW4 selects G0/0 because it has the lowest root cost. SW2’s G0/0 and G0/1 tie on cost, so SW2 chooses G0/1 because its neighbor, SW4, has the lower BID. SW1’s candidates still tie on cost and neighbor BID because both connect to SW3; SW1 then chooses G0/1 because it reaches SW3’s lower port ID, 128.1.

The root port is one stage of the STP algorithm: elect the root bridge, select one root port on each non-root switch, then select designated ports. Ports that do not win a role can be blocked to remove redundant Layer 2 paths. section 14.3 section 14.3.3

Figure 14.4 A LAN after STP has created a loop-free topology. SW3 is the root bridge, and each other switch has one root port leading to SW3. The remaining ports are either designated or non-designated ports; non-designated ports are blocked, disabling their connections.

Use the topology figure to trace each non-root switch’s single root-port path toward SW3 and distinguish forwarding ports from blocked redundant connections. section 14.3

How Acing the CCNA Exam: Volume 1 Fundamentals and Protocols covers it

How deep it goes
Works through BPDU-based cost calculation and two successive tie-breakers, stopping short of configuring selection directly.
Examples
Uses SW1, SW2, SW3, and SW4 scenarios to demonstrate cost, neighbor BID, and neighbor port-ID decisions.
What it assumes
Assumes familiarity with root bridge election and introduces selection through BPDU information and path cost.
What you can do after
Diagnose/debug with show spanning-tree by identifying the local root bridge, root port, role, state, cost, and port identifier.
How it connects
Connects root bridge, BPDU, root cost, bridge ID, port ID, designated port, and forwarding state.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 1 Fundamentals and Protocols. The section links point to the parts of the book it draws on.