How to enable or disable Spanning Tree Protocol (STP)
Spanning Tree Protocol (STP) is enabled by default on modern switches. It is possible to disable or enable the Spanning Tree Protocol (STP) when required.
To enable Spanning Tree Protocol (STP) on an IOS based switch, use the "spanning-tree vlan vlan_number" command from global configuration mode as shown below.
omnisecu.com.switch01>
omnisecu.com.switch01>enable
omnisecu.com.switch01#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
omnisecu.com.switch01(config)#spanning-tree vlan 1
omnisecu.com.switch01(config)#exit
omnisecu.com.switch01#
To disable Spanning Tree Protocol (STP) on an IOS based switch use "no spanning-tree vlan vlan_number" command from global configuration mode as shown below.
omnisecu.com.switch01>enable
omnisecu.com.switch01#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
omnisecu.com.switch01(config)#no spanning-tree vlan 1
omnisecu.com.switch01(config)#exit
omnisecu.com.switch01#