Switching (VLAN/STP)

spanning-tree bpduguard enable

Shut the port down if it receives a BPDU — protects PortFast ports.

Works on: SwitchMode: iface
Watch out

Enforced: plug a switch into the port and it goes err-disabled at once ('show interfaces status' reads err-disabled). 'shutdown' then 'no shutdown' brings it back only once the switch is gone — otherwise the next BPDU shuts it again.

Run this command live

Don't just read it — type spanning-tree bpduguard enable in a real network simulator in your browser and watch it take effect. No install, no account needed to start.

Open the lab

Frequently asked

What does the "spanning-tree bpduguard enable" command do?

Shut the port down if it receives a BPDU — protects PortFast ports.

What's the common gotcha with "spanning-tree bpduguard enable"?

Enforced: plug a switch into the port and it goes err-disabled at once ('show interfaces status' reads err-disabled). 'shutdown' then 'no shutdown' brings it back only once the switch is gone — otherwise the next BPDU shuts it again.

More Switching (VLAN/STP) commands

← Back to the full command reference