thank you for the lesson. it definitely cleared a lot of doubts.
It is a great lesson to understand the Topology change on the STP. I have a question which is related to the switches which receives only BPDU with TCN flag set from the Root bridge
Assume that Switch network has few more switches and TCN notification generated by switch ( switch A on the diagram) has not been pass through on these switches . I need to know what would be the mac address aging time for the other switches which receives BPDU’s with TCN flag set. My understanding is if a switch in the switch network received the TCN from the Root bridge the switch set the mac address aging time to max-age in the STP.
My other question is, due to some reason when switch does not receive the BPDU, will this switch wait for Max age time (20s) by default to flush the Mac-address table? Then how the STP reconvergence will affect the switch network
By default the Aging time 5 minutes will clear all the Mac address in the table and relearn it or only clear those host MAC address that have no activity for 5 minutes?
The aging time applies only to specific MAC addresses. Wiping the entire MAC address table every 5 minutes would be a bad idea
Ok. Thanks Rene.
I am getting confused with this concepts in STP, The more i read the more i am getting confused
Please help me upnderstand this concepts, I 've wriiten my understanding and questions.
In a Steady state Network assuming the packet between computer A and Computer B takes (Switch B --> Switch A --> Switch C --> Switch D)
**Question related to interface states and convergence time**
Switch C (Root Bridge) generates configuration BPDU’s and sends it to Switch A and Switch D and in turn they relay it to switch B
When we have an indirect link failure (shutting down the interface between Switch A and Switch C i.e fa0/16)
Switch A will start advertising itself as Root switch to switch B (downstream)
Since the BPDU received at switch B is inferior to the BPDU which it had received earlier, it will start the max-age timer ignoring BPDU’s till 20 secs
Once the max-age is expired the interface fa0/19 of switch B will move into Listening state, eventually move out to learning and forwarding
Totally it takes 50 sec for the interface (fa0/19) to move from blocking to Forwarding state
what exactly happens in the listening state ? it will start electing the root switch, root port, dp etc ? is my other understanding are correct ?
**Question related to Topology Change**
When ever we have a topology change the switch with interface going up/down, will generate a BPDU with TCN flag set and sends it towards the root switch
This is the only time where a non-root switch will generate a BPDU towards the root switch
The switches which receive the BPDU will acknowledge back to the sender switch which generated the TCN and also relay the BPDU towards the root switch
once it reaches the root switch, it will propagate the changes to the entire switch network in that segment
upon receiving on this BPDU every switch in that segment will reduce mag-aging timer to 15 secs
so my question is TCN is more of to do with aging out the mac-table and it has no significance in the interface state changes ?
I’ve written my understaning and questions. Pleae help me with this questions.
can you please shed some light on this ? The more I explore the more i am getting confused.
If you want to see exactly what is going on in a topology like this I highly recommend to configure 4 switches and to enable “debug spanning-tree events” on all switches. It will show you exactly why and how the interfaces are moving through the different states. It’s much easier to see it then just to read and visualize how it works.
In the listening state we only process BPDUs. This time is used to learn what the STP topology looks like, it’s when we elect ports etc yes.
The main reason for the TCN is to reduce the MAC address table aging timer from 300 to 15 seconds. If we don’t do this then it’s possible that traffic gets blackholed for up to 300 seconds.
I did try with the topology and got my doubts cleared. but just wondering in your reply you wanted to say in listening it will send BPDU’s ?
I need to try the same for RSTP now since i am getting confused
“In the listening state we only process BPDUs. This time is used to learn what the STP topology looks like, it’s when we elect ports etc yes.”
You are correct. In the STP Listening state, the router will both send and receive BPDUs, but it will not forward any other network traffic.
i would like to see if I understand theory Of tcn:
When a non-root switch detect a topology change ,maybe an interface goes down, it delete mac learned From that interface , generate and forward a tcn towards root bridge on its root port and reduce aging time to forward delay.The upstream switch detect on its designated port this tcn, ack this tcn, reduce its aging time, generate a tcn itself and forward to root bridge on its root port, right? These 2 switch has not to wait tc of rootbridge, to reduce aging time, maybe other switch in other side Of the network, reduce aging time as they receive tc generate by rootbridge… Is correct my discuss?
In addition to the mac address table being cleared faster upon receiving TCN’s, does it also clear the ARP entries (faster) for it as well?
Or is the faster clearing, strictly mac address table?
Regarding the "All switches received the topology change notification and set their age out timer to 15 seconds. ", is there anyway to tune this timer to more smaller like 5 sec?
@Rafael This only applies to the MAC addresses, not the ARP table.
@Amy You sure can. This is the forward delay timer which is 15 seconds by default. It can be changed per VLAN:
SW1(config)#spanning-tree vlan 1 forward-time ? <4-30> number of seconds for the forward delay timer
Thanks for great document,I have a one question.
When would switches reduces its aging time? On receiving of tcn messages or tc messages?
If we are talking about traditional spanning tree (802.1 D), and not rapid spanning tree (802.1 W), a switch will set the aging of the MAC address table equal to the Max Age timer when it receives the Topology Change Acknowledgement from the Root Bridge. It works like this:
A switch, let’s say it is not the root bridge, has event that causes it to generate a topology change. It’s goal is to send this to the root bridge, and then it is the root bridge’s job to acknowledge this change. This acknowledgement starts with the Root Bridge and makes its way throughout the network from there. Once the other switches receive this acknowledgement, that’s their indication that they need to set the MAC address table aging to the Max Age timer value.
Rapid Spanning tree works completely differently, by the way.
Thanks for creating this blog, it’s written very well.
Can you please explain in detail the Designated port. Is it not that the designated port has to be only on the root bridge? Are all forwarding ports designated port? What is the difference between root port and designated port? if you can explain with your example in the blog, it would be great?
Glad to hear you like it.
For each segment in the network, there has to be a designated port that forwards traffic. This means that you will also find designated ports on non-root bridges.
For example, imagine we have SW1, SW2 and SW3 connected in a triangle. SW1 is the root bridge.
On the connection between SW2 and SW3…someone has to forward traffic there, either SW2 or SW3. One of the interfaces will become a designated port, the other one will be non-designated and blocked.
The root port is the interface that has the best (shortest) path to the root bridge.
Awesome lesson, thanks.
I have some doubt on selecting Designated and Non Designated port on non root bridge.
Can you pls explain how D and ND ports selected in your 4 switches topology on the segment
between SwitchB--------SwitchD , will it be mac address or port cost ? while switchC is root bridge,
and one more thing on switchB in your 4 switch topology SwitchA-------(Root port)SwitchB, So port connected to SwitchB Root port on switchA will automatically
become Designated port ?