Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Root Port · Spanning Tree Fundamentals

Direct answer

A root port is the one port on each non-root switch with the lowest total cost to the root bridge. It forwards and points towards the root.

When to use this

Use it when traffic leaves a switch on an unexpected uplink, or to predict which uplink will forward.

First 30 seconds

1. show spanning-tree vlan <id> — which port is Root?

2. Compare the cost each uplink offers: root cost in the BPDU + the local port cost.

3. Tie → the uplink towards the lower neighbour bridge ID wins.

4. Change the choice with spanning-tree vlan <id> cost <n> on the local port.

5. Check again — the intended uplink is now Root.

Operational verification

BPDUs received on each uplink → advertised root cost + local port cost → lowest total wins → tie-breakers if equal → root port forwards

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · IOS/IOS XE
Key commandshow spanning-tree [vlan vlan-id]
Scope / prerequisiteUse it when traffic leaves a switch on an unexpected uplink, or to predict which uplink will forward.
Show · 1
What next?3 suggested next steps
Catalog command links1
Evidence1
On this pageJump to a specific section
Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

6 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification and known-good state Verify boundary

To verify, first show the expected root ID—otherwise root-port analysis starts from the wrong premise. On the downstream bridge, inspect all candidate uplinks for the same VLAN/instance and compare role, state and path cost. Trace the selected root port to the next bridge and repeat until reaching the root. If two paths appear equal, inspect the upstream sender bridge/port identifiers and any local port-priority values. Confirm the chosen port is forwarding and that the alternate is in the expected non-forwarding role. Then validate MAC learning and the actual traffic path; a correct STP role can coexist with a separate VLAN or EtherChannel problem.

Step 2 Verification & troubleshooting Narrow the fault

On a non-root switch, inspect show spanning-tree vlan <vlan> and verify the Root FWD port, its cost, and the upstream topology.

Step 3 Diagnosis Narrow the fault

Root Port — discriminating diagnosis for Switching → STP → Spanning Tree Fundamentals → Root Port. Use this chain of steps: Concrete boundaries: physical/link/VLAN → BPDU reception → root/instance calculation → port role → forwarding state → MAC learning → target VLAN path → original frame/return path. IF the stable identity (physical/logical interface, VLAN or MST instance, peer system/port identity and source/destination MAC) cannot be matched between adjacent layers, stop and correct scope before interpreting downstream absence. ELSE IF the object is transitional (RSTP proposal/agreement or DTP negotiation while counters/state progress toward forwarding), inspect the responsible timer/retry/sequence/queue and show whether it progresses. ELSE IF the owner looks known-good (the switchport mode is as designed, the intended VLAN is admitted, STP role/state matches design and MAC learning follows the expected logical path), verify the next consumer/effective state rather than repeating the same local check. A broken signature is suspended/individual member, VLAN missing or native mismatch, unexpected root/role, blocking when forwarding is required, or MAC movement on the wrong path It is a candidate boundary, not automatic root cause.

Step 4 Failure signatures and troubleshooting branches Narrow the fault

If the “wrong” uplink wins, look for manually configured cost, different link speeds, port-channel versus physical-port interpretation, per-VLAN cost differences or a changed upstream topology. If the expected root port is blocking/inconsistent, inspect Loop Guard, Root Guard, BPDU Guard/Filter and unidirectional-link symptoms before forcing forwarding. An uplink flap can cause a legitimate temporary role transition, so correlate state with topology-change timing. Avoid changing STP cost until you can state the intended winner and backup path; otherwise you can move the problem or create asymmetric Layer-2 load patterns across VLANs. Compare the peer-side designated-port state as well; a local role without matching upstream context can hide a one-way BPDU or topology problem.

Step 5 When the problem is really fixed Narrow the fault

Closure means the intended root port wins deterministically for the exact instance, its forwarding state is healthy, the alternate path is coherent and the original VLAN traffic follows a loop-free path. If cost/priority was changed, verify the backup behavior under an approved controlled failure or at minimum validate the alternate’s role/state and no new inconsistency. A root-port label shows only the local STP decision, but it does not show the physical member quality, trunk allowed VLANs, remote MAC learning or end-to-end application flow. Recheck the role after the topology has been stable long enough for normal convergence and confirm the upstream designated port agrees with the intended path. If the change affected cost on one VLAN or instance, inspect an adjacent instance as a regression boundary so per-VLAN tuning has not silently inverted another path.

Step 6 Common mistakes Narrow the fault
Evidence references

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.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

Lowest root path cost wins; ties are broken by the lowest neighbour bridge ID, then the lowest neighbour port priority and port number. The cost is the sum of port costs on the way to the root, counted on the receiving ports. The root bridge has no root port.

Key checks
  • show spanning-tree vlan <id> — root ID, local bridge ID, and each port's role, state and cost.
  • show spanning-tree root — the root bridge, root cost and root port per VLAN.
  • show spanning-tree vlan <id> detail — BPDUs sent and received, topology changes and their source.
  • show spanning-tree summary — mode, enabled features and port counts per state.
  • show spanning-tree inconsistentports — ports blocked by root guard, loop guard or type inconsistency.
