The purpose of the STP, standardized as IEEE 802.1d, is to prevent loops in bridged or switched networks with redundant links. Bridges or switch ports configured for STP are in one of five different states: blocking, listening, learning, forwarding, and disabled.
Blocking? The port will not send or receive any data traffic across the network segment, but will listen to STP BPDU messages. When a switch or bridge running STP is powered on, all ports are in a blocking state. The port is in the blocking state for 20 seconds before transitioning to the listening state.
Listening? The port is listening to spanning-tree messages in the form of BPDUs and is determining how the network topology is configured. While in the listening state, the port is not forwarding frames. The port is in the listening state for 15 seconds before transitioning to the learning state.
Learning? The port is adding MAC addresses to its MAC address table. While in the learning state, the port is not forwarding frames. The port is in the learning state for 15 seconds before transitioning to the forwarding state.
Forwarding? The port is sending and receiving data across the network segment as normal, and after the network has converged on a topology, the port will be in either the forwarding or blocking state.
Disabled? The port can be administratively disabled at any time by the network administrator and will not receive BPDUs or forward traffic across any network segments. The switch cannot put a port into the disabled state and therefore cannot take a port out of the disabled state; only the network administrator can enable or disable a port.
The calculation of a spanning-tree topology is a three-step process, and on completion of these three steps the network is loop free. The three steps are as follows:
The root bridge is the bridge that is continuously sending network topology information to other bridges in the network. Using the STP, the root bridge notifies all other bridges on the network when topology changes are required. The root bridge should be located centrally in the network to provide the shortest path to other links on the network, and unlike other bridges, the root bridge always forwards frames out all of its ports.
After the root bridge is elected in the STP network, each bridge determines which port it will use to reach the root bridge; this port is called the root port.
Each LAN segment has a designated bridge and a designated port. The designated bridge has the lowest total path cost to the root bridge and the designated port through which frames are forwarded on to the network.
note
This chapter discussed the STP (IEEE 802.1d), but newer concepts for STP operation are either on the horizon or knocking on the door of current switched networks: Multiple Spanning Tree Protocol (MSTP; IEEE 802.1s), Topology Change Notification (TCN) BPDU, and Rapid STP (RSTP). MSTP may be best if you have multiple links separating VLAN traffic. Although STP could disable some of those data paths in your network, this problem is solved by IEEE 802.1s. MSTP solves the problem by enabling multiple spanning trees within a network, allowing administrators to assign VLAN traffic to unique paths. Topology Change Notification (TCN) works for you when there is a topology change caused by a workstation being connected or removed from a switch port. The switch sends out a TCN BPDU when a workstation is connected or removed. RSTP, defined in IEEE 802.1w, provides for faster spanning-tree convergence after a topology change. |