Objective

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.

Applicable Devices

- Sx250 Series

- Sx350 Series

- SG350X Series

- Sx550X Series

- Sx300 Series

- Sx500 Series

Software Version

- Sx250 Series, Sx350 Series 2.2.0.66

- 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.

You should now have successfully configured STP.

View a video related to this article...

Click here to view other Tech Talks from Cisco