![](/images/new-backgrounds/1117381/117381543x1.webp)
Command Line Interface
spanning-tree
This command enables the Spanning Tree Algorithm globally for the switch. Use the no form to disable it.
Syntax
[no] spanning-tree
Default Setting
Spanning tree is enabled.
Command Mode
Global Configuration
Command Usage
The Spanning Tree Algorithm (STA) can be used to detect and disable network loops, and to provide backup links between switches, bridges or routers. This allows the switch to interact with other bridging devices (that is, an
Example
This example shows how to enable the Spanning Tree Algorithm for the switch:
Console(config)#
spanning-tree mode
This command selects the spanning tree mode for this switch. Use the no form to restore the default.
Syntax
spanning-tree mode {stp rstp} no spanning-tree mode
•stp - Spanning Tree Protocol (IEEE 802.1D)
•rstp - Rapid Spanning Tree Protocol (IEEE 802.1w)
Default Setting
rstp
Command Mode
Global Configuration
Command Usage
•Spanning Tree Protocol
Uses RSTP for the internal state machine, but sends only 802.1D BPDUs.