STP Optional Characteristic Configuration Commands STP Optional Characteristic Configuration Commands I STP Optional Characteristic Configuration Commands Table of Contents Chapter 1 STP Optional Characteristic Configuration Commands......................................................... 1 1.1 STP Optional Characteristic Configuration Commands.............................................................1 1.1.1 spanning-tree portfast..........................................................................................................1 1.1.2 spanning-tree bpduguard.................................................................................................... 2 1.1.3 spanning-tree bpdufilter.......................................................................................................3 1.1.4 spanning-tree uplinkfast.......................................................................................................4 1.1.5 spanning-tree backbonefast................................................................................................4 1.1.6 spanning-tree guard............................................................................................................. 5 1.1.7 spanning-tree loopguard......................................................................................................6 1.1.8 spanning-tree loopfast..........................................................................................................7 1.1.9 spanning-tree fast-aging......................................................................................................8 1.1.10 spanning-tree fast-aging flush-fdb................................................................................... 9 1.1.11 spanning-tree bpdu-terminal...........................................................................................10 II STP Optional Characteristic Configuration Commands Chapter 1 STP Optional Characteristic Configuration Commands 1.1 STP Optional Characteristic Configuration Commands 1.1.1 spanning-tree portfast Syntax To configure the portfast attribute in global configuration mode, run spanning-tree portfast {bpdufilter default | bpduguard default | default}. To cancel this attribute in global configuration mode, run no spanning-tree portfast {bpdufilter default | bpduguard default | default}. spanning-tree portfast {bpdufilter | bpduguard | default} no spanning-tree portfast {bpdufilter | bpduguard | default} To configure the portfast attribute in port configuration mode, run spanning-tree portfast [disable | trunk ]. To cancel this attribute in port configuration mode, run no spanning-tree portfast. spanning-tree portfast [disable] no spanning-tree portfast Parameters Parameters Description bpdufilter Starts the BPDU filtration. bpduguard Starts the BPDU protection. default Means the default mode. Default Value This function is not enabled by default. Usage Guidelines The portfast attribute enables a port in SSTP/PVST mode to promptly enter the forwarding state without state change. This configuration invalidates in RSTP/MSTP mode. 1 STP Optional Characteristic Configuration Commands After the portfast attribute is configured, it need be protected through BPDU Guard configuration or BPDU Filter configuration. Command Mode Global or port configuration mode Example The following example shows how to enable the Port Fast attribute in global configuration mode. Switch_config# spanning-tree portfast default Switch_config# The following example shows how to enable the attributes of port g0/1: Switch_config_g0/1# spanning-tree portfast Switch_config_g0/1# 1.1.2 spanning-tree bpduguard Syntax To configure BPDU Guard, run spanning-tree bpduguard {disable | enable}. To cancel BPDU Guard, run no spanning-tree bpduguard. spanning-tree bpduguard {disable | enable} no spanning-tree bpduguard Parameters None Default Value This function is not enabled by default. Usage Guidelines In SSTP/PVST mode, if a port that has the BPDU Guard function and the Portfast function configured receives BPDU, this port will be manadatorily shut down. You have to configure the port manually to resume this port. In RSTP/MSTP mode, if a BPDU-Guard-configured port receives BPDU, the port will be set to the Blocking state in a period of time. 2 STP Optional Characteristic Configuration Commands Command Mode Port configuration mode Example The following example shows how to enable BPDU protection on port g0/1. Switch_config_g0/1# spanning-tree bpduguard enable Switch_config_g0/1# 1.1.3 spanning-tree bpdufilter Syntax To configure the BPDU filtration, run spanning-tree bpdufilter {disable | enable}. To cancel the BPDU filtration, run no spanning-tree bpdufilter. spanning-tree bpdufilter {disable | enable} no spanning-tree bpdufilter Parameters None Default Value This function is not enabled by default. Usage Guidelines In SSTP/PVST mode, a port which has the BPDU Filter function and the Port Fast function configured receives BPDU, the BPDU Filter attribute and the Port Fast attribute are automatically shut down. In this case, the port resumes to be a normal port which first enters the listening state, the learning state and then the forwarding state. This function invalidates in RSTP/MSTP mode. Command Mode Port configuration mode Example The following example shows how to enable BPDU filtration on port g0/1. Switch_config_g0/1# spanning-tree bpdufilter enable Switch_config_g0/1# 3 STP Optional Characteristic Configuration Commands 1.1.4 spanning-tree uplinkfast Syntax To configure the Uplink Fast function, run this command. To return to the default setting, use the no form of this command. spanning-tree uplinkfast no spanning-tree uplinkfast Parameters None Default Value This function is not enabled by default. Usage Guidelines The Uplink Fast function validates only in SSTP/PVST mode. Command Mode Global configuration mode Example The following example shows how to enable the Uplink Fast attribute. Switch_config# spanning-tree uplinkfast Switch_config# 1.1.5 spanning-tree backbonefast Syntax To configure the backbonefast function, run spanning-tree backbonefast. To cancel the backbonefast function, run no spanning-tree backbonefast. spanning-tree backbonefast no spanning-tree backbonefast 4 STP Optional Characteristic Configuration Commands Parameters None Default Value This function is not enabled by default. Usage Guidelines The backbonefast function validates only in SSTP/PVST mode. Command Mode Global configuration mode Example The following example shows how to enable the backbonefast function: Switch_config# spanning-tree backbonefast Switch_config# 1.1.6 spanning-tree guard Syntax To configure the Port Guard function, run spanning--tree guard {loop | none | root}. To cancel this function, run no spanning--tree guard. spanning-tree guard {loop | none | root} no spanning-tree guard Parameters Parameters Description loop Guard loop. none Guard none. root Guard root Default Value This protection function is not enabled. 5 STP Optional Characteristic Configuration Commands Usage Guidelines The Root Guard attribute can prevent a port from serving as a root port after it receives a higher-priority BPDU. The Loop Guard attribute can protect a port after it changes from a root port or an alternate port to a designated port. This function can prevent a port from generating a loop when the port cannot receive BPDU continuously. Command Mode Port configuration mode Example The following example shows how to prevent port g0/1 from being the root: Switch_config_g0/1# spanning-tree guard root Switch_config_g0/1# 1.1.7 spanning-tree loopguard Syntax To configure the guard loop in global configuration mode, run spanning-tree loopguard default. To cancel the guard loop in global configuration mode, run no spanning-tree loopguard default. spanning-tree loopguard default Parameters None Default Value None Usage Guidelines None Command Mode Global configuration mode 6 STP Optional Characteristic Configuration Commands Example The following example shows how to enable the loopguard function. Switch_config# spanning-tree loopguard default Switch_config# 1.1.8 spanning-tree loopfast Syntax To enable Loop Fast in global configuration mode, run spanning-tree loopfast. To return to the default setting, use the no form of this command. spanning-tree loopfast To set Loop Fast attribute, run this command. spanning-tree loopfast To disable the Loop Fast attribute, use the no form of this command. spanning-tree loopfast disable Parameters None Default Value None Usage Guidelines Please configure this command under the guide of technical engineers. Command Mode Global configuration mode and interface configuration mode Example The following example shows how to enable loopfast in global configuration mode and disable the function on port G0/1. Switch_config#spanning-tree loopfast Switch_config#int g0/1 Switch_config_g0/1#spanning-tree loopfast disable Switch_config_g0/1#exit 7 STP Optional Characteristic Configuration Commands Switch_config# 1.1.9 spanning-tree fast-aging Syntax To enable or disable the fast aging mechanism of the address table, run the following commands. spanning-tree fast-aging no spanning-tree fast-aging To enable or disable the protection of fast aging of the address table, run the following commands. spanning-tree fast-aging protection no spanning-tree fast-aging protection To configure the time of aging protection of the address table, run the following commands. spanning-tree fast-aging protection time value no spanning-tree fast-aging protection time Parameters Parameters Description value Stands for the aging protection time. 10-60 seconds (15 seconds by default) Default Value Fast aging is enabled by default. However protection is not enabled by default. Usage Guidelines None Command Mode Global configuration mode 8 STP Optional Characteristic Configuration Commands Example The following example shows how to enable fast aging protection and set the protection time to 30 seconds. Switch_config#spanning-tree fast-aging protection Switch_config#spanning-tree fast-aging protection time 30 1.1.10 spanning-tree fast-aging flush-fdb Syntax To enable or disable FDB-Flush, run the following commands. spanning-tree fast-aging flush-fdb no spanning-tree fast-aging flush-fdb Parameters None Default Value FDB-Flush is enabled by default. Usage Guidelines Please configure this command under the guide of technical engineers. FDB-Flush is independent of fast aging.FDB-Flush can be configured whilenono spanning-tree fast-agingis configured. But fast aging protection function has no effect on FDB-Flush. Command Mode Global configuration mode Example The following example shows how to disable fast aging and enable FDB-Flush. Switch_config#no spanning-tree fast-aging Switch_config#spanning-tree fast-aging flush-fdb 9 STP Optional Characteristic Configuration Commands 1.1.11 spanning-tree bpdu-terminal Syntax To enable or disable BPDU Terminal, run the following commands. spanning-tree bpdu-terminal no spanning-tree bpdu-terminal Parameters None Default Value BPDU Terminal is disabled by default. Usage Guidelines BPDU terminal function can forbid forwarding BPDU when there is no STP running. Command Mode Global configuration mode Example The following example shows how to enable BPDU Terminal: Switch_config#spanning-tree bpdu-terminal 10