The IEEE 802.1d standard is also known as the Spanning Tree Protocol (STP). The purpose of STP is to avoid bridging loops that can occur when there is more than one active path between two nodes. Switches using STP will exchange messages on the network to gather information about the other switches. STP performs the following functions:
- Eliminates bridging loops
- Detects topology changes
- Responds to failed/disabled connections be activating new ports
- Uses minimal bandwidth
- Can be customized by an administrator
Keep in mind that STP will not be required for all networks. Take for example, a network that uses switches but does not implement any redundant paths. In this case STP would not be required. On the other hand, the major disadvantage is that the network is not fault tolerant. Another situation in which STP is not required is on networks that implement VLANs where each port on a switch is treated as its own IP subnet.
Now that you are somewhat familiar with what STP is for, let’s take a look at how it actually works. However, you need be introduced to a few keys terms in order to understand how STP functions. The key terms you should be familiar with to understand how STP works are listed below.
- Root Bridge – The switch that is the root of the tree topology. This is the device responsible for sending out BDPUs
- Bridge Protocol Data Unit (BDPU) – This component conveys the state of a bridge/switch to other STP enabled devices on the network.
- Designated Bridge – Has the lowest aggregated cost back to the root bridge.
- Designated Ports – Forwards traffic onto a link for which it is the Designated Bridge. The designated port is located on the designated bridge.
- Root Ports – Has the fastest route back to the Root using aggregated link costs of each link passed through.
- Bridge ID – A unique 64 bit number. Lower Bridge ID numbers have priority over higher ones for determining designated ports and electing a root bridge.
- Tree Topology – A stable configuration of the network without loops. There should only be one path between any two leaves in the tree.
So how does STP eliminate loops in a tree topology? For each instance of STP, there is a single root bridge. For every LAN segment, there is a designated switch (designated bridge) and each switch has a designated port. Loops are eliminated by blocking the ports leading to redundant links.
Since there can only be one root bridge, an election is held to determine which bridge will be designated this role. The bridge with the highest root bridge ID will assume this role.
Recall from the list of key terms that the designated bridge has the lowest cost back to the root bridge. Therefore, once the root bridge is established, each link must then have a designated bridge leading back to the root bridge. The designated bridge for a link is the one with the lowest cost to get back to the root. A formula is used to determine the cost of a link.