STP is used to prevent loops in the LAN. The switching devices running STP discover loops on the network by exchanging information with one another, and block certain interfaces to cut off loops. Along with the growth of the LAN scale, STP has become an important protocol for the LAN.
Figure 1 Networking diagram for a typical LAN

On the network shown in Figure 1, the following situations may occur:
Broadcast storms render the network unavailable.
It is known that loops lead to broadcast storms. In Figure 1, assume that STP is not enabled on the switching devices. If Host A broadcasts a request, the request is received by port 1 and forwarded by port 2 and port3 on S1. Then, again on S1 and S2, port 2 and port 3 receive the request broadcast by the other and port 1 forwards the request. As such transmission repeats, resources on the entire network are exhausted, causing the network unable to work.
Flapping of MAC address tables damages MAC address entries.
As shown in Figure 1, even update of MAC address entries upon the receipt of unicast packets damages the MAC address table.
Assume that no broadcast storm occurs on the network. Host A unicasts a packet to Host B. If Host B is temporarily removed from the network at this time, the MAC address entries of Host B on S1 and S2 are deleted. The packet unicast by Host A to Host B is received by port 1 on S1. S1, however, does not have associated MAC address entries. Therefore, the unicast packet is forwarded to port 2 and port 3. Then, port 2 on S2 receives the unicast packet from port 2 on S1 and sends it out through port 3. As such transmission repeats, port 2 and port 3 on S1 and S2 continuously receive unicast packets from Host A. Therefore, S1 and S2 modify the MAC address entries continuously, causing the MAC address table to flap. As a result, MAC address entries are damaged.
Stay tuned for the next post to learn more. The important thing is to understand the network scenario.
