Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

STP Guard Features Reference

Direct answer

The spanning-tree guards protect against switches and links that do not behave: BPDU Guard shuts an access port that receives a BPDU, Root Guard refuses a better root on a port, Loop Guard blocks a port whose BPDUs stop arriving, and UDLD detects one-way links.

When to use this

Use it to decide which protection belongs on which port, and when a port is err-disabled or shown as inconsistent.

First 30 seconds

1. show interfaces status err-disabled and show spanning-tree inconsistentports — which port, which reason?

2. bpduguard → a switch or loop is attached; remove it, then re-enable the port.

3. Root inconsistent → the switch behind the port has a lower priority, or the guard is on an uplink.

4. Loop inconsistent → BPDUs stopped; check the link in both directions.

Operational verification

port role identified (access, downlink, uplink) → matching guard configured → trigger condition absent → port forwarding in its normal role → no inconsistent or err-disabled ports

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
Key commandshow spanning-tree summary
Scope / prerequisiteUse it to decide which protection belongs on which port, and when a port is err-disabled or shown as inconsistent.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

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

2 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 Verify boundary
show spanning-tree summary
show spanning-tree inconsistentports
show spanning-tree interface GigabitEthernet1/0/10 detail
show interfaces status err-disabled
show errdisable recovery

The summary shows which features are enabled by default: PortFast, BPDU Guard, BPDU Filter and Loop Guard. inconsistentports lists ports that Root Guard or Loop Guard is blocking, per VLAN, with the type of inconsistency. The interface detail shows which features are active on one port and how many BPDUs it has sent and received. The last two show ports shut down by BPDU Guard or UDLD, and whether they will be re-enabled automatically.

Known-good: no inconsistent ports, no err-disabled ports, and each port carries the features intended for its role.

Step 2 Typical faults & boundaries Narrow the fault
  • An access port is err-disabled with cause bpduguard. A BPDU arrived: a switch, a bridging device or a looped cable is attached. Remove it before re-enabling the port.
  • A port is root-inconsistent. The switch behind it claims to be a better root; correct its priority, or the guard is on the wrong port.
  • An uplink is blocked by Root Guard. Root Guard was put on a port facing the real root.
  • A port is loop-inconsistent. BPDUs stopped arriving on it: a one-way link, or the neighbour stopped sending.
  • A loop in spite of the guards. BPDU Filter is configured on a port in the loop.
  • Err-disabled ports come back and go down again. Automatic recovery is on and the cause is still present.
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 checks
  • show spanning-tree summary — which features are on by default.
  • show spanning-tree inconsistentports — ports blocked by Root Guard or Loop Guard, with the reason.
  • show interfaces status err-disabled — ports shut by BPDU Guard or UDLD.
  • show spanning-tree interface <interface> detail — features active on one port.
ReferenceWhat it is1 section · depth on demand
ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

Each feature protects against one specific problem and belongs on one kind of port. Put on the wrong port, a guard either does nothing or blocks a link that should be forwarding — so the useful thing to know is which goes where.

ReferenceHow it works1 section · depth on demand

How it works

FeaturePut it onReacts toResultRecovery
PortFastPorts to end devices—Port forwards immediately; no topology change when it comes up—
BPDU GuardPortFast portsAny BPDU receivedPort is err-disabledManual, or errdisable recovery
BPDU FilterRarely anywhere—Stops sending BPDUs; per interface it also ignores received ones—
Root GuardPorts towards switches that must never become rootA BPDU better than the current root'sPort blocked as root-inconsistentAutomatic when those BPDUs stop
Loop GuardRoot and alternate ports on links between switchesBPDUs stop arrivingPort blocked as loop-inconsistentAutomatic when BPDUs return
UDLDFibre links between switchesThe link works in one direction onlyPort is err-disabledManual, or errdisable recovery

How they fit together on a typical network:

  • Access ports: PortFast and BPDU Guard. A switch or a looped cable connected to such a port shuts it down. Both can be made the default with spanning-tree portfast default and spanning-tree portfast bpduguard default.
  • Downlinks from distribution to access: Root Guard, so that no access switch can take over as root.
  • Uplinks and links between switches: Loop Guard, usually enabled globally with spanning-tree loopguard default, and UDLD on fibre.

BPDU Filter configured on an interface turns spanning tree off for that port altogether. A loop through such a port is not detected. It has few legitimate uses.

Root Guard and Loop Guard cannot both be active on one port; they belong on opposite ends of the tree.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

STP protection features and where each one goes

The Catalyst 9300 optional STP features guide documents these features:

FeatureAction when triggeredWhere
PortFastPort goes straight to forwardingSingle end stations (portfast on access, portfast trunk for hypervisors)
BPDU guardErr-disables the port on any BPDUEdge ports
BPDU filterStops sending and receiving BPDUsRarely; the guide warns it effectively disables STP on the port
Root guardPort goes root-inconsistent (blocked) if it would become root portDownlinks from distribution/core
Loop guardRoot/alternate ports don't become designated when BPDUs stopPoint-to-point links between switches
EtherChannel guardErr-disables ports on an EtherChannel misconfigurationGlobal
UplinkFast / BackboneFastLegacy fast-convergence for PVST+Not needed with Rapid PVST+ or MST

The guide notes that root guard and loop guard can't be combined on the same port.

A baseline configuration

C9300(config)# spanning-tree mode rapid-pvst
C9300(config)# spanning-tree portfast default
C9300(config)# spanning-tree portfast bpduguard default
C9300(config)# spanning-tree loopguard default
C9300(config)# spanning-tree etherchannel guard misconfig
C9300(config)# errdisable recovery cause bpduguard
C9300(config)# interface range Te1/0/1 - 24
C9300(config-if-range)# description Downlinks to access
C9300(config-if-range)# spanning-tree guard root
C9300# show spanning-tree summary
C9300# show spanning-tree inconsistentports
C9300# show interfaces status err-disabled

spanning-tree portfast default applies only to non-trunking ports, so trunks between switches aren't affected.

Feature placement by port type

Port typePortFastBPDU guardRoot guardLoop guard
User or phone portYesYes——
Server or hypervisor portYes (trunk variant for hypervisors)Yes——
Access uplink to distribution———Yes
Distribution downlink to access——Yes—
Core-to-core link———Yes

What to monitor

Err-disabled ports (BPDU guard), root-inconsistent and loop-inconsistent ports (show spanning-tree inconsistentports), and topology-change counters. All of them point at a real topology problem, not at the feature itself.

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.
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 Network & Protocols → STP Guard Features Reference. 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%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
bpdu guardroot guardloop guardportfastudld
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

STP Guards Fast Check

BPDU/Root/Loop Guard quick reference.

FeatureProtects againstTypical action
BPDU GuardBPDUs on edge portErr-disable
Root GuardUnexpected superior BPDU/rootRoot-inconsistent
Loop GuardLoss of expected BPDUsLoop-inconsistent

Always fix the cause before clearing/recovering the port.

Confirmation

Confirm action

Continue?