Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

BPDU Guard

Direct answer

BPDU Guard puts a port into err-disabled state as soon as it receives a spanning-tree BPDU. It is used on PortFast access ports so a switch plugged in by mistake cannot change the topology or create a loop.

When to use this

Use it on all host-facing ports, and when a port is err-disabled and you need to know why and how to bring it back.

First 30 seconds

1. spanning-tree bpduguard enable err-disables the port if a BPDU arrives.

2. Pair with PortFast on access ports.

3. show interfaces status err-disabled; errdisable recovery cause bpduguard to auto-recover.

Operational verification

BPDU Guard active on the port (interface, or global default + PortFast) → BPDU received → port err-disabled, log message → remove the device or loop → shut/no shut or automatic recovery → port forwarding again

Evidence · next step

Identify the downstream BPDU source/topology, correct it, then recover intentionally.

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 commandspanning-tree bpduguard enable
Scope / prerequisiteUse it on all host-facing ports, and when a port is err-disabled and you need to know why and how to bring it back.
Show · 2Reference · 2
What next?3 suggested next steps
Catalog command links4
Evidence1
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Verification

Show Commands

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

How to read the output

show interfaces status err-disabled

Look first: line/protocol state, errors/discards, rate, duplex/speed, last input/output

Healthy: State and counters align with expected traffic and physical conditions.

Warning: CRC/input errors, drops, resets, queue drops or unexpected negotiation.

Does not prove: An interface counter is a symptom until correlated with path/time/workload.

Operational workflow

Verification & Troubleshooting

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

7 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 First 30 seconds Verify boundary

Immediate answer: Check whether a BPDU was received on the protected edge port and whether that event actually drove the port into err-disabled state.

Verification chain: edge intent → BPDU Guard scope → received BPDU → err-disable reason → recovery policy → restored edge behavior

Stop condition: An err-disabled port with BPDU Guard configured does not show BPDU Guard caused the event until the recorded reason/counters agree.

Step 2 Operational verification and known-good state Verify boundary
show spanning-tree summary
show spanning-tree interface Gi1/0/5 detail
show interfaces status err-disabled
show errdisable recovery

The summary tells whether the global default is on. The interface detail prints Bpdu guard is enabled when the port is protected by either form. The third command lists ports that are down and why; the fourth shows whether bpduguard is among the causes that recover automatically, and the timer.

Known-good: host ports are protected, no port is err-disabled for bpduguard, and the recovery setting is a deliberate choice.

Step 3 Verification and output interpretation Verify boundary

Check interface status, err-disable reason, logs and spanning-tree details. A BPDU-Guard event shows a BPDU was received on a protected port; it does not by itself identify whether the sender was a rogue switch, an accidental bridge, a phone/hypervisor behavior change or a cabling move. Correlate the event with neighbor discovery, MAC learning and physical topology.

Step 4 Step-by-step troubleshooting Narrow the fault

Boundary rule: An err-disabled port with BPDU Guard configured does not show BPDU Guard caused the event until the recorded reason/counters agree.

Step 5 Verification & troubleshooting Narrow the fault

1. show interfaces status err-disabled → the port and the reason bpduguard.

2. show logging | include BPDUGUARD → when it happened.

3. Find out what was connected — the port is down, so CDP is gone; use the log, the patch record or the user.

4. Remove the switch or the loop.

5. shutdown then no shutdown on the port, or wait for automatic recovery.

6. show spanning-tree interface <port> detail → Bpdu guard is enabled confirms the protection is still in place.

Step 6 Failure signatures and troubleshooting branches Narrow the fault
  • Port err-disabled, reason bpduguard, after a user added a desktop switch. Working as intended; remove the device.
  • The port trips again every five minutes. Automatic recovery is on and the cause is still connected.
  • An uplink to a real switch is err-disabled. The link runs in access mode and was caught by the PortFast and BPDU Guard defaults; configure it as a proper inter-switch link.
  • A switch was plugged into an access port and nothing happened. The guard is not active there: the port is not a PortFast port (global form), or BPDU Filter is configured on it.
  • Phones or PCs alone never trigger it. They do not send BPDUs; if one does, it is bridging.
