How long does it take to Elect a Root Bridge in STP

spanning tree

We have been searching for so long, we know and understand all of the timers in STP and RSTP. We aren't sure how much time the process of choosing a root bridge takes.

How long does the root bridge election process take?

Best Answer

I don't think it's possible to give a definitive answer on this because it will depend on the switch architecture, CPU power, the distance between the switches, the topology, the speed of the links and so on. I assume the delay would be something like this if we have three switches daisy chained:

+----------+           +----------+           +----------+
|          |           |          |           |          |
|   SW1    +-----------+  SW2     +-----------+  SW3     |
|          |           |          |           |          |
+----------+           +----------+           +----------+

Assume that SW1 has the best BID so that it should be elected root. Also assume that all switches have just been booted up, the way STP works all will claim to be root until they have heard a better BPDU. All links are Gigabit.

  1. STP process runs and generates BPDU
  2. BPDU must be serialized on to the link (serialization delay)
  3. BPDU must be propagated between switches (propagation delay)
  4. Act on BPDU received, change port roles
  5. Send out BPDU on designated ports

All in all it should be in the millisecond range. It will be variable based on the speed and distance of links between switches and how fast they can process BPDUs. STP is fast to act on things where links go down, the issue is if you have unidirectional links or "passive" failures like a converter that won't give link down.