The spanning tree algorithm ensures the existence of a loop-free topology in networks that contain parallel bridges. A loop occurs when there are alternate routes between hosts. If there is a loop in an extended network, bridges may forward traffic indefinitely, which can result in increased traffic and degradation in network performance.
The spanning tree algorithm produces a logical tree topology out of any arrangement of bridges. The result is a single path between any two end stations on an extended network. In addition, the spanning tree algorithm provides a high degree of fault tolerance. It allows the network to automatically reconfigure the spanning tree topology if there is a bridge or data-path failure.
The spanning tree algorithm requires five values to derive the spanning tree topology. These are:
A multicast address specifying all bridges on the extended network. This address is media-dependent and is automatically determined by the software.
A network-unique identifier for each bridge on the extended network
A unique identifier for each bridge/LAN interface (a port)
The relative priority of each port
The cost of each port
After these values are assigned, bridges multicast and process the formatted frames (called Bridge Protocol Data Units, or BPDUs) to derive a single, loop-free topology throughout the extended network. The bridges exchange BPDU frames quickly, minimizing the time that service is unavailable between hosts.