No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


Configuration Guide - Ethernet Switching

S7700 and S9700 V200R011C10

This document describes the configuration of Ethernet services, including configuring link aggregation, VLANs, Voice VLAN, VLAN mapping, QinQ, GVRP, MAC table, STP/RSTP/MSTP, SEP, and so on.

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Improvements in RSTP

Improvements in RSTP

In 2001, IEEE 802.1w was published to introduce the Rapid Spanning Tree Protocol (RSTP), an extension of the Spanning Tree Protocol (STP). RSTP was developed based on STP and makes supplements and modifications to STP.

Disadvantages of STP

STP ensures a loop-free network but has a slow network topology convergence speed, leading to service quality deterioration. If the network topology changes frequently, connections on the STP network are frequently torn down, causing frequent service interruption. This is unacceptable to users.

STP has the following disadvantages:

  • STP does not distinguish port states and port roles clearly, making it difficult for less experienced administrators to learn and deploy this protocol.

    A network protocol that clearly defines and distinguishes different situations outperforms the others that fail to do so.

    • Ports in the Listening, Learning, and Blocking states are the same to users because they are all prevented from forwarding service traffic.

    • From the perspective of port use and configuration, the essential differences between ports lie in the port roles rather than port states.

      Both root and designated ports can be in Listening state or Forwarding state, so the ports cannot be distinguished by their states.

  • The STP algorithm determines topology changes after the timer expires, which slows down network convergence.

  • The STP algorithm requires that the root bridge should send configuration BPDUs after the network topology becomes stable, and other devices process and spread the configuration BPDUs to the entire network. This also slows down topology convergence.

Improvements Made in RSTP

