Notice in this example once again
that BPDU Guard is enabled globally for Portfast ports on the switch, we type the command spanning tree,
portfast, edge, BPDU Gaurd default.
So if a portfast port receives a BPDU it will be shut down.
So as an example show interface gigabit 01, this port is currently up.
It is not configured as a portfast port.
If that port was configured as a portfast port
and we receive a BPDU on that port the port is shut down.
So as soon as we typed the command and a BPDU was received the port was disabled, get rid of spanning tree
portfast, shut the port down, no shut the port, the port will come up again show spanning tree.
The port is up but it's in the blocking state.
So it's been blocked by spanning tree but the port is up up. On switch 2 however, we configured BPDU guard
directly on the port, the port is error disabled even though Portfast wasn't configured so soon as
spanning tree, BPDU Guard is enabled on the port, the port goes error disabled when a BPDU is received. I'll remove
that command from the port, shut it down and no shut it port comes up.
So do show interface gigabit 02,
currently the port is up up as soon as I enable BPDU Guard.
We should see that the port goes error disable and there you go.
Port is error disabled because the BPDU was received on the switch.
So it's quite clear through the output to see that the port was shut down because of BPDU Guard.
Once again if I remove that the port doesn't come up again.
You have to shut the port down and then no shut it to re-enable the port so show interface gigabit 02
port is currently up up, show spanning tree port is in the blocking state because it's a backup port
in this network.
So once again if you enable portfast on your switches ensure that you enable BPDU guard as an extra
protection mechanism.