7 Replies Latest reply: Nov 16, 2013 2:03 PM by Geebs RSS

    STP Convergence.


      Hello Experts,



      I am trying to master the STP convergence process, but I have a few questions related to the design in the picture I attached. So if the CAT1's root port goes down, I understand it will send inferior BPDU's to CAT3 --- it says in the documentation CAT3 will wait the max age timer before transistions it's ports into listening and learning. My question is...Why does CAT3 wait the max-age. It might not be hearing BDPU's from CAT1 anymore (except the inferior ones) but shouldn't CAT1 still be receiving BDPU's from CAT2 (Root Bridge) through it's blocked port fa0/23. Any detailed information you can give me on the STP convergence process would be greatly appreciated. Thank you.


      Also, I know the bridges will send TCN when a port has gone into forwarding and or a port has gone from blocking to forwarding -- but a TCN merely just relays to the RB that the CAM tables entries age out to 15 seconds --- so the root bridge is still in charge of making sure nothing has changed in the topology (via hello time) even though other bridges are aware of changes?


      Thank you again.

        • 1. Re: STP Convergence.
          Daniel Dib CCIE #37149 CCDE #20160011

          I assume you are talking about 802.1D scenario here. The way STP works is that it stores the best BPDU received on a port for 20 seconds (MaxAge). That BPDU is valid for 20 seconds.


          When Cat1 root port goes down like you said it will start sending inferior BPDUs because it knows of no other path towards the root bridge. Cat3 will ignore these BPDUs for up to 20 seconds because it still has the best BPDU stored that says that Cat2 is the root bridge.


          In this scenario it can take up to 50 seconds to converge because first the BPDU must age out with the path towards Cat1. Then Cat3 needs to change root port towards Cat4 and bring this through listening -> learning -> forwarding. It also needs to put the port towards Cat1 as a designated port.


          To help speed up the convergence backbonefast can be used which will be triggered when an inferior BPDU is received.


          802.1w (RSTP) has a mechanism builtin for this type of scenario.

          • 2. Re: STP Convergence.

            Ok sounds good, thanks Daniel. I'm still alittle confused as to what triggers Cat3 to countdown to its max age. I can understand because it knows it's root port is no longer sending BPDUs, but isn't the root bridge sending BPDUs out through Cat4 that will end up being forwardes to Cat3 on its blocking port? Or does the inferior BPDU being sent trigger it to countdown and then proceeds with forward delay? When will Cat4 maxupdate be triggered by this topology change? or will it? Thanks

            • 3. Re: STP Convergence.
              Darren Starr (CCSI, 4xCCNP, 7xCCNA)



              Spanning tree has great debug commands. Wire it up and watch the debugs (turn them all on) and watch it


              Not that I have a copy of IOU, but if I had, I would say that it works pretty well to try there... But since I don't, I won't

              • 4. Re: STP Convergence.
                Daniel Dib CCIE #37149 CCDE #20160011

                The way it works is that every switch stores the best BPDU received on every port. Normally BPDUs are sent out every 2 seconds by the root bridge. This BPDU is relayed out on designated ports. Before the link goes down Cat3 has two paths to choose from. Via Cat1 or via Cat4. The cost is equal (38) so the tie breaker is the sender BID which is derived from this algorithm:


                1. Lowest path cost to root

                2. Lowest sender BID

                3. Lowest port ID (priority + ID of port)


                Because Cat1 has a lower MAC, Cat3 chooses its root port towards that switch.


                It's true that Cat3 has an alternate path and if using uplinkfast it could immediately switch to this port in case of a direct failure on the path towards Cat1. Remember that BPDUs are only relayed on designated ports. Cat3 has no designated ports so the BPDU coming from the root via Cat4 will not be relayed by Cat3 to Cat1.


                So when Cat1 looses its root port it starts sending inferior BPDUs. Cat3 still has the old BPDU that needs to be timed out, it's stored on the port towards Cat1. It will take up to 20 seconds before this BPDU expires depending on when the last BPDU was sent. Remember that Cat3 compares the inferior BPDU to the previously stored one which is better. Receiving an inferior BPDU will not trigger a topology change, however if Backbonefast is used Cat3 will realize that it needs to converge because Cat1 has lost its root port. It will then send out Root Link Queries (RLQ) to make sure that there is an alternate path to the root. When it has received a reply it can tell Cat1 about the alternate path and the network will converge much faster because they don't have to wait on MaxAge to expire.

                • 5. Re: STP Convergence.

                  I thought BPDU's only get sent out root ports? no? Before Cat1 went down -- it was hearing BPDU's from from the root bridge via it's root port, yes?

                  • 6. Re: STP Convergence.
                    Daniel Dib CCIE #37149 CCDE #20160011

                    The root bridge sends BPDUs on designated ports. The switches receive them on their root port and if they have designated ports they will relay them out those ports.

                    • 7. Re: STP Convergence.

                      Thank you, Daniel.