Use it to decide which protection belongs on which port, and when a port is err-disabled or shown as inconsistent.
STP Guard Features Reference
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.
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.
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
Operational reference
Fast context before you go deeper.
show spanning-tree summaryVerification & 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 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 · 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.
PortFast and BPDU Guard on access ports; Root Guard on downlinks towards switches that must never be root; Loop Guard on uplinks. BPDU Filter on an interface turns spanning tree off for that port. Root Guard and Loop Guard cannot share a port.
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
Mechanics & mental model
Spanning tree assumes that every switch behaves and every link works in both directions. The guard features cover the cases where that is not true: BPDU Guard, BPDU Filter, Root Guard and Loop Guard, with PortFast and UDLD closely related.
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
| Feature | Put it on | Reacts to | Result | Recovery |
|---|---|---|---|---|
| PortFast | Ports to end devices | — | Port forwards immediately; no topology change when it comes up | — |
| BPDU Guard | PortFast ports | Any BPDU received | Port is err-disabled | Manual, or errdisable recovery |
| BPDU Filter | Rarely anywhere | — | Stops sending BPDUs; per interface it also ignores received ones | — |
| Root Guard | Ports towards switches that must never become root | A BPDU better than the current root's | Port blocked as root-inconsistent | Automatic when those BPDUs stop |
| Loop Guard | Root and alternate ports on links between switches | BPDUs stop arriving | Port blocked as loop-inconsistent | Automatic when BPDUs return |
| UDLD | Fibre links between switches | The link works in one direction only | Port is err-disabled | Manual, 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 defaultandspanning-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:
| Feature | Action when triggered | Where |
|---|---|---|
| PortFast | Port goes straight to forwarding | Single end stations (portfast on access, portfast trunk for hypervisors) |
| BPDU guard | Err-disables the port on any BPDU | Edge ports |
| BPDU filter | Stops sending and receiving BPDUs | Rarely; the guide warns it effectively disables STP on the port |
| Root guard | Port goes root-inconsistent (blocked) if it would become root port | Downlinks from distribution/core |
| Loop guard | Root/alternate ports don't become designated when BPDUs stop | Point-to-point links between switches |
| EtherChannel guard | Err-disables ports on an EtherChannel misconfiguration | Global |
| UplinkFast / BackboneFast | Legacy 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 type | PortFast | BPDU guard | Root guard | Loop guard |
|---|---|---|---|---|
| User or phone port | Yes | Yes | — | — |
| Server or hypervisor port | Yes (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.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
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 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%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.
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.
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.
| Feature | Protects against | Typical action |
|---|---|---|
| BPDU Guard | BPDUs on edge port | Err-disable |
| Root Guard | Unexpected superior BPDU/root | Root-inconsistent |
| Loop Guard | Loss of expected BPDUs | Loop-inconsistent |
Always fix the cause before clearing/recovering the port.