Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Root Port · Rapid PVST+

Direct answer

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.

When to use this

Use it when a switch reaches the root over the wrong uplink, or to predict which uplink will forward and which will block.

First 30 seconds

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.

Operational verification

BPDUs received on each uplink → root path cost + local port cost → lowest total wins → tie: upstream bridge ID → upstream port ID → local port ID → that port is Root/FWD, other uplinks become Altn/BLK

Evidence · next step

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
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 · Cisco IOS XE
Key commandshow spanning-tree interface <interface> detail
Scope / prerequisiteUse it when a switch reaches the root over the wrong uplink, or to predict which uplink will forward and which will blo…
Reference · 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.

5 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
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-priority on 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 FWD but 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 FWD for 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 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.

command output · 1
Command lookup Jump straight to Cisco syntax
Key points

One root port per VLAN on every non-root switch: lowest total cost to the root, then lowest upstream bridge ID, then lowest upstream port ID (priority.number), then lowest local port ID. Cost is added on the receiving port. Default short costs: 10 Gb = 2, 1 Gb = 4, 100 Mb = 19.

Key checks

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

StepLowest wins
1Total path cost to the root (the received cost plus the local port's cost)
2Bridge ID of the neighbour sending the BPDU
3Port ID of the sending port (priority, then number)
4Local 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

ToolCommandScope
Cost on the local portspanning-tree [vlan <id>] cost <n>Changes this switch's choice
Port priority on the upstream switchspanning-tree [vlan <id>] port-priority <n>Only matters with parallel links to the same neighbour
Root placementroot primary on the desired rootChanges 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.

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

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
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

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
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

Cisco IOS / IOS XE IEEE 802.1D-2004 / 802.1QSteer the root port: raise the cost of the uplink that should be backup, or (for parallel links to the same switch) lower the port priority on the upstream switch

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 64

Expected output

Cisco IOS / IOS XE IEEE 802.1D-2004 / 802.1Qshow spanning-tree vlan 10

Expected 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.
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 → 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%
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.

BoundaryKnown-good for Root PortSuspicious signatureNext proof
IntentMatches root-port selection designConfiguration differs from peer/designCompare effective config
Control stateStable expected role/route/member statethe wrong uplink becoming root port, equal-cost paths breaking differently than expected, or the root port changing after cost/priority driftInspect protocol/RIB detail
ForwardingExpected egress/Port-Channel/VLAN pathState exists but traffic path disagreesFIB/MAC/adjacency
ClosureOriginal test passes for explained reasonSymptom merely moved or was bypassedRegression test
Confirmation

Confirm action

Continue?