Ref: Configuring Optional Spanning-Tree Features
Enable Globally:
spanning-tree portfast bpduguard default
Then a
pply to interface(s)
interface range GigabitEthernet1/0/1-48
switchport mode access
switchport access vlan 86
spanning-tree bpduguard enable
spanning-tree guard loop
spanning-tree portfast
no shut
exit