Switch maximum hop end-to-end

In my installation, from the server room to the farthest device there are around 8 switches. Due to expansion this may increase to around 10 switches.

According to old cisco documentation (https://community.cisco.com/t5/switching/802-1d-spanning-tree-7-hops-limitation/td-p/763269), the recommended depth (hops) is 7 to allow for STP replication across all switches. Excerpt: “The limit of 7 hops in the standard was the result of extensive simulations done at DEC in the late 80s, using some fairly delay-sensitive protocols as a benchmark (e.g. LAT).”

Some of us may not have been born yet in the 1980s and STP is an older protocol. Does RSTP/MSTP have the same 7 switch limitation. What is the recommendation from Mikrotik.

I have more than 24 switches, connected by fiber optic, and they all work (RSTP)…

i a m not an expert but this is what i have found about the topic

in STP/RSTP/MSTP it depends of the topology

there is a concept called Max diameter:

By default settings RSTP maximum diameter of 20 or less — This means that any Layer 2 device (switch) in the can be no more than 19 hops away from other because: RSTP diameter = number of hops to device +1.

You can have 1.000 switches but ensuring that in your topology you dont surpass 19 hops to ensure RSTP can work OK

RSTP has some configurable parameters that need to be taken care of according to network topology to ensure it works correctly

checking MikroTik Bridge RSTP default configuration looks like it follow diameter of 20 pre-configured with max hops and max age set at 20, but it allows configuring up to 40

RSTP is a complex and wide Topic not to say MSTP which is even more complex

i found this document which provides some useful info

https://www.etherwan.com/sites/default/files/setting_up_stp-rstp-mstp_and_alpha_ring.pdf

Crawling through some posts on the cisco forums seems to concur with 20 being acceptable in the field, depending on the sensitivity to latency of the application. Latency in this case is when a primary link goes down and the backup link takes over. Industrial applications may be more sensitive to latency when say managing factory automation and monitoring, as opposed to a hotel where the most demanding application in terms of latency is voip.

Some say that official cisco documentation still suggests 7 hop for RSTP but everyone seems to concur that this is cisco in covering their ass mode and not to be taken too seriously unless your application is super sensitive to latency.


This is useful thanks!

Indeed the default network diameter is 20, but this does not mean that RSTP won’t work after the 20th Bridge…
Simply a new Root Bridge will be elected… https://wiki.mikrotik.com/wiki/Manual:Spanning_Tree_Protocol

Similarly I am not an expert. But I find that researching and understanding RSTP is more difficult than implementing it once you understand the basic concept. The RouterOS hill was significantly more brutal vs RSTP.

Once I realised the basic concept, I simply made my router my root bridge with a priority of 7000 and for my backup wireless trunks (SXTsq5AC) I increased the path cost to 100 on the switch port to it and on the wlan port in it. I also did the same on the opposite side: switch port to SXT path cost 100 and SXT itself wlan port path cost 100. I am not quite sure where to increase the path cost, so I did it on the switch port to SXT and the SXT wlan port to be double safe, can anyone validate this?

Here’s an intersting read All systems down

STP Design Question (diameter, message age/max message age timer) 7 not a hard limit, more a rule of thumb based on old hardware and time to converge. Similar to the old 50 routers per OSPF area recommendation.

There are other things to worry about with a large layer 2 network, some low end switch ASICs have very limited MAC address tables, and you want to keep these out of anywhere they can be in the main traffic flow areas (keep them out of any loops), as they can cause a lot of flooding when their tables are full, and that can lead to network “meltdowns”.