STP protfast and BPDU guard


a. PortFast

Port fast disables STP on a port allowing the interface to start forwarding immediately by bypassing STP safety checks.
This should be used with caution and only on ports NOT connected to other switches

switch(config-if)#spanning-tree portfast

b. BPDU guard

BPDU guard will immediately place the port in an err-disabled state if it detects and STP BPDUs on that interface.
Enable BPDU guard if enabling PortFast.

switch(config-if)#spanning-tree bpduguard enable