Pcornel
Networking · Switching › STP › STP Enhancements

BPDU Guard

Cheat sheet · https://pcornel.dk/topic.php?topic=612

Back to the Topic

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.

Remember

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.

First 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.

Commands

show errdisable recovery
Shows supported err-disable causes and automatic recovery status/interval.
spanning-tree bpduguard enable
Enable BPDU Guard on an interface.
show interfaces status err-disabled
List interfaces currently disabled by err-disable protection.
spanning-tree portfast bpduguard default
Enable BPDU Guard on all PortFast ports globally.
show spanning-tree interface <port> detail

Verify in this order

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

Where it usually breaks

physical link → switchport/bundle membership → VLAN/instance state → STP/LAG decision → MAC forwarding → end-to-end frame path

BPDU Guard · operational reference

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

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=612

Confirmation

Confirm action

Continue?