Use it when hardening an access layer, or when a port goes err-disabled or root-inconsistent.
STP Enhancements
STP enhancements are Cisco features that protect and speed up spanning tree: PortFast and BPDU guard on host ports, BPDU filter, root guard on ports towards switches that must never become root, loop guard and UDLD against unidirectional links.
1. show interfaces status err-disabled — ports shut by bpduguard?
2. show spanning-tree inconsistentports — Root Inconsistent or Loop Inconsistent?
3. BPDU guard tripped → a switch was connected to a host port; remove it, then shutdown / no shutdown.
4. Root inconsistent → a downstream switch claims root; fix its priority.
5. show spanning-tree summary — protections enabled where the design wants them.
port role known (host port, downlink, uplink) → matching feature applied → feature acts on unexpected BPDUs or missing BPDUs → port protected (err-disabled or inconsistent) instead of looping
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
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 First 30 seconds Verify boundary
Immediate answer: Identify the exact port role and the intended protection feature before changing PortFast, BPDU Guard, Root Guard or Loop Guard.
Verification chain: port role/type → received BPDUs → protection feature → consistency/error state → STP role/state → forwarding
Stop condition: A protection action can be correct policy enforcement; do not treat err-disable or inconsistent state as root cause until the triggering boundary is confirmed.
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.
Subtopics
Go one level deeper into this subject.
PortFast is an edge optimization that allows an eligible access-facing port to move to forwarding without waiting through the traditional listening/learning progression.
Subtopic BPDU GuardBPDU Guard protects ports that should never receive spanning-tree BPDUs.
Subtopic BPDU FilterBPDU Filter is more dangerous than an ordinary edge convenience because suppressing BPDUs can remove the information STP needs to detect a loop.
Subtopic Root GuardRoot Guard is used where the design requires the current root to remain upstream and a downstream neighbor must never advertise superior BPDUs.
Subtopic Loop GuardLoop Guard protects redundant STP paths from a failure mode where a port that should keep receiving BPDUs suddenly stops seeing them, for example because of a unidirectional control-plane failure.
Typical design: access ports get PortFast + BPDU guard; distribution downlinks get root guard; uplinks between switches get loop guard (or UDLD). Do not combine root guard and loop guard on the same port. BPDU filter on a port disables STP there — avoid it unless you know why.
show spanning-tree summary— features enabled globally (PortFast default, BPDU guard default, loop guard default).show spanning-tree interface <if> detail— PortFast, BPDU guard/filter, root guard, loop guard on the port.show spanning-tree inconsistentports— ports held by root guard or loop guard.show interfaces status err-disabled— ports shut by BPDU guard.show errdisable recovery— whether and when err-disabled ports recover.
ReferenceImportant terms & boundaries4 sections · depth on demand
Key points
PortFast accelerates edge transition; BPDU Guard protects edge ports from received BPDUs; Root Guard prevents an unexpected superior root path; Loop Guard protects against certain unidirectional BPDU-loss conditions. BPDU Filter can suppress BPDUs and therefore carries higher loop risk when misused.
Protection intent map
PortFast: edge acceleration. BPDU Guard: shut/protect an edge port receiving BPDUs. Root Guard: reject superior-root influence on a protected downstream port. Loop Guard: prevent unsafe transition when expected BPDUs disappear. BPDU Filter: suppress BPDUs and therefore requires especially careful design.
In depth
STP enhancements protect the topology from mistakes and failures
Spanning tree trusts every BPDU it receives. The optional features in the Catalyst 9300 guide restrict that trust at the edge and on uplinks.
| Feature | Command | Where | Protects against |
|---|---|---|---|
| PortFast | spanning-tree portfast | Host ports | Slow start of host ports (skips listening and learning) |
| BPDU guard | spanning-tree bpduguard enable | Host ports | A switch plugged into an access port |
| BPDU filter | spanning-tree bpdufilter enable | Rarely | Sending BPDUs where they mustn't go (risky) |
| Root guard | spanning-tree guard root | Ports towards switches that must never be root | An unexpected root bridge |
| Loop guard | spanning-tree loopguard default | Point-to-point links between switches | Loops after a unidirectional link failure |
| EtherChannel guard | spanning-tree etherchannel guard misconfig | Global | EtherChannel misconfiguration on the partner |
C9300(config)# spanning-tree portfast default
C9300(config)# spanning-tree portfast bpduguard default
C9300(config)# spanning-tree loopguard default
C9300(config)# interface GigabitEthernet1/0/48
C9300(config-if)# description Downlink to third-party switch
C9300(config-if)# spanning-tree guard root
C9300# show spanning-tree summary
Switch is in rapid-pvst mode
Root bridge for: VLAN0010, VLAN0030
EtherChannel misconfig guard is enabled
Portfast Default is enabled
PortFast BPDU Guard Default is enabled
Loopguard Default is enabled
Documented restrictions
| Restriction | Detail |
|---|---|
| Root guard and loop guard | Can't be enabled together on a port |
| UplinkFast and BackboneFast | Can be configured with Rapid PVST+ or MST, but stay inactive until the mode is PVST+ |
| Voice VLAN | Enabling it turns on PortFast automatically |
A typical campus baseline
| Port type | Features |
|---|---|
| Access ports | PortFast and BPDU guard (global defaults) |
| Distribution downlinks to access | Root guard |
| Switch-to-switch links | Loop guard (global), point-to-point link type |
| Everywhere | Avoid BPDU filter unless there's a specific reason |
Documented example, not captured output.
Quick reference
STP enhancements are protection features that sit on top of spanning tree. Plain STP prevents loops, but it reacts slowly at the edge and can be disrupted by unexpected or misconfigured devices. Each enhancement guards against a specific failure — a user plugging in a switch, an unexpected root bridge, a one-way fibre link — so a robust access layer enables several of them together.
STP enhancements protect the topology:
| Feature | Protects against |
|---|---|
| PortFast | Slow edge port startup (skips listening/learning) |
| BPDU Guard | Switches plugged into edge ports (err-disable) |
| BPDU Filter | Sending/receiving BPDUs (use with care) |
| Root Guard | Unwanted root bridge on a port |
| Loop Guard | Unidirectional links causing loops |
| UDLD | Unidirectional fibre links |
spanning-tree portfast default
spanning-tree portfast bpduguard default
spanning-tree loopguard default
interface Te1/1/1
spanning-tree guard root ! on ports towards access switches
errdisable recovery cause bpduguard
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 Switching → STP → STP Enhancements. 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
STP protection feature map
Match each Cisco enhancement to its intent
| Feature | Intended use | Failure/protection indication |
|---|---|---|
| PortFast | True edge port rapid forwarding | Edge assumption only; STP still exists |
| BPDU Guard | Edge port must not receive BPDUs | Commonly err-disabled after BPDU |
| Root Guard | Downstream port must not become root path | Root-inconsistent |
| Loop Guard | Protect against lost expected BPDUs on non-designated path | Loop-inconsistent |
| BPDU Filter | Suppress BPDUs in specific designs | Can hide STP control information; high misuse risk |