PDF(207.1 KB) View with Adobe Reader on a variety of devices
ePub(235.8 KB) View in various apps on iPhone, iPad, Android, Sony Reader, or Windows Phone
Mobi (Kindle)(429.6 KB) View on Kindle device or Kindle app on multiple devices
Updated:December 13, 2018
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Configure Spanning Tree Protocol (STP) on a Switch
Spanning Tree Protocol (STP) protects Layer 2 broadcast domains from broadcast storms. It sets the links to standby mode to prevent network loops. Network Loops occur when there are alternate routes between hosts. These loops cause Layer 2 switches to forward traffic across the network infinitely, reducing network efficiency. STP provides a unique path between endpoints on a network. These paths eliminate the possibility of network loops. STP is typically configured when there are redundant links to a host to prevent network loop.
This article aims to show you how to configure STP on a switch.
Sx250 Series, Sx350 Series 22.214.171.124
SG300X, SG500X – 1.4.5.02
Configure Spanning Tree Protocol
Step 1. Log in to the web-based utility and choose Spanning Tree > STP Status & Global Settings.
Step 2. Check the Spanning Tree State check box to enable spanning tree.
Step 3. (Optional) Check the STP Loopback Guard check box to enable the feature. Enabling this feature checks if a root port or an alternate root port receives Bridge Protocol Data Units (BPDUs).
Note: In this example, STP Loopback Guard is enabled.
Step 4. Choose the STP Operation Mode.
Classic STP — provides a single path between any two endpoints, eliminating and preventing networking loops.
Rapid STP — RSTP detects network topologies to provide faster convergence of the spanning tree. This option is enabled by default.
Multiple STP — MSTP is based on RSTP. It detects Layer 2 loops, and attempts to mitigate them by preventing the involved port from transmitting traffic.
Note: In this example, RSTP is chosen.
Step 5. (Optional) Choose the BPDU Handling mode. Choosing the BPDU Handling mode is only available when Spanning Tree State is not enabled.
Filtering — filters BPDU packets when spanning tree is disabled on an interface. Only a few BPDU packets are exchanged among the switches.
Flooding — Floods BPDU packets when spanning tree is disabled on an interface. All the BPDU packets are exchanged among all the switches.
Note: In this example, Flooding is chosen.
Step 6. Choose the Path Cost Default Values. This selects the method used to assign default path costs to the STP ports. The default path cost assigned to an interface varies according to the selected method.
Short — Specifies the range 1 through 65,535 for port path costs.
Long — Specifies the range 1 through 200,000,000 for port path costs.
Step 7. Under the Bridge Settings area, enter the bridge priority value in the Priority field. After exchanging BPDUs, the device with the lowest priority becomes the Root Bridge. In case all bridges use the same priority, then their MAC addresses are used to determine the Root Bridge. The bridge priority value is provided in increments of 4096.
Note: The bridge priority value is provided in increments of 4096. For example, 4096, 8192, 12288, and so on. The default value is 32768.
Step 8. Enter the Hello Time interval in seconds that a Root Bridge waits between configuration messages in the Hello Time field.
Step 9. Enter the Max Age value in the Max Age field. It is the interval, in seconds, that the device can wait without receiving a configuration message, before attempting to redefine its own configuration.
Step 10. Enter the Forward Delay value in the Forward Delay field. This is the interval that a bridge remains in a learning state before forwarding packets.
Step 11. Click Apply.
The Designated Root area displays the following:
Bridge ID — The bridge priority is bound with the MAC address of the switch.
Root Bridge ID — The Root Bridge priority is bound with the MAC address of the switch.
Root Port — The port that has the lowest cost path from this bridge to the Root Bridge.
Root Path Cost — The cost of the path from this bridge to the root.
Topology Changes Counts — The total number of STP topology changes that have occurred.
Last Topology Change — The time interval that has elapsed since the last topology change occurred. It is displayed in days/hours/minutes/seconds.