STP/RSTP

STP is the abbreviation for spanning tree protocol, and RSTP is the abbreviation for rapid spanning tree protocol. Generally, the topology for the Layer 2 switching network involves the loop. This may result in the broadcast storm and MAC bridge table flapping. The STP/RSTP protocol aims to prune a bridged LAN to a spanning tree in the logical topology. Thus, the broadcast storm can be avoided.

Basic Principle

STP applies to a redundant network. Based on a certain algorithm, the STP is used to block redundant trails so that a loop network can be trimmed as a tree network. In this way, the proliferation and endless cycling of packets in the loop network are avoided. Besides, a connected network without redundant trails can be formed in the case of the link failure.

RSTP is an improvement of the STP. The RSTP not only supports all the functions of the STP, but also shortens the delay of generating the network topology structure and ensures the connectivity of the network.

STP is based on this basic principle. That is, bridge protocol data units (BPDUs) are transmitted between bridges to decide the network topology structure. The STP blocks redundant links to prevent possible loops in the bridged network, and activates the redundant backup links to restore the network connectivity when the working trail fails. BPDUs of STP are classified into two types:
  • Configuration BPDU (CBPDU)
  • BPDU for topology change notice (TCN)

RSTP is based on STP. RSTP makes, however, detailed modifications and supplements to STP. Different from STP, RSTP shortens the time delay at the ports from congestion to forwarding, rapidly restores the network connectivity, and provides better services if no temporary loops are caused. The protocol packets transmitted between the bridges using RSTP are rapid spanning tree protocol data units (namely, RST PDUs).

NOTE:
OptiX NG WDM the Ethernet data boards support both STP and RSTP. By default, they support RSTP.

Status Migration for Ports

The STP ports are of either the Enabled or Disabled status. The Enabled status is further classified into the following statuses: Blocking, Listening, Learning and Forwarding. According to the forwarding and learning situation of the port, RSTP sorts Disabled, Blocking and Listening to Discarding. For this reason, there are altogether three statuses: Learning, Forwarding and Discarding.

Figure 1 shows the status migration of an STP port.
Figure 1 Status migration of STP ports

  • Disabled: The port in the Disabled status is not involved in the topology and does not forward any packets. Any sub-status of the Enabled status can migrate to this status. The Disabled status must migrate to the Blocking status to enter the Enabled status. The STP cannot control this status because the port in the Disabled status is not involved in the topology. This status can only be controlled by the management.
  • Blocking: The port in the Blocking status is involved in the topology, and does not forward any packets. Moreover, it does not learn the MAC addresses.
  • Listening: The port in the Listening status is involved in the topology. It can forward BPDUs and discard service packets. It does not, however, learn the MAC addresses. The Listening status is a temporary status when a topology is being created or transformed.
  • Learning: The port in the Learning status is involved in the topology. It can forward BPDUs and discard service packets. Moreover, it learns the MAC addresses of the service packets to make ready for forwarding these packets. The Learning status is a temporary status when a topology is being created or transformed.
  • Forwarding: The port is in Forwarding status is involved in the topology. It can forward the service packets and BPDUs.

Migrate some ports into the Forwarding or Blocking status by controlling the port status. If a loop exists, at least one port is blocked to release the loop. This is the ultimate goal of the STP algorithm.

For the STP, the convergence time is relatively long and the ports play unclear roles. In this case, the RSTP is widely used and is compatible with the STP. In comparison with the STP, the RSTP shows the following improvements.
  • By configuration, the ports play clear roles. Root port, Designated port, Replacing port, Backup port.
    NOTE:
    RSTP can configure an edge port to help the topology-independent port to rapidly forward service packets.
  • A more active handshake mechanism is applied to decrease the port status to the following types: Forwarding, Learning, Discarding.
  • The Discarding status in the RSTP maps with the Listening, Blocking, and Disabled status in the STP.
  • Fast convergence.

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.