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?
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?
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.
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.
I'll piggyback off what Daniel Dib said, it is entirely dependent on how your network is setup.
Image this network setup:
ISP
|
|
+---------+ +---------+ +---------+
| | | | | |
| SW1 |-----| CR1 |-----| SW2 |
| | | | | |
+---------+ +---------+ +---------+
This is a completely viable network buildout. In this instance, the STP election process would be drastically reduced because most of the processing has been pushed to CR1
, thus, almost completely eliminating propagation delay and requiring the bare minimum amount of BPDUs.
Imagine again a more sophisticated network topology by simply extending the first:
ISP
|
|
+---------+ +---------+ +---------+ +---------+ +---------+
| | | | | | | | | |
| SW1 |-----| CR1 |-----| SW2 |-----| SW3 | | SW7 |
| | | | | | | | | |
+---------+ +---------+ +---------+ +---------+ +---------+
| | |
| | |
+---------+ +---------+ +---------+
| | | | | |
| SW4 |-----| SW5 |-----| SW6 |
| | | | | |
+---------+ +---------+ +---------+
Now, in the second instance, significantly more BPDUs are sent and loop prevention port roles need to be turned on to make sure loops don't occur. While I can agree with Daniel Dib, most of this does happen in milliseconds, but it really all depends on your network architecture. If you have a gigantic switched network with 100 nodes, it might take a little while (i.e. greater than a few seconds).
Here you have some examples of how to calculate this by yourself
http://www.cisco.com/en/US/tech/tk389/tk621/technologies_tech_note09186a0080094954.shtml
I would say there is no definite answer to your question It all depends on what are the settings of the devices involved
Someone said that it it virtually possible to build networks consisting in hundred of switches. That is not exactly so. Take a look at what is called network diameter. You want to make sure that once the root switch is elected the downstream switches have enough time to receive TCNs and react to them without discarding the BPDUs because they are expired.
You could adjust the timers for bigger networks but it all has to make sense from practical point of view. To make a larger network work you might need to use timer values that make STP slow beyond any decent limit.
Since we speak about TCNs you did not mention what flavor of STP you are looking at. I presume MSTP root election will be a lot longer than 802.1d/w.