Step 7 When the problem is really fixed Narrow the fault
  • The cause — switch or patch loop — has been removed, not just the port re-enabled.
  • The port is up and Bpdu guard is enabled still shows in its detail view.
  • show interfaces status err-disabled lists no bpduguard entries.
  • The log shows no repeat after one recovery interval.
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

A BPDU on a guarded port err-disables the whole port immediately. The global command (portfast bpduguard default) only covers PortFast ports; the interface command guards the port regardless of PortFast. The port stays down until shutdown/no shutdown or err-disable recovery — remove the offending switch or loop first, or it trips again.

Key checks

show interfaces status err-disabled → port and reason bpduguard. show logging | include BPDUGUARD → when it happened. show errdisable recovery → whether automatic recovery is on and the timer. show spanning-tree summary → global BPDU Guard default.

ReferenceWhat it is1 section · depth on demand

What it is

BPDU Guard shuts a port down — puts it in err-disabled state — the moment a spanning-tree BPDU arrives on it. It is used on ports where no switch should ever be connected.

ReferenceWhy it matters1 section · depth on demand

Why it matters

An access port is a promise that only an end device sits behind it. Someone who plugs in a small switch, or patches two wall outlets together, breaks that promise: the new device could change the topology, even become root, or close a loop. BPDU Guard turns that into a contained and logged event that costs one port, instead of a problem for the whole VLAN.

ReferenceImportant terms & boundaries6 sections · depth on demand

Key points

  • Global: spanning-tree portfast bpduguard default (newer IOS XE: portfast edge bpduguard default) — covers ports that are operating as PortFast ports.
  • Interface: spanning-tree bpduguard enable — covers the port whether or not PortFast is on.
  • Action: the whole port is err-disabled, for all VLANs, and %SPANTREE-2-BLOCK_BPDUGUARD is logged.
  • Recovery: shutdown / no shutdown, or automatic with errdisable recovery cause bpduguard (interval 300 seconds by default).
  • BPDU Filter on the same interface wins: the guard never sees a BPDU.
  • Different from Root Guard: any BPDU triggers it, and the port goes down rather than blocking.

In depth

BPDU guard: shut down an edge port that receives a BPDU

The Catalyst 9300 optional STP features guide describes two ways to enable BPDU guard:

FormApplies toEffect of a received BPDU
Global: spanning-tree portfast bpduguard defaultPorts in PortFast operational stateThe port is error-disabled
Interface: spanning-tree bpduguard enableThat port, with or without PortFastThe port is error-disabled

The guide states that recovery is manual unless you configure otherwise. errdisable detect cause bpduguard shutdown vlan limits the shutdown to the offending VLAN.

C9300(config)# spanning-tree portfast default
C9300(config)# spanning-tree portfast bpduguard default
C9300(config)# errdisable recovery cause bpduguard
C9300(config)# errdisable recovery interval 300
%SPANTREE-2-BLOCK_BPDUGUARD: Received BPDU on port Gi1/0/10 with BPDU Guard enabled. Disabling port.
%PM-4-ERR_DISABLE: bpduguard error detected on Gi1/0/10, putting Gi1/0/10 in err-disable state
C9300# show interfaces status err-disabled
Port         Name               Status       Reason               Err-disabled Vlans
Gi1/0/10     Desk 2.14          err-disabled bpduguard
C9300(config)# interface GigabitEthernet1/0/10
C9300(config-if)# shutdown
C9300(config-if)# no shutdown

Why it's essential on access ports

EventWithout BPDU guardWith BPDU guard
A user connects a small switch with a loopBroadcast storm, possibly a new root bridgePort shut down at the first BPDU
A misconfigured host bridges two NICsLoop between two access portsPorts shut down

Automatic recovery

errdisable recovery cause bpduguard re-enables ports after the interval. That's convenient, but a looping device will be shut down again on every recovery. Find and remove the device rather than relying on recovery.

Where not to use it

Not on uplinks or links to other switches: they're supposed to send BPDUs.

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

BPDU Guard err-disables a port the moment it receives a BPDU. On PortFast ports that should only have end devices, a BPDU means someone connected a switch, which could otherwise create a loop or change the root.

