This topic is to discuss the following lesson:
When we connect a cable on Switch which runs STP on a unused port, will whole switch run STP on all ports and all ports move from Listening – Learning–Forwarding mode?
Is the whole switch operation affected? or the port we just connected?
It’s done per interface, not for all interfaces on the switch.
if we suppose that we have 3 switch…we power on them…after booting,
the port of each switch connected each other goes into listening ,because they need to do an election…(in this 15 seconds a port is learning if it will be root port,designated port , or non designated port. Once understood, if it wiil be non designated goes into blocking state otherwise it’s going into learning and then forwarding).Now the switch network will be converged…If now I focus at the port in blocking state ,it receive BPDU by a peer designatet port,every 2 sec, and store that bpdu value (here now we can speak of the value of MaxAge-MessageAge…20 sec)…At one time the blocking port doesn’t receive bpdu from it’s designated switch, this one send a TCN to root bridge out it’s root-port, but my blocking port has to wait 20 second( MaxAge-messageAge) before going into listening state and can send out BPDu frame…Meanwhile this switch with this blocking port has to lower the aging time??? But I don’t understand who say to switch …lower the aging time
The TCN is the trigger to set the aging time, the originating switch will reduce its aging the time and other switches will as soon as they receive the TCN.
That was very good, I would also like to see the same output from a non root switch, and see at which point it changes from designated to root or non-designated. I guess the whole point of this is I can set it up myself and watch what happens.
The output of a non-root bridge will be the same if you connect a new cable, it will go through the listening > learning > forwarding states. It might be interesting though to look at an interface that is currently in blocking mode.
Just take two switches, enable the debug I did and take a look…good exercise
In blocking port state,switch not able to receive and transmit any BPDUs,then How blocking port state move to listening state.
In a Blocking state, the switch does receive BPDUs. In fact, it is the act of receiving inferior BPDUs that keeps the state as Blocking. Should an interface stop receiving BPDUs, then it will transition into a Listening-Learning-Forwarding state.
Thanks for clearing concept.
Root Port , Designated port will send & Receive BPDU right ??
Alternate Port will send and receive BPDU ???
How a Alternate port know , It have to move Listening, Learning , Forwording after Root port down as per attached Topology on switchC.
The concept of an Alternate port was introduced with Rapid Spanning Tree. This feature takes over what the traditional (802.1 D) spanning-tree enhancement of “uplink-fast” used to do. The Alternate port serves as a “hot-standby” for a switch’s Root Port, but Alternate Port is considered to be in a Discarding state (Discarding is the RSTP term for Blocking, Listening, and Disabled for spanning-tree).
This means that an Alternate port can receive BPDUs but will not send them. As soon as a Root Port fails, the Alternate Port will immediately transition to forwarding, skipping the Learning state (there is no such thing as “Listening” in Rapid Spanning Tree).
You are correct that Root and Designated ports both send and receive BPDUs.
OMG,This is the easiest way to understand the stp concept and ports state.
q1) What is the difference between a port in BLOCK and LISTEN state ? LISTEN does send and receive but BLOCK only receives BPDUs ?
q2) I saw an amber light on a port in BLOCK state, but if we have PVST and we configure different root bridges, how does the switch
reflect a ND port that is BLOCK in 1 VLAN but not BLOCK in another VLAN ?
q3) “Only a root or designated port will move to the listening state”
what is the state for the interfaces/ports before everything (e.g. root bridge, root port, designated port) are determined ? – still listening ?
- In the blocking state, the switch only receives BPDUs but does not send them. In the listening state, we send and receive BPDUs.
- If it's an access interface then it will be amber. Trunk interfaces will always have a green led (since you can have more than one VLAN).
- When you first enable the interface, it will start in the listening state.
In your post you mentioned ports in block mode take the 20+15+15 before forwarding in some cases. Could you tell me in which case cause i was trying to simulate but i only got lis->lear->for states and not Max age time.
Thanks in advance.
There are two situations which require a switch to begin STP convergence procedures. The direct and indirect link failures. Let’s take a look at both:
- A direct link failure is when a switch detects a loss of carrier on its own port and immediately declares the port as disconnected. Take a look at the following figure:
The STP is converged and Port B is in blocking state. Imagine Port A goes down. The bridge no longer detects a carrier on that port and immediately causes Port B to go through the STP procedure going into the Listening and Learning states for a total of 15+15=30 seconds. Convergence time in this case is at 30 seconds.
- An indirect link failure is when a link goes down on another switch. This is not immediately detected. Take a look at the following figure:
In this figure, SW1 is the Root Bridge and Port B on SW2 is the blocked port. Also, assume SW2 has a better Bridge ID than SW3. Imagine that Port C on SW2 goes down. How will Port B on SW3 react? Let’s go through the steps.
- SW2 will no longer be receiving BPDUs from SW1 and will declare itself root bridge.
- SW2 will start advertising new BPDUs to SW3 telling SW3 that it is root bridge. SW3 will ignore them because SW1 BPDUs it’s still receiving are superior.
- SW3 will keep the information from the previously received BPDUs on Port B for 20 seconds which is the blocking timer
- Once this timer is expired, Port B will begin considering the BPDUs in the Listening state and will begin relaying SW1’s BPDUs to SW2 since they are superior
- Then SW2 will detect the better information it is receiving on Port D and will cycle the port through Listening and Learning.
- Both switches (2 and 3) will eventually place their ports in the forwarding states and connectivity will be recovered.
In this case, the total time is 20+15+15=50.
The 50 second convergence time is more often quoted for STP because it is the absolute longest time that you may have to wait for STP to fully converge.
I hope this has been helpful!
Thanks so much Laz.