2

I would have a really basic question... Why the spanning tree have forward delay ? (listening=15s and learning=15s).

Why initially the protocol has been designed like this ? 30 seconds before forwarding the traffic seems to be really disproportionate.

5

Mainly due to two reasons:

  • Allow enough time for all bridges to hear the change in the topology.
  • Avoid duplicate frames.

From Understanding and Tuning Spanning Tree Protocol Timers see below:

The movement of a port into the listening state indicates that there is a change in the active STP topology and that a port will go from blocking to forwarding. So the listening and learning periods during which the forward delay runs must cover this consecutive period:

Time from when the first bridge port enters the listening state (and stays there through the subsequent reconfiguration) to when the last bridge in the bridged LAN hears of the change in the active topology

In addition, you need to count the same delay that you use to calculate max age (message age overestimate and BPDU propagation delay).

Time for the last bridge to stop forwarding frames that are received on the previous topology (maximum transmission halt delay), until the last frame that is forwarded on the previous topology disappears (maximum frame lifetime)

This amount of time is necessary in order to be sure that you do not get duplicated frames.

Therefore, twice the time of the forward delay (listening time + learning time) contains all these parameters. The formula is:

2 x forward delay 
= end-to-end_BPDU_propagation_delay + Message_age_overestimate + 
    Maximum_frame_lifetime + Maximum_transmission_halt_delay 
= 14 + 6 + 7.5 + 1 = 28.5 

forward_delay 
= 28.5 /2 
= 15 (rounded)

Networking protocols and industry requirements have changed since when STP was initially created. STP is kind of old and has evolved into further flavors like RSTP, PVST, PVST+, MSTP to satisfy the need of faster and more resilient networks.

For example let's compare STP vs RSTP topology change and you will clearly see why STP is so slow. STP had to wait the TCN flag all the way up from the Root Bridge.

enter image description here

4
  • Thanks it's clear! but I still don't understand why these timers are so long, 30 seconds seems to be huge. With the electrical signal all informations could be delivered through a LAN "almost" instantaneously. So 30 seconds before to pass in forwarding state, could be considered as a big security ? – bdes31 Jan 7 '18 at 9:58
  • 1
    @bdes31 you can always optimize timers in spanning-tree, for instance, if you already know it's an end user connecting to your network, you can specifically use portfast in order for the switch to go directly into the forwarding state. – user36472 Jan 7 '18 at 11:42
  • Good Answer -- Question, where did that illustration of the topology change process in STP vs RSTP come from? – Eddie Mar 18 '20 at 21:08
  • @Eddie from windows paint and packet tracer put together – DRP Apr 1 '20 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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