Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

BPDU Guard Deep Reference

Direct answer

BPDU Guard shuts a port down the moment it receives a spanning-tree BPDU. It belongs on ports meant for end devices, where a BPDU means a switch or a loop has been connected.

When to use this

Use it on all access ports with PortFast, and when a user port is err-disabled with the reason bpduguard.

First 30 seconds

1. show interfaces status err-disabled — reason bpduguard?

2. Find what is plugged in: a switch, a bridge, a cable looped back.

3. Remove it.

4. shutdown then no shutdown on the port.

5. Enable for all edge ports: spanning-tree portfast bpduguard default.

Operational verification

port configured as edge with BPDU Guard → no BPDU received → port forwarding; BPDU received → err-disabled → cause removed → port re-enabled

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 interfaces status err-disabled
Scope / prerequisiteUse it on all access ports with PortFast, and when a user port is err-disabled with the reason bpduguard.
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 interfaces status err-disabled
show spanning-tree interface GigabitEthernet1/0/10 detail
show spanning-tree summary
show errdisable recovery
show logging | include BPDUGUARD|ERR_DISABLE

The first lists err-disabled ports with the reason bpduguard. The interface detail says whether BPDU Guard is enabled on the port and counts BPDUs received. The summary shows whether it is on by default. show errdisable recovery tells whether and when the port will be re-enabled. The log gives the time of the event.

Known-good: the port is connected, shows as an edge port with BPDU Guard enabled, and its received-BPDU counter stays at zero.

Step 2 Failure isolation workflow Narrow the fault
  • A user port is down, err-disabled, reason bpduguard. Find what is attached — a switch, a bridge, a looped cable — and remove it, then shutdown / no shutdown.
  • The port comes back and goes down again every few minutes. Automatic recovery is on and the device is still connected.
  • A port to a legitimate switch was shut down. The port was mistakenly configured as an access edge port; uplinks should not have PortFast or BPDU Guard.
  • The global default seems not to apply. The port is not operating as a PortFast port — for example it is a trunk.
  • A loop occurred through an access port anyway. BPDU Filter is configured on it, so no BPDU was seen.
  • A server port trips the guard. The server bridges traffic between interfaces; correct the server, or treat the port as a switch link.
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 points

The port stays down until re-enabled, or until errdisable recovery fires — and it goes down again if the cause is still attached. Find and remove the device first. BPDU Filter is not a milder BPDU Guard; it removes the protection.

Key checks
  • show interfaces status err-disabled — the port and the reason.
  • show spanning-tree interface <interface> detail — BPDU Guard enabled, BPDUs received.
  • show spanning-tree summary — enabled by default?
  • show errdisable recovery — will the port come back by itself?
ReferenceWhat it is1 section · depth on demand

Mechanics & mental model

BPDU Guard shuts down a port the moment it receives a spanning-tree BPDU. It is used on ports where only end devices should be connected: a BPDU there means a switch — or a loop — has been attached.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

Access ports with PortFast skip spanning tree's checks so users get a link at once. That makes them the place where an added switch or a cable plugged back into the network can create a loop before spanning tree reacts. BPDU Guard closes that gap, at the price of a port that stays down until someone attends to it.

ReferenceHow it works1 section · depth on demand

How it works

Enable it per port, or for every PortFast port at once:

interface GigabitEthernet1/0/10
 spanning-tree portfast
 spanning-tree bpduguard enable
spanning-tree portfast bpduguard default

The global form applies to ports that are operating as PortFast edge ports. The interface form applies to the port regardless.

When a BPDU arrives, the port is put in err-disabled state: the link goes down and stays down. The log shows two messages, one naming BPDU Guard and the port, one reporting the err-disable.

The port does not come back by itself unless automatic recovery is configured:

errdisable recovery cause bpduguard
errdisable recovery interval 300

With recovery enabled, the port is re-enabled after the interval — and shut down again at the first BPDU if the cause is still there. Without it, the port needs shutdown followed by no shutdown.

Typical sources of the BPDU: a small switch brought by a user, a cable connecting two wall outlets, a server or hypervisor bridging two network cards, a wireless bridge.

BPDU Guard is not the same as BPDU Filter. The guard reacts to BPDUs by closing the port. The filter stops sending them, and when set on an interface also ignores received ones — which removes the protection instead of adding it.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

BPDU guard err-disables an edge port that receives a BPDU

The Catalyst 9300 optional STP features guide describes BPDU guard as err-disabling a port when it receives a BPDU. spanning-tree portfast bpduguard default enables it globally on PortFast ports, and spanning-tree bpduguard enable enables it per interface, even without PortFast. Recovery is manual unless err-disable recovery is configured. errdisable detect cause bpduguard shutdown vlan shuts down only the offending VLAN instead of the whole port.

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
C9300# show logging | include BPDUGUARD|ERR_DISABLE
%SPANTREE-2-BLOCK_BPDUGUARD: Received BPDU on port Gi1/0/17 with BPDU Guard enabled. Disabling port.
%PM-4-ERR_DISABLE: bpduguard error detected on Gi1/0/17, putting Gi1/0/17 in err-disable state
C9300# show interfaces status err-disabled
Port      Name               Status       Reason               Err-disabled Vlans
Gi1/0/17  Meeting-room-2     err-disabled bpduguard

Where to use it

PortBPDU guard
User, phone, printer, AP access portsYes (with PortFast)
Server ports with a single NIC or LACPYes
Hypervisor ports with a virtual switch that doesn't send BPDUsUsually yes; check the vSwitch behaviour
Uplinks between switchesNever

Recovering a port

1. Find out what was connected: an unmanaged switch, a looped cable, a misbehaving NIC or VM bridge.

2. Remove the cause.

3. shutdown / no shutdown on the port, or wait for err-disable recovery.

Global versus per-interface

The global command applies only to ports that are operational PortFast ports. Use the interface command on ports where PortFast isn't enabled but BPDUs should still never appear.

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 → BPDU Guard Deep 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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
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 guardbpduguardportfast bpduguardbpdu errdisable
Embedded quick reference

Operational notes

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

BPDU Guard — Fast Check

Edge-port protection

1. Port err-disabled?

2. Cause/log = BPDU Guard?

3. Is port intended edge?

4. Find BPDU source.

5. Remove unintended bridge/switch.

6. Recover port.

7. Prove no new BPDU trigger.

Confirmation

Confirm action

Continue?