by C. Casquatch
Lab from Renee Molenaar

PVST is usually the default on Cisco IOS switches.
SW1# show spanning-tree summary
Look for “PVST” or “Per-VLAN” in the output.

BPDU Guard only works on PortFast ports (intended for end devices).
SW1(config)# interface GigabitEthernet0/0
SW1(config-if)# spanning-tree portfast
⚠️ Only use PortFast on ports connected to end devices, not other switches.
SW1(config-if)# spanning-tree bpduguard enable

SW1(config)# errdisable recovery cause bpduguard
SW1(config)# errdisable recovery interval 400
This configuration allows the switch to automatically bring the port back up after 400 seconds if it was shut down due to a BPDU.
Check BPDU Guard status:
SW1# show spanning-tree interface gi0/0 detail

Check if the port was err-disabled:
SW1# show interface status err-disabled
Check recovery configuration:
SW1# show errdisable recovery