cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15755
Views
50
Helpful
3
Replies

STP Design Question (diameter, message age/max message age timer)

t.reisinger
Level 1
Level 1

Hi,

I have a STP diameter related question. The STP standard specifies the max diameter with 7 and the default max age with 20 seconds (with 1 second delay per switch).To make sure I understand the diameter parameter correctly, the diameter is the maximal amount of switches between the two farthest points in a LAN (not to the root bridge).

For example (max 7 hops):  SW < -> SW <-> SW <-> ROOT <-> SW <-> SW <-> SW

The 7 hop limitation could be an issue with a wide spread network.

The default max age value is 20 seconds and is increased by every switch in the network by one (start at the root bridge with 0). Hence the max distance from the root bridge to the farthest point (switch) is 19 switches/hops, before the BPDU’s are dropped. With this 19 hops in mind, STP is more robust and tolerant in regards of the network size/diameter.

I know some STP implementations where the STP diameter is 12 hops and more (from end to end) and the BPDU’s reach the farthest point. The STP works fine during a failover to a redundant path and back.

I would appreciate your feedback in regard of my experience/question.

Regards

Thomas

3 Replies 3

Peter Paluch
Cisco Employee
Cisco Employee

Hello Thomas,

Let's go over your original post.

The STP standard specifies the max diameter with 7 and the default max age with 20 seconds (with 1 second delay per switch).

I believe that this is a recommendation, not a requirement. Your network diameter may be higher than 7 but in general, such design is not recommended.

the diameter is the maximal amount of switches between the two farthest points in a LAN (not to the root bridge)

Correct.

The default max age value is 20 seconds and is increased by every switch in the network by one (start at the root bridge with 0). Hence the max distance from the root bridge to the farthest point (switch) is 19 switches/hops, before the BPDU’s are dropped.

Not entirely. The STP BPDU contains a field called Message Age which is the one that gets increased every time the BPDU is forwarded by a switch. The BPDU sent by the root switch has the Message Age set to 0. The switches connected directly to the root switch forward (or better said, relay) the BPDU with the Message Age increased to 1, and so on - so indeed, the 19th switch in a row receives the BPDU with the Message Age set to 18 and relays it with the Message Age set to 19. This BPDU would still formally be accepted by the 20th switch because the Message Age is less than the Max Age.

However, a different problem ensues here. The BPDU received on a port expires after (Max Age - Message Age) seconds. So on the 19th switch, the BPDU is received on its root port with the Message Age of 18, thereby leaving mere 2 seconds for this BPDU before it expires from the root port of the 19th switch. As the Hello timer is also set to 2 seconds, the 19th switch would have troubles maintaining a stable view of topology because from its viewpoint, after 2 seconds, the BPDU received on its root port would expire and the switch would proceed to elect a new root bridge, and in almost the same time, it would again receive the BPDU on its root port and for another 2 seconds, it would be happy with it - and then the process would repeat itself over again. So already the 19th switch would be adversely affected.

For the 20th switch, it would receive the BPDU with the Message Age set to 19. You can easily imagine what will happen now - the BPDU will expire after a single second while the BPDUs are generated by the root switch every 2 seconds. The 20th switch would be in state of constant STP flapping.

I know some STP implementations where the STP diameter is 12 hops and more (from end to end) and the BPDU’s reach the farthest point. The STP works fine during a failover to a redundant path and back.

From what has been said already, I think you should see now that the number 7 is not the maximal network diameter in which the STP operates reliably. Also, the diameter is not the same as the maximum number of switches in a row, starting with the root switch - and this number of chained switches in a row is actually the number that has the most profound impact on the STP stability. However, because in a general network, any switch can be considered a root switch under circumstances, the limits are best imposed onto the network diameter - because the diameter is the worst possible number of chained switches, as the number of switches in a row towards a root bridge can be either equal to the diameter, or smaller.

So yes - there can be network having 12 and more switches in a row and working just fine. It is just that there is a limit imposed by the Max Age and the Message Age and the BPDU processing, and it starts making troubles if the network is overly large, so there are some recommended limits and some protocol limits imposed.

Perhaps you would be interested this document as well:

http://www.cisco.com/en/US/tech/tk389/tk621/technologies_tech_note09186a0080094954.shtml

Merry Christmas!

Best regards,

Peter

Thank Sir Peter :)

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Thomas,

in legacy 802.1D STP all timers are related to the hello interval:

hello frequency= 2 seconds

7 hops

=> time duration of STP listening and learning states is :  7*2+1 = 15 seconds

Max-age provides time for 3 hellos missed in a row + 7*2 = 3*2 + 7*2 = 20 seconds

this comes from the fact that 802.1D has no flash updates and a new BPDU flows from root bridge out every 2 seconds, so the timers are thought to provide enough time to make all devices informed of a change that is occurring.

For STP to provide its bridging loop avoidance capabilities all these timers have to be increased if the diameter is bigger then 7.

If you talk of more modern implementations using one or more instances of Rapid STP 802.1W like Cisco Rapid PVST or standards based MST 802.1s there is no need anymore for these timers but max-age is still there used as a max-hops like in RIP.

see

http://www.cisco.com/en/US/tech/tk389/tk621/technologies_white_paper09186a0080094cfa.shtml

with Rapid STP a form of handshake is performed between peers and this negotiation process provides capability of fast convergence

This kind of reasoning about max-age becomes important in ring topologies where a single link failure can create a long daisy chain of switches.

There have been different threads about STP issues in ring topologies reporting different opinions.

see

https://supportforums.cisco.com/message/617028#617028

and

https://supportforums.cisco.com/message/545956#545956

Hope to help

Giuseppe

Review Cisco Networking for a $25 gift card