Search

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.

Note: Never disable Spanning Tree Protocol (STP) if there is no valid reason to disable it. Disabling Spanning Tree Protocol (STP) can cause Broadcast Storms and Layer 2 Switching Loops, which can make your network down within a short span of time. Use with extreme care.

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#

Related Tutorials
• What is Broadcast Storm
• What is Layer 2 Switching loop
• What is Spanning Tree Protocol (STP)
• What is Bridge Protocol Data Unit (BPDU) frame
• Bridge Protocol Data Unit (BPDU) Frame Format
• What is a Root Bridge (Switch)
• What is a Root Port
• What are Port Cost, Port Priority and Path Cost Values
• How Spanning Tree Protocol (STP) select Root Port
• What is a Designated Port
• How Spanning Tree Protocol (STP) select Designated Port
• Difference between Root Port and Designated Port
• Spanning Tree Port States
• Topology Changes in Spanning Tree Protocol (STP)
• Spanning Tree Protocol (STP) Convergence
• What is Spanning Tree Protocol (STP) PortFast
• How to configure and verify Spanning Tree Protocol (STP) PortFast
• How to enable or disable Spanning Tree Protocol (STP)
• What is Rapid Spanning Tree Protocol (RSTP)
• Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
• Per-VLAN Spanning Tree (PVST) and Per-VLAN Spanning Tree Plus (PVST+)
• What are Spanning Tree Bridge Priority and Bridge ID values
• Spanning Tree Path Cost Value and How is Spanning Tree Path Cost Value Calculated
• Spanning Tree Port Priority and Port ID Values
• How to change Spanning Tree Bridge Root Priority value and What is Extended System ID
• How to configure Spanning Tree Protocol Root Primary and Root Secondary
• What is a Root Bridge (Root Switch)
• How to change Spanning Tree Port Priority Value
• How Spanning Tree Protocol (STP) select Root Port
• What is a Designated Port
• How Spanning Tree Protocol (STP) select Designated Port
• Difference between Root Port and Designated Port
• Spanning Tree Port States
• How BPDU is generated and How BPDU works
• Important Spanning Tree Protocol (STP) Timers and their default values
• How to Configure and Change Spanning Tree Protocol (STP) Default Timer-Values for hello timer, forward delay timer and max age timer
• Topology Changes in Spanning Tree Protocol (STP)
• Spanning Tree Protocol (STP) Convergence
• Where to place the Spanning Tree Protocol Root Switch (Root Bridge)
• Spanning Tree Protocol (STP) UplinkFast, Backbone Fast and Portfast
• What is Spanning Tree Protocol (STP) Uplink Fast
• What is Spanning Tree Protocol (STP) Backbone Fast
• What is Spanning Tree Protocol (STP) PortFast
• How to configure and verify Spanning Tree Protocol (STP) PortFast
• How to enable or disable Spanning Tree Protocol (STP)
• What is Rapid Spanning Tree Protocol (RSTP)
• Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
• Per-VLAN Spanning Tree (PVST) and Per-VLAN Spanning Tree Plus (PVST+)