Spanning Tree Commands 767For an access layer device, the access port is generally connected to the userterminal (such as a desktop computer) or file server directly and configured asan edge port to implement the fast transition. When the port receives aBPDU packet, the system sets it to non-edge port and recalculates thespanning tree, which causes network topology flapping. In normal cases, theseports do not receive any BPDU packets. However, someone may forge BPDUto maliciously attack the switch and cause network flapping.RSTP provides BPDU protection function against such attack. After BPDUprotection function is enabled on a switch, the system disables an edge portthat has received BPDU and notifies the network manager about it. Thedisabled port can only be enabled by the no version of the command.Syntaxspanning-tree bpdu-protectionno spanning-tree bpdu-protectionDefault ConfigurationBPDU protection is not enabled.Command ModeGlobal Configuration modeUser GuidelinesThis command has no user guidelines.ExampleThe following example enables BPDU protection.console(config)#spanning-tree bpdu-protectionspanning-tree costUse the spanning-tree cost command in Interface Configuration mode toconfigure the external spanning-tree path cost for a port. To return to thedefault port path cost, use the no form of this command.