Technical Details of RSTP
Proposal/Agreement Mechanism
The Proposal/Agreement mechanism of RSTP enables a designated port to quickly enter the Forwarding state. In Figure 14-14, root bridge S1 establishes a link with S2. On S2, p2 is an alternate port; p3 is a designated port and is in Forwarding state; p4 is an edge port.
- p0 and p1 become designated ports and send RST BPDUs to each other.
- The RST BPDU sent from p0 is superior to that of p1, so p1 becomes a root port and stops sending RST BPDUs.
- p0 enters the Discarding state and sets the Proposal and Agreement fields in its RST BPDU to 1.
- After S2 receives an RST BPDU with the Proposal field set to 1, it sets the sync variable to 1 for all its ports.
- p2 is already blocked, so its state remains unchanged. p4 is an edge port and does not participate in calculation. Therefore, only the non-edge designated port p3 needs to be blocked.
- After the synced variable of each port is set to 1, p2 and p3 enter the Discarding state, and p1 enters the Forwarding state and returns an RST BPDU with the Agreement field being set to 1 to S1. This RST BPDU carries the same information as that in the BPDU sent by the root bridge, except that the Agreement field is set to 1 and the Proposal field is set to 0.
- After S1 receives this RST BPDU, it identifies that the RST BPDU is a response to the proposal that it has sent. Then p0 immediately enters the Forwarding state.
The Proposal/Agreement process can proceed to downstream devices.
STP can select designated ports quickly; however, to prevent loops, all ports must wait at least one Forward Delay interval before starting data forwarding. RSTP blocks non-root ports to prevent loops and uses the Proposal/Agreement mechanism to shorten the time that an upstream port waits before transitioning to the Forwarding state.
The Proposal/Agreement mechanism applies only to P2P full-duplex links between two devices. When Proposal/Agreement fails, a designated port is elected after two Forward Delay intervals, which is the same as designated port election in STP mode.
RSTP Topology Changes
RSTP considers that the network topology has changed when a non-edge port transitions to the Forwarding state.
The local device starts a TC While timer on each non-edge designated port and root port. The TC While timer value is twice the Hello Time value.
Within the TC While time, the local device clears MAC address entries learned on all ports.
At the same time, the non-edge designated ports and root ports send out RST BPDUs with the TC bit set to 1. When the TC While timer expires, the ports stop sending RST BPDUs.
When other switching devices receive RST BPDUs, they clear MAC address entries learned on all their ports except the ports that receive the RST BPDUs. These switching devices also start a TC While timer on each non-edge designated port and root port and repeat the preceding process.
Interoperability with STP
Although RSTP can interoperate with STP, this will prevent its advantages such as fast convergence from being leveraged.
On a network with both STP-capable and RSTP-capable devices, STP-capable devices drop RST BPDUs. If a port on an RSTP-capable device receives a configuration BPDU from an STP-capable device, the port switches to the STP mode and starts to send configuration BPDUs after two Hello intervals.
After STP-capable devices are removed, Huawei RSTP-capable devices can switch back to the RSTP mode.