Take the 2-minute tour ×
Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

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?

share|improve this question
1  
Please explain why you care how long root bridge election takes. Are you trying to discover how quickly a switched network permits host-to-host communication after power on? If so, that's not the question you asked. –  Mike Pennington Jan 26 at 11:47

3 Answers 3

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.

share|improve this answer

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).

share|improve this answer
    
Does anyone build Layer2 domains with hundreds of switches? For theirs and their employer's sake, I hope not. –  Mike Pennington Jan 26 at 12:39
    
@MikePennington I agree, it isn't optimal. Case and point: I'm currently in the middle of transitioning a layer 2 network of over 90 nodes to a layer 3 down to the access layer; I've got my work cut out for me. Most shops nowadays don't see the need for routing since protocols like MSTP, in conjunction with VRRP/HSRP, make layer 2 so attractive. –  Ryan Foley Jan 26 at 13:10
1  
In my opinion, there are good arguments against large layer2 domains: bad mac traceroute support, no standardized mapping between macs and hostnames, and this unpleasant thing called spanning-tree, which spams broadcasts in loops when BPDUs are dropped. –  Mike Pennington Jan 26 at 13:15
    
@MikePennington I couldn't agree more. My only reasoning nowadays for not routing to a device is if the node doesn't support routing or can't participate in OSPF; and with the lowest end of Juniper EX products (EX2200) supporting OSPF, there isn't a reason not to. –  Ryan Foley Jan 26 at 13:19

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.