RSTP deletes three port states, defines two new port roles, and distinguishes port attributes based on port states and roles. In addition, RSTP provides enhanced features and protection measures to ensure network stability and fast convergence.

  • More port roles are defined to simplify the learning and deployment of the protocol.

    Figure 14-11  Diagram of port roles

    As shown in Figure 14-11, RSTP defines four port roles: root port, designated port, alternate port, and backup port.

    The functions of the root port and designated port are the same as those defined in STP. The alternate port and backup port are described as follows:
    • From the perspective of configuration BPDU transmission:
      • An alternate port is blocked after learning a configuration BPDU sent by another bridge.
      • A backup port is blocked after learning a configuration BPDU sent by itself.
    • From the perspective of user traffic:
      • An alternate port acts as a backup of the root port and provides an alternate path from the designated bridge to the root bridge.
      • A backup port acts as a backup of the designated port and provides a backup path from the root bridge to the related network segment.

      After roles of all RSTP ports are determined, the topology convergence is completed.

  • RSTP redefines port states.

    RSTP deletes two port states defined in STP and reduces the number of port states to 3. Depending on whether a port can forward user traffic and learn MAC addresses, the port may be in any of the following states:

    • If the port does not forward user traffic or learn MAC addresses, it is in the Discarding state.
    • If the port does not forward user traffic but learns MAC addresses, it is in the Learning state.
    • If the port forwards user traffic and learns MAC addresses, it is in the Forwarding state.

    Table 14-11 compares the port states defined in STP and RSTP. Port states are not necessarily related to port roles. Table 14-11 lists possible states for different port roles.

    Table 14-11  Comparison between port states defined in STP and RSTP

    STP Port State

    RSTP Port State

    Port Role



    Root port or designated port



    Root port or designated port



    Root port or designated port



    Alternate port or backup port




  • RSTP changes the configuration BPDU format and uses the Flags field to describe port roles.

    RSTP retains the basic configuration BPDU format defined in STP and makes minor changes:
    • The value of the Type field is changed from 0 to 2. Devices running STP will drop the configuration BPDUs sent from devices running RSTP.
    • The Flags field uses the six bits reserved in STP. This configuration BPDU is called an RST BPDU. Figure 14-12 shows the Flags field in an RST BPDU.
    Figure 14-12  Format of the Flags field in an RST BPDU

  • Configuration BPDUs are processed in a different way.
    • Configuration BPDU transmission

      In STP, the root bridge sends configuration BPDUs at Hello intervals after the topology becomes stable. Non-root bridges send configuration BPDUs only after they receive configuration BPDUs from upstream devices. This complicates the STP calculation and slows down network convergence. RSTP allows non-root bridges to send configuration BPDUs at Hello time intervals after the topology becomes stable, regardless of whether they have received configuration BPDUs from the root bridge.

    • BPDU timeout period

      In STP, a device has to wait a Max Age period before determining a negotiation failure. In RSTP, a device determines that the negotiation between its port and the upstream device has failed if the port does not receive any configuration BPDUs sent from the upstream device within the timeout interval (Hello Time x 3 x Timer Factor).

    • Processing of inferior BPDUs

      When an RSTP port receives an RST BPDU from the upstream designated bridge, the port compares the received RST BPDU with its own RST BPDU.

      If its own RST BPDU is superior to the received one, the port discards the received RST BPDU and immediately responds to the upstream device with its own RST BPDU. After receiving the RST BPDU, the upstream device replaces its own RST BPDU with the received RST BPDU.

      In this manner, RSTP processes inferior BPDUs more rapidly, independent of any timer.

  • Rapid convergence

    • Proposal/agreement mechanism

      In STP, a port that is selected as a designated port needs to wait at least one Forward Delay interval (Learning state) before it enters the Forwarding state. In RSTP, such a port enters the Discarding state, and then the proposal/agreement mechanism allows the port to immediately enter the Forwarding state. The proposal/agreement mechanism must be applied on P2P links in full-duplex mode.

      For details, see RSTP Technology Details.

    • Fast switchover of the root port

      If a root port fails, the best alternate port becomes the root port and enters Forwarding state. This is because the network segment connected to this alternate port has a designated port connected to the root bridge.

      When the port role changes, the network topology changes accordingly. For details, see RSTP Technology Details.

    • Edge ports

      In RSTP, a designated port on the network edge is called an edge port. An edge port directly connects to a terminal and does not connect to any other switching devices.

      An edge port does not participate in RSTP calculation. This port can transition from Disable to Forwarding state immediately without a delay. An edge port becomes a common STP port once it is connected to a switching device and receives a configuration BPDU. The spanning tree needs to be recalculated, causing network flapping.

  • Protection functions

    RSTP provides the following functions:

    • BPDU protection

      On a switching device, ports directly connected to a user terminal such as a PC or file server are edge ports. Usually, no RST BPDUs are sent to edge ports. If a switching device receives bogus RST BPDUs on an edge port, the switching device automatically sets the edge port to a non-edge port and performs STP calculation. This causes network flapping.

      BPDU protection enables a switching device to set the state of an edge port to error-down if the edge port receives an RST BPDU. In this case, the port remains the edge port, and the switching device sends a notification to the NMS.

    • Root protection

      The root bridge on a network may receive superior RST BPDUs due to incorrect configurations or malicious attacks. When this occurs, the root bridge can no longer serve as the root bridge, causing an incorrect change of the network topology. As a result, traffic may be switched from high-speed links to low-speed links, leading to network congestion.

      If root protection is enabled on a designated port, the port role cannot be changed. When the designated port receives a superior RST BPDU, the port enters the Discarding state and does not forward packets. If the port does not receive any superior RST BPDUs within a period (generally two Forward Delay periods), the port automatically enters the Forwarding state.

      Root protection takes effect only on designated ports.

    • Loop protection

      On an RSTP network, a switching device maintains the states of the root port and blocked ports based on RST BPDUs received from the upstream switching device. If the ports cannot receive RST BPDUs from the upstream switching device because of link congestion or unidirectional link failures, the switching device re-selects a root port. Then, the previous root port becomes a designated port and the blocked ports change to the Forwarding state. As a result, loops may occur on the network.

      As shown in Figure 14-13, when the link between BP2 and CP1 is congested, the root port CP1 on DeviceC cannot receive BPDUs from the upstream device. After a specified period, the alternate port CP2 becomes the root port and CP1 becomes the designated port. As a result, a loop occurs.

      Figure 14-13  Topology change upon link congestion

      If the root port or alternate port does not receive BPDUs from the upstream device for a long time, the switch enabled with loop protection sends a notification to the NMS. The root port enters the Discarding state and becomes the designated port, whereas the alternate port keeps blocked and becomes the designated port. In this case, loops will not occur. After the link is not congested or unidirectional link failures are rectified, the port receives BPDUs for negotiation and restores its original role and status.


      Loop protection takes effect only on the root port and alternate ports.

    • TC BPDU attack defense

      A switching device deletes its MAC address entries and ARP entries after receiving TC BPDUs. If an attacker sends a large number of bogus TC BPDUs to the switching device in a short time, the device frequently deletes MAC address entries and ARP entries. This increases the load on the switching device and threatens network stability.

      After enabling TC BPDU attack defense on a switching device, you can set the number of times the device processes TC BPDUs within a given time. If the number of TC BPDUs that the switching device receives within the given time exceeds the specified threshold, the switching device processes only the specified number of TC BPDUs. Excess TC BPDUs are processed by the switching device as a whole after the specified period expires. This function prevents the switching device from frequently deleting its MAC address entries and ARP entries.

Updated: 2019-10-18

Document ID: EDOC1000178310

Views: 315268

Downloads: 151

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next