ReferenceWhat it is1 section · depth on demand

What it is

The root port is the single best port on a non-root switch toward the root bridge for a given tree.

ReferenceWhy it matters1 section · depth on demand

Why it matters

Use root-port reasoning to determine the preferred upstream Layer 2 path and explain why one redundant uplink forwards while another does not.

ReferenceHow it works1 section · depth on demand

How it works

Root Port — state ownership for Switching → STP → Spanning Tree Fundamentals → Root Port. Identity to preserve: physical/logical interface, VLAN or MST instance, peer system/port identity and source/destination MAC Owner sequence: STP/RSTP/MST receives BPDUs per port/VLAN or instance, elects a root and root path, assigns port roles, and places ports into forwarding/discarding states. Known-good: the switchport mode is as designed, the intended VLAN is admitted, STP role/state matches design and MAC learning follows the expected logical path Transitional: RSTP proposal/agreement or DTP negotiation while counters/state progress toward forwarding Broken: suspended/individual member, VLAN missing or native mismatch, unexpected root/role, blocking when forwarding is required, or MAC movement on the wrong path Do not collapse configured/requested state, owner state, programmed/effective state and workload outcome into one “healthy” flag. What this does not show: link-up alone does not show the required VLAN/MAC path is usable end to end Scope: Cisco IOS / IOS XE first; PVST+/Rapid-PVST+/MST behavior and defaults depend on configured mode.

ReferenceImportant terms & boundaries4 sections · depth on demand

Key points

Root-port selection prefers the superior received BPDU, primarily the lowest total root path cost; tie-breakers then distinguish equal-cost candidates.

In depth

The root port is a non-root switch's best path to the root bridge

Each non-root switch selects exactly one root port per VLAN (or per MST instance): the port with the lowest total path cost to the root. The Catalyst 9300 guide describes the root port as forwarding and providing the best path to the root.

Tie-breakers, in order

StepLowest value wins
1Root path cost (sum of port costs towards the root)
2Bridge ID of the neighbouring (designated) bridge
3Port ID of the neighbour (priority + port number)
4Local port ID (only with loops through hubs or the same neighbour)

The guide gives short-method default costs of 100 (10 Mb/s), 19 (100 Mb/s), 4 (1 Gb/s), 2 (10 Gb/s) and 1 (25/40 Gb/s).

C9300-ACC1# show spanning-tree vlan 20
VLAN0020
  Root ID    Priority    24596
             Address     a0f8.4912.3400
             Cost        2
             Port        1 (TenGigabitEthernet1/1/1)
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- -------------
Te1/1/1             Root FWD 2         128.49   P2p
Te1/1/2             Altn BLK 2         128.50   P2p
Gi1/0/5             Desg FWD 4         128.5    P2p Edge

Influencing the root port

GoalCommand
Prefer one uplinkLower its cost: spanning-tree vlan 20 cost 1 on that interface
Load balance across uplinksDifferent costs per VLAN group on each uplink
Prefer a neighbour's portPort priority on the upstream switch (spanning-tree vlan 20 port-priority 64)

Common confusion

Changing port priority on the local switch doesn't change its own root port selection when the uplinks go to different upstream switches. Port priority only breaks ties between ports leading to the same neighbour, and it is the neighbour's port priority that counts.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

The root port is the port on a non-root switch with the best path to the root bridge. Each non-root switch has exactly one root port per spanning-tree instance, and it is always forwarding.

Tie-breaker orderLower wins
1. Root path costTotal cost to root
2. Sender bridge IDNeighbor's bridge ID
3. Sender port priorityNeighbor's port priority
4. Sender port numberNeighbor's port number
show spanning-tree vlan 10 | include Root|Root port

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Mechanics and state ownership

Once the root bridge is known, each non-root bridge evaluates the BPDUs received on its participating ports and selects the port with the best path toward that root. The comparison starts with the superior root information and accumulated root-path cost; if candidates tie, bridge and port identifiers provide deterministic tie-breakers. That winner becomes the root port for the instance. A separate redundant candidate can become an alternate port in RSTP/PVST-style operation. The root bridge has no root port because it is already the reference. When a bundle is used, the logical port-channel is normally the STP port, so manipulating individual member cost is not equivalent to changing the logical root-path decision.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Switching → STP → Spanning Tree Fundamentals → 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%
Embedded reference data

Quick lookup tables

Root Port operational reference

Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.

Root-port factorKnown-good interpretationSuspiciousNext check
Root IDSame intended root for all candidatesCandidates see different root contextBPDU/VLAN/instance scope
Root path costIntended path is superiorUnexpected manual/speed-derived costInterface/port-channel cost
Sender Bridge IDUsed when earlier factors tieUnexpected upstream switch winsTopology + priority
Port ID / priorityFinal deterministic tie-breakerHidden local priority changeInterface STP config
Role/stateRoot + forwardingInconsistent/blockingGuard/loop/link evidence
Confirmation

Confirm action

Continue?