BPDU Guard
BPDU Guard prevents loops if another switch is attached to a Portfast port.
When BPDU Guard is enabled on an interface, it is put into an error-disabled
state (basically, it is shut down) if a BPDU is received on the interface. It can
be enabled at either global configuration mode—in which case it affects all
Portfast interfaces—or at interface mode. Portfast does not have to be enabled
for it to be configured at a specific interface.
Switch(config)#spanning-tree portfast bpduguard default
Switch(config-if)#spanning-tree bpduguard enable