?
The Spanning Tree Protocol (STP) is a network protocol used to create a logical loop-free topology of bridged networks. It builds on the 802.1D standard and its implementation requires that redundant links be broken using a subset of the 802.1 standardized bridges. It is used primarily on switched LAN networks, although it may be employed on wireless networks as well.
The purpose of the Spanning Tree Protocol is to ensure a loop-free network topology by disabling redundant links while allowing all nodes in the network to communicate with one another. This is accomplished by using a link-state algorithm to calculate a tree-like structure, or spanning tree, in which all nodes in the network are interconnected. This spanning tree maintains only the best available connection to each node and eliminates redundant connections, thus ensuring that all packets are received and forwarded by only one path, and eliminating the possibility of the packets being propagated to the other nodes in the network in circles.
The Spanning Tree Protocol is based on a distributed link-state routing algorithm, and consists of three key components: root bridge election, topology reconfiguration, and edge-port detection. During root bridge election, each node in the network broadcasts its identity to other nodes in the form of a Bridge Protocol Data Unit or BPDU (an Ethernet frame). Upon receiving a BPDU, each node compares its bridge ID with the bridge ID of the sender. The bridge with the lowest bridge ID becomes the root bridge and the other bridges are configured as downstream bridges. The election process typically occurs after a disruption in the network, once the bridges have all recovered their respective states and determined their topology.
Once the root bridge is elected, the topology reconfiguration process begins. Each node computes the shortest paths amongst all nodes in the network and creates a spanning tree, which indicates which port should remain active and which should be disabled. The last component of the protocol is edge-port detection, which is generally only used for wireless networks. Edge ports are used to detect when access points have departed or joined the network, and the bridge adjusts its spanning tree accordingly.
The Spanning Tree Protocol is a critical network protocol as it prevents redundant links while simultaneously maintaining a loop-free path of communication between all nodes in the network. Its reliable link-state algorithm efficiently determines a distribution tree of the network while preventing broadcast storms. While Spanning Tree Protocol is commonly deployed in switched networks, it is important to note the IEEE 802.1 implementation of the protocol is also compatible with modern wireless networks and provides the same benefits.