STP is used to prevent loops in a LAN. As a LAN expands, STP has become an important protocol for the LAN. The devices running STP discover loops on the network by exchanging information with one another, and block certain interfaces to cut off loops.
Broadcast storms exhaust network resources.
It is known that loops lead to broadcast storms. In Figure 1, STP is not enabled on the Device A and Device B. If Host A broadcasts a request, the request is received by port 1 and forwarded by port 2 on both Device A and Device B. Device A's port 2 then receives the request from Device B's port 2 and forwards the request from Device A's port 1. Similarly, Device B's port 2 receives the request from Device A's port 2 and forwards the request from Device B's port 1. 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.
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 entry of Host B on Device A and Device B is deleted. The packet unicast by Host A to Host B is received by port 1 on Device A. Device A, however, does not have the MAC address entry of Host B. Therefore, the unicast packet is forwarded to port 2. Then, port 2 on Device B receives the unicast packet from port 2 on Device A and sends it out through port 1. As such transmission repeats, port 1 and port 2 on Device A and Device B continuously receive unicast packets from Host A. Therefore, Device A and Device B update their MAC address entries continuously, causing the MAC address tables to flap.