Use it when a switch reaches the root over the wrong uplink, or to predict which uplink will forward and which will block.
Root Port · Rapid PVST+
A non-root bridge chooses one root port per VLAN by comparing received rapid spanning-tree information. Lowest accumulated root path cost wins; ties are broken using upstream sender Bridge ID, then sender Port ID and finally local receiving Port ID as needed. The root bridge itself has no root port for that VLAN.
1. show spanning-tree vlan 10 — the port with role Root.
2. Chosen by lowest root path cost, then sender bridge ID, then sender port ID.
3. The root bridge itself has no root port.
Compare path costs, upstream BIDs/port IDs and interface settings before tuning.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show spanning-tree interface <interface> detailShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational verification and known-good state Verify boundary
show spanning-tree vlan 10
show spanning-tree vlan 10 interface Gi1/0/1 detail
show spanning-tree pathcost method
The first command shows the role per port and, in the Root ID block, the total cost and the root port. The detail view shows what was received on that port — Designated path cost is the neighbour's cost to the root, to which the local Port path cost is added. The third confirms whether short or long costs are in use; a mix across switches gives surprising results.
Known-good: the intended uplink is Root FWD, the cost under Root ID equals the sum of port costs along that path, and the remaining uplinks are Altn BLK.
Step 2 Verification & troubleshooting Narrow the fault
1. show spanning-tree vlan <vlan> → the port with role Root; the Root ID block repeats it as Port together with the total Cost.
2. If it is not the uplink you expected, run show spanning-tree vlan <vlan> interface <uplink> detail for each uplink and note the designated path cost, designated bridge and designated port ID received there.
3. Add each port's own cost to the received cost. The lowest total wins; if totals are equal, apply the tie-breakers in order.
4. Change the value that decided, then repeat step 1.
Step 3 Failure signatures and troubleshooting branches Narrow the fault
- Wrong uplink is root port. One uplink negotiated a lower speed (100 Mb/s gives cost 19) or the switches use different path-cost methods. Check
show interfaces status. - Of two parallel links, the unexpected one forwards. The upstream port ID decided — normally the lower port number. Change
port-priorityon the upstream switch, or bundle the links into an EtherChannel. - Root port keeps changing. A flapping uplink or a link renegotiating speed; find the source with
show spanning-tree vlan <vlan> detail | include occurr|from. - Access switch says
This bridge is the root. It hears no BPDUs for that VLAN, usually because the VLAN is not allowed on the uplink trunk (show interfaces trunk). - Root port is
Root FWDbut traffic fails. Spanning tree is not the cause; look at the VLAN, the trunk and interface errors.
Step 4 When the problem is really fixed Narrow the fault
- The intended uplink is
Root FWDfor every VLAN it should carry. - The cost under Root ID is the expected sum for that path.
- Other uplinks are
Altn BLK. - Shutting the root port in a maintenance window moves the role to the alternate, and it returns after
no shutdown. - The topology-change counter is stable afterwards.
Step 5 Common mistakes Narrow the fault
- Changing port priority on the wrong switch (it is set on the upstream side).
- Unequal link costs causing unexpected root port choice.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
show spanning-tree vlan 10 → the port with role Root, and Cost/Port under Root ID. show spanning-tree vlan 10 interface <if> detail → designated bridge and port ID received on each uplink. show spanning-tree pathcost method → short or long costs; must match on all switches.
ReferenceWhat it is1 section · depth on demand
What it is
The root port is the one port on a non-root switch that leads toward the root bridge by the best path. Every non-root switch has exactly one per VLAN, and it is always forwarding. The root bridge itself has none.
ReferenceWhy it matters1 section · depth on demand
Why it matters
The root port is the uplink a switch actually uses: everything it sends toward the root — and usually toward the default gateway — leaves through it, while its other uplinks block. If the wrong uplink is chosen, for example a slower link or a path through another access switch, the network still works, only worse, and nothing raises an alarm. Reading the root port is how you see the real traffic path.
ReferenceImportant terms & boundaries4 sections · depth on demand
Key points
- Chosen in this order: lowest root path cost, lowest upstream bridge ID, lowest upstream port ID, lowest local port ID.
- Root path cost = the cost the neighbour advertises + the cost of the port the BPDU arrives on.
- Default (short) costs: 10 Mb/s 100, 100 Mb/s 19, 1 Gb/s 4, 10 Gb/s 2. With
spanning-tree pathcost method long, 1 Gb/s is 20000 and 10 Gb/s 2000 — use the same method on every switch. - Decided per VLAN: one trunk can be root port for VLAN 10 and alternate for VLAN 20.
- An EtherChannel is one logical port with one cost.
- To steer it, change the cost on the local port; for parallel links to the same switch, change port priority on the upstream switch.
In depth
Root port: each non-root switch's best path to the root
The Catalyst 9300 RSTP guide defines the root port as the port with the best (lowest-cost) path towards the root switch. Every non-root switch has exactly one root port per spanning-tree instance; the root bridge has none.
Selection order
| Step | Lowest wins |
|---|---|
| 1 | Total path cost to the root (the received cost plus the local port's cost) |
| 2 | Bridge ID of the neighbour sending the BPDU |
| 3 | Port ID of the sending port (priority, then number) |
| 4 | Local port ID |
C9300-ACC# show spanning-tree vlan 10
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Po10 Root FWD 2 128.2081 P2p
Po11 Altn BLK 2 128.2082 P2p
C9300-ACC(config)# interface Port-channel11
C9300-ACC(config-if)# spanning-tree vlan 10 cost 1
C9300-ACC# show spanning-tree vlan 10 | include Po1
Po10 Altn BLK 2 128.2081 P2p
Po11 Root FWD 1 128.2082 P2p
Both uplinks cost 2, so the neighbour's bridge ID decided. Lowering the cost on Po11 made it the root port.
Influencing the root port
| Tool | Command | Scope |
|---|---|---|
| Cost on the local port | spanning-tree [vlan <id>] cost <n> | Changes this switch's choice |
| Port priority on the upstream switch | spanning-tree [vlan <id>] port-priority <n> | Only matters with parallel links to the same neighbour |
| Root placement | root primary on the desired root | Changes the whole tree |
The guide lists port priority from 0 to 240 in steps of 16 (default 128).
Root port in RSTP convergence
During proposal and agreement, the port that receives the proposal is made the root port, and the switch syncs its other ports before agreeing. If the root port fails and an alternate port exists, RSTP moves the alternate to root and forwarding immediately.
Documented example, not captured output.
Worked example
Every non-root switch must decide which of its ports leads toward the root bridge, and that port becomes the root port. The decision is made by comparing the spanning-tree information received on each port, one criterion at a time, until one port wins:
1. Lowest accumulated path cost to the root.
2. Lowest Bridge ID of the neighbour that sent the BPDU.
3. Lowest port ID (priority + number) of the sending port.
4. Lowest local port ID.
Worked example: SW3 has two uplinks — Te1/1/1 to SW1 (the root, cost 2) and Te1/1/2 to SW2 (cost 2, and SW2 is itself cost 2 from the root). Te1/1/1 offers cost 2, Te1/1/2 offers 4, so Te1/1/1 becomes root port. If both uplinks went to the same upstream switch with equal cost, the upstream port priority decides — which is why port priority must be changed on the upstream switch, not the local one.
show spanning-tree vlan 20 | include Root|Te1/1
show spanning-tree pathcost method
Mechanics and state ownership
Each BPDU carries four things that matter here: the root ID, the sender's cost to the root, the sender's bridge ID and the sender's port ID. A switch that hears BPDUs on several ports adds the receiving port's cost to the advertised cost and compares the results.
The tie-breakers each cover a specific situation. Equal cost through two different upstream switches is settled by the lower upstream bridge ID. Two parallel links to the same upstream switch have the same cost and the same bridge ID, so the upstream port ID decides — and since that value belongs to the sending switch, port-priority has to be changed there, not locally. The local port ID is only reached when two local ports hear the very same upstream port, which needs a hub in between.
When the root port fails, RSTP does not start over: the alternate port with the next-best values becomes root port and forwards at once.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Lab switch; Rapid PVST+ (spanning-tree mode rapid-pvst); VLAN 10 exists.
! on this switch: make Gi1/0/2 the less preferred uplink for VLAN 10
interface GigabitEthernet1/0/2
spanning-tree vlan 10 cost 8
!
! on the upstream switch, for two parallel links: prefer its Gi1/0/2
interface GigabitEthernet1/0/2
spanning-tree vlan 10 port-priority 64Expected output
show spanning-tree vlan 10Expected state: One Root FWD port; Cost and Port under Root ID match it.
VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 4106
Address 0011.2233.4401
Cost 4
Port 1 (GigabitEthernet1/0/1)
Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 0011.2233.4410
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- ----
Gi1/0/1 Root FWD 4 128.1 P2p
Gi1/0/2 Altn BLK 4 128.2 P2p
Gi1/0/5 Desg FWD 4 128.5 P2p Edge
! Illustrative output, not captured Evidence.Gi1/0/1 is the root port with total cost 4 to the root. Gi1/0/2 also hears the root but through a worse path, so it is the alternate and blocks.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Switching → STP → RSTP — 802.1w → Rapid PVST+ → Root Port. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Quick lookup tables
Root Port operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for Root Port | Suspicious signature | Next proof |
|---|---|---|---|
| Intent | Matches root-port selection design | Configuration differs from peer/design | Compare effective config |
| Control state | Stable expected role/route/member state | the wrong uplink becoming root port, equal-cost paths breaking differently than expected, or the root port changing after cost/priority drift | Inspect protocol/RIB detail |
| Forwarding | Expected egress/Port-Channel/VLAN path | State exists but traffic path disagrees | FIB/MAC/adjacency |
| Closure | Original test passes for explained reason | Symptom merely moved or was bypassed | Regression test |