STP is a self-configuring Layer 2 algorithm that's responsible for removing loops in a switched network while still providing path redundancy. Because a switch automatically forwards broadcasts and multicasts, STP is necessary to make sure that this traffic is not continuously forwarded throughout a switched network. Another problem with loops is that with the switch's learning function, it might mistakenly update its address table with incorrect information concerning an end station as a frame traverses a loop. STP was developed by DEC and later incorporated into IEEE's standards as 802.1D. However, the two protocols are not compatible. In a bridged or switched network, all Layer 2 devices must run the same STP algorithm. Bridge Protocol Data UnitPeriodically, switches send out a special multicast packet, called a Bridge Protocol Data Unit or BPDU, which helps them to advertise themselves, their configurations, and any changes that have occurred. BPDUs help switches discover the topology of the network, including loops. If the cost of a link changes, a new switch or segment is added to the network, or an existing switch or segment fails, this information is propagated via BPDUs and causes the switches to run the STP algorithm. This is done to remove any existing loops that these changes might have created and to ensure that there is still one active path between any two destinations. To ensure that only one active path exists between any two end stations, a switch places its ports in either a forward or blocking mode. Update notifications are called topology change notifications (TCNs) and are generated in the following situations:
The TCNs are propagated throughout the network to ensure that all switches understand that a topology change has taken place. Note that STP is transparent to end stations in that they are unaware of the fact that they're connected to switches running STP.
STP AdvantagesSTP provides the following items:
|