Generally, redundant links are used on an Ethernet switching network to provide link backup and enhance network reliability. The use of redundant links, however, may produce loops, causing broadcast storms and MAC address table instability. As a result, the communication quality deteriorates, and the communication service may even be interrupted. The Spanning Tree Protocol (STP) is introduced to resolve this problem.
Currently, the following spanning tree protocols are supported:
STP
STP, a management protocol at the data link layer, is used to detect and prevent loops on a Layer 2 network. STP blocks redundant links on a Layer 2 network and trims a network into a loop-free tree topology.
The STP topology, however, converges at a slow speed. A port cannot be changed to the Forwarding state until twice the time specified by the Forward Delay timer elapses.
RSTP
RSTP, as an enhancement of STP, converges a network topology at a faster speed.
In both RSTP and STP, all VLANs share one spanning tree. All VLAN packets cannot be load balanced, and some VLAN packets cannot be forwarded along the spanning tree.
RSTP is backward compatible with STP and can be used together with STP on a network.
MSTP
MSTP defines a VLAN mapping table in which VLANs are associated with multiple spanning tree instances (MSTIs). In addition, MSTP divides a switching network into multiple regions, each of which has multiple independent MSTIs. In this manner, the entire network is trimmed into a loop-free tree topology, and replication and circular propagation of packets and broadcast storms are prevented on the network. In addition, MSTP provides multiple redundant paths to balance VLAN traffic.
MSTP is compatible with STP and RSTP. Table 1 shows a comparison between STP, RSTP, and MSTP.
Spanning Tree Protocol |
Characteristics |
Usage Scenario |
Precautions |
---|---|---|---|
STP |
In an STP region, a loop-free tree is generated. Broadcast storms are therefore prevented, and redundancy is implemented. |
STP or RSTP is used in a scenario where all VLANs share one spanning tree. In this situation, users or services do not need to be differentiated. |
NOTE:
|
RSTP |
|
||
MSTP |
|
MSTP is used in a scenario where traffic in different VLANs is forwarded through different spanning trees that are independent of each other to implement load balancing. In this situation, users or services in different VLANs are distinguished. |
After a spanning tree protocol is configured on an Ethernet switching network, it calculates the network topology and implements the following functions to remove network loops:
Compared with dual-homing networking, the ring networking requires fewer fibers and transmission resources. This reduces resource consumption.
STP prevents broadcast storms. This implements real-time communication and improves communication reliability.