spanning-tree portfast bpduguard default
errdisable recovery cause bpduguard
errdisable recovery interval 300
show interfaces status err-disabled

Documented example, not captured output.

Recover a port with shutdown/no shutdown after removing the cause, or let errdisable recovery re-enable it.

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

The check happens when a BPDU is received, before spanning tree acts on its contents. It makes no difference whether the BPDU is better or worse than the current root — its mere presence proves a bridge is attached. The port is handed to the err-disable mechanism: the link is taken down, so every VLAN on the port, including a voice VLAN, loses connectivity.

With automatic recovery the port is re-enabled after the interval. If the offending device is still there, the next BPDU disables it again, and the log shows the port cycling every five minutes — a pattern worth recognising.

The two forms differ in scope. The global default only protects ports that are currently operating as edge ports, so a port without PortFast is not covered by it. The interface command protects the port unconditionally. On trunks, some platforms can limit the action to the offending VLAN with errdisable detect cause bpduguard shutdown vlan.

State model and protocol mechanics

BPDU Guard protects an edge-designated port by reacting to received BPDUs. On Cisco switching it commonly places the interface into an err-disabled state, preventing an unexpected switch from participating in the Layer-2 topology through a port that was intended for an endpoint.

Limits and common misconceptions

Do not treat BPDU Guard as a substitute for correct STP root placement or for loop-free design. Disabling the guard to restore service can expose the topology to the condition it was designed to contain. An err-disabled port is an enforcement outcome, not evidence of a physical fault. Automatic err-disable recovery may restore forwarding while the violating condition still exists.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

Use BPDU Guard where the topology contract says that receiving a BPDU is itself a policy violation. It is commonly paired with PortFast on endpoint-facing access ports. Decide whether the policy is enabled per-interface or as a default for PortFast-enabled ports, and keep recovery behavior intentional rather than relying on automatic recovery without correcting the cause.

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.1QGuard host ports and recover automatically after five minutes

Assumptions: Lab switch; Rapid PVST+ (spanning-tree mode rapid-pvst); VLAN 10 exists.

spanning-tree portfast default
spanning-tree portfast bpduguard default
!
! or per interface, independent of PortFast:
interface GigabitEthernet1/0/5
 spanning-tree bpduguard enable
!
errdisable recovery cause bpduguard
errdisable recovery interval 300

Expected output

Cisco IOS / IOS XE IEEE 802.1D-2004 / 802.1Qshow interfaces status err-disabled

Expected state: Failure signature after a switch was plugged into a host port.

%SPANTREE-2-BLOCK_BPDUGUARD: Received BPDU on port Gi1/0/5 with BPDU Guard enabled. Disabling port.
%PM-4-ERR_DISABLE: bpduguard error detected on Gi1/0/5, putting Gi1/0/5 in err-disable state

Port      Name               Status       Reason
Gi1/0/5                      err-disabled bpduguard
! Illustrative output, not captured Evidence.
The log line names the port and the cause. The port is down for all VLANs until it is recovered; find what sent the BPDU before re-enabling.
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 → STP Enhancements → BPDU Guard. 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

BPDU Guard · operational reference

Compact state and interpretation boundaries for fast lookup.

State / evidenceInterpretation
Protected edgeBPDUs should not appear
BPDU receivedPolicy violation detected
Err-disabledProtection action
RecoveryRequires cause awareness

BPDU Guard operational reference

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

BoundaryKnown-good for BPDU GuardSuspicious signatureNext proof
IntentMatches fail-closed protection that disables an edge port when a BPDU violates the endpoint-only assumption designConfiguration differs from design/peerCompare effective configuration
Control stateStable expected region/role/topology/path statean access port repeatedly entering err-disabled because a downstream bridge sends BPDUs, BPDU Guard missing from an edge policy, or automated recovery restoring a dangerous topology before the attached device is correctedInspect protocol detail and adjacent state
ForwardingExpected VLAN/egress/RIB/FIB pathControl state exists but traffic path disagreesMAC/FIB/CEF/adjacency proof
ClosureOriginal test passes for explained reasonSymptom moved, was bypassed or protection disabledRegression test
Confirmation

Confirm action

Continue?