STP - RSTP while timer

The while timer in Rapid Spanning Tree Protocol (RSTP) is used to quickly send BPDUs with the Topology Change (TC) bit set, thus informing other bridges of topology changes. Here is the process in detail.

  1. When a topology change occurs, the bridge that detects it will send out a BPDU with the TC bit set.
  2. When a bridge receives a BPDU with the TC bit set, it will start a TC while timer internally which is equal to 2x the hello timer. As long as the while timer has not expired, all of the BPDUs sent out from this bridge for that time period will have the TC bit set.
  3. Once the while timer expires, all subsequent BPDUs sent by the local bridge will not have the TC bit set.
  4. Every time a BPDU is received with the TC bit set, the while timer is started again, and the process continues.

The reasoning behind this is that as long as a bridge is receiving BPDUs with the TC bit set, it too will send out BPDUs with the TC bit set, informing neighbors of a topology change. If the while timer expires without receiving another BPDU with the TC bit set, that means that the topology has stabilized, and thus, it too will stop sending BPDUs with the TC bit set.

Why is it set to 2x the hello timer? Well, that’s because BPDUs are sent every hello time. Using a value of 2x the hello timer will ensure that at least one BPDU will be sent out by the local bridge with the TC bit set.

The Topology Change While Timer should not be confused with the Topology Change Timer

For more information on STP in general, take a look at Spanning Tree Protocol (STP)

Links:

https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24062-146.html

https://networklessons.com/spanning-tree/rapid-spanning-tree-rstp/