07-16-2009 08:52 AM - edited 03-06-2019 06:48 AM
Hi every body!
Let say we just installed a switched network. Stp is configured on all switches.
Once the root switch is elected, every switch will detrmine its root port , designated port and blocked port. All root ports and designated ports are put in forwarding state ( i.e these ports at this momentm,do not go through listening state,learning states).
Network is converged.
Let focus on switch (sw1) in the switched network.
Sw1 f0/1 is connected to host.
we turn this host off and then turn it back on.Following steps will occur:
1)Sw1 will decide if its f0/1 is designated port.
2) having decided f0/1 is designated port, switch1 will put this f0/1 into transitory states i.e listening, learning.
3) After these transitory states, port f0/1 finally gets into forwarding state.
=======================================
It appears to me, if the root switch remain same ,then switch 's designated port,connected to host, will go through listeing and learning states one that port becomes active.
Switch only put its designated port into forwarding state without listening and learning states when it participates in root switch election.
Is it correct concept?
thanks a nd have a nice day!
Solved! Go to Solution.
07-16-2009 08:56 AM
Sarah
If SW1 fa0/1 is connected to a host you should configure that port with portfast enabled. With portfast enabled the port does not go through the listening/learning phases, it goes straight to forwarding.
Jon
07-16-2009 11:21 AM
Sarah
My understanding is that if the network is powered up the listening/learning/forwarding states do not apply but i could be wrong about this.
While the root and designated ports are being decided on no ports are actually blocking. Only once the topology has converged are there any blocking ports.
If there is then a topology change then any blocked ports that need to be put in a forwarding state then need to go through the listening/learning/forwarding states in 802.1d.
This has always been my understanding.
Edit - apologies for the original post about portfast, should have known you would be aware of it.
Jon
07-16-2009 08:56 AM
Sarah
If SW1 fa0/1 is connected to a host you should configure that port with portfast enabled. With portfast enabled the port does not go through the listening/learning phases, it goes straight to forwarding.
Jon
07-16-2009 09:22 AM
Hi Sarah,
When a switch is put on power and the IOS boots, all ports start in the blocking state.
In this blocking state only the STP BPDUs are received and forwarded so the spanning tree algorithm can determine the root switch and the state of each port on each switch.
Ports that are elected as designated ports go from blocking to listening then learning and forwarding as the spanning-tree process dictates.
If the switch put its ports right into the forwarding state then the layer 2 loop could be formed, which the spanning-tree algorithm is supposed to prevent.
As Jon suggests in case of F0/1 you can use the "spanning-tree portfast" command to put it right into the forwarding state when the host is connected to it.
Cheers:
Istvan
07-16-2009 11:06 AM
Thanks Jon and Istvan.
"Ports that are elected as designated ports go from blocking to listening then learning and forwarding as the spanning-tree process dictates."
Is the above true even when the whole switched networks just gets turned on? or
is the above true only when a switch is powerd on, no root election takes place as switch is receiving superior bpdu from the current root?
Because my book says" after root switch is selected, each switch determines designated, root and blocked port.Each switch then puts its designated and root port into forwarding state."( book did not mention any listening and learning states here, rather ports are put into forwarding state right away)
i understand that if i turn on a switch, and that switch receives a superior bpdu from current root, then switch will put its desginated port through listening and learning states.
What about when the whole network is just truned on, and root election takes place, each switch determines its root, designated and blocked port.Will each switch put its designated and root port through listening and learning states ?
Thanks and have a nice day!
07-16-2009 11:21 AM
Sarah
My understanding is that if the network is powered up the listening/learning/forwarding states do not apply but i could be wrong about this.
While the root and designated ports are being decided on no ports are actually blocking. Only once the topology has converged are there any blocking ports.
If there is then a topology change then any blocked ports that need to be put in a forwarding state then need to go through the listening/learning/forwarding states in 802.1d.
This has always been my understanding.
Edit - apologies for the original post about portfast, should have known you would be aware of it.
Jon
07-16-2009 11:46 AM
Thanks Jon.
I agree with you.
Here is my logic which might well be illogical (:-)
These states ( listening and learning states) ensure that every switch the gets the topology change information in the network before a blocked port can be put into operation.
Since at the time of start up, no such info is exchanged( toplogy change), it is ensured that that single path exists between two nodes in the switched network, therefore it makes sense to do away with these states( learning and listening state) at network's intialization stage.
Thanks and have a nice day!
07-16-2009 11:57 AM
Hi Sarah,
RSTP can only put a designated port in forwarding without using the listening/learning phases if:
- the port is an edge port (portfast)
- it receives an agreement to its proposal.
So basically, you don't see the intermediate stages of lis/learn because they are skipped by an additional mechanism put in place by RSTP.
Regards,
Francois
07-16-2009 02:23 PM
Hi francois.
We are discussing STP.
AS I am not sure so i put this question to you .
A nework is just powered up. Root switch is already elected. A switch already has determined root and designated port. Will this put its designated and root port through listening, learning states ? Jon and I believe these states are bypassed in such a situation.
thanks a lot Francois.
07-16-2009 03:09 PM
With STP? You definitely go through listening and learning states.
Well, of course uplinkfast can bypass this for the root port, and portfast can bypass that for designated.
I thought your question was based on observing RSTP and not seeing listening/learning for designated ports;-)
Regards,
Francois
07-17-2009 12:33 AM
Francois
Is this the same when the switches boot up ie. if they all boot up at same time and they then elect root/designated ports do they go through the listening/learning stages.
Obviously a blocked port that needs to start forwarding has to go through these stages but what about when the network first comes online ?
Jon
07-17-2009 07:17 AM
Hi Jon,
There is nothing special at bootup. It's basically as if all the port were "no shut" at once. It is important to start from a discarding state to prevent temporary loops. For example, if you boot up a switch that is redundantly connected to a LAN, you don't want its ports to start in forwarding state.
Regards,
Francois
07-17-2009 08:04 AM
Francois
Makes perfect sense when you put it like that.
Many thanks for clearing that up.
Sarah - apologies for the misleading info, looks like i need to hit the books again !
Jon
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide