Introduction to Spanning-Tree

Hi Rene,

Please explain alternate port selection between SwB and SwC.
Thanks

Oh got it.
Better bridge identifier win the battle :smiley:

That was brilliant, clear and easy to understandThanks! Rene.

Hi Rene,

I have one question that didn’t find any port that staying 20 sec for Blocking then Listening , Learning ,Forwarding.When a new port connect its start from Listening.The port Blocking in STP , after down Root port, The blocking port also start from Listening , So where is the 20 see blocking state.Appreciate your very nice explanation :slight_smile:

br//
zaman

Hi Zaman,

When you connect a new port, it will start in the listening state (15 seconds) and then goes into the learning state (15 seconds) so it takes 30 seconds in total to get to forwarding.

An interface that is in blocking state will remain in blocking state for 20 seconds before it goes to the listening state, that’s why it takes 20 + 15 + 15 = 50 seconds in total.

Rene

1 Like

Hi Rene,

I think you have a typo mistaken on SwitchB Root ID Priority 32769 Address 000f.34ca.1000 Cost 19 Port 18 (FastEthernet0/16)

q1) Why is the cost 19, and the port is 18 ?

q2) The BLOCKING state in the 4 states of the port (block, listen, learning, fwd) is 20 seconds; How does a port get out from BLOCKING state into a LISTENING state ?

q3) What is the meaning of “Aging Time 300” ?

Regards,
Alan

Regards,
Alan

Alan,

  1. The cost is 19 because the line speed connecting the switches is fast ethernet (100 meg), which is assigned a cost value of 19 by STP. Port 18 (FastEthernet 0/16) is the port that connects Switch B to the root bridge. To be honest, I haven’t figured out why it is assigned a value of “18” instead of “16” (the actual physical interface port).

  2. A port moves out of the BLOCKING state once it stops hearing BPDUs coming in on that interface for the MaxAge amount of time (20 seconds by default). In other words, BPDUs must continue to be received in order for a port to remain in BLOCKING

  3. Aging Time 300 refers to the MAC entry timeout value. Once a entry has been created in the MAC address table, a 300 second counter starts. If traffic hasn’t been received to/from that MAC address within the 300 second timer, the entry is flushed from the MAC address table.

1 Like

Hi Andrew,

Thanks for the prompt response.
Looking back at switchA , it show a different port number port 19 for the interface fa0/17 as well.
Wonder where does these port 19, port 18 numbers get derived from ? – well guess we could have ignore that :wink:

For Q2) if the BLOCKING port stop receiving BPDU, what state will it move into ?

On the contrary, if a port (irregardless if it is a RP or DP) that is in FWD state, suddenly stop receiving BPDU from its neighbour (due to e.g. a new fw blocking), will that port become BLOCK?

Thanks once again.

Regards,
Alan

Hi Alan & Andrew,

STP uses some internal port numbering instead of the “FastEthernet” and “GigabitEthernet” interfaces etc. I think this output was from a 3560 switch and I guess it starts with the two Gigabit interfaces first. That’s why the FastEthernet interfaces have an “internal port number” that is +2.

When a blocked port doesn’t receive BPDUs anymore then it will move into the listening and learning state and eventually ends up in forwarding mode.

If you want to see this in action…take three switches and connect them in a triangle. Configure the interface that is opposite of the switch with the blocked port with spanning-tree bpdufilter enable. It will stop sending BPDUs and you will see the blocked interface moving through the different states.

Rene

Hlw Rene,

According to your Topology …

SwitchC Fa0/0 port is Root port in Forwarding state and Fa0/1 port is Non-designated in Blocking state. When SWC to SWA link down then port Fa0/1 will be Root in forwarding state.My questions is how SWC know Port Fa0/1 will be Root. What is the mechanism .Thanks

br//
zaman

Hi Rene

Thanks for the clarification on the port number ;).

When a blocked port doesn’t receive BPDUs anymore then it will move into the listening and learning state and eventually ends up in forwarding mode.

Do you mean that a port remain blocked (is due to some settings in the BPDUs that it received ?)

Regards,
Alan

Hi Alan,

When an interface that is in blocked mode doesn’t receive any BPDUs anymore, then it will go out of blocking mode. It will go through the listening/learning states and eventually ends up in forwarding mode. It doesn’t remain in the blocking state.

Give it a try on some switches, it’s a nice exercise =)

Rene

Hi rene,
very clear expalantions.Thanks.
Wanted to know if once the network is stable BPDUs are generated only by the route bridge or any bridge can generate the BPDUs
Tks

Hello Ramanathan.

Take a look at this NetworkLessons note on the topic for more information.

I hope this has been helpful!

Laz

1 Like

Hi Rene,

In the above example , switch A is a non-root bridge. Then why one of the port is marked as designated port. as per the explanation above , it needs to be a root port right?

very nice explanation. Many thanks

Hello Ananth.

If you’re referring to Rene’s example in this lesson, switch A is the root bridge, and thus all of its ports are designated ports.

I hope this has been helpful!

Laz

39 posts were merged into an existing topic: Introduction to Spanning-Tree

Hi Rene,

I am new to the networking.
I have some basic doubts about the STP states.

  1. i am not clear about the blocking state?
  2. In listening state, each switch decides the port role like Designated Port or root port or Non-designated port. Am i correct?
  3. Why Learning state is required. for example, when the Ethernet Frame comes, switch can read the Source MAC address and add the entry in its table. I mean
    its part of processing a frame. Isn’t it?

Hello Navjot.

  1. The purpose of STP is to prevent the creation of Layer 2 loops. The blocking state in STP is the very essence of the purpose of STP as this is the method by which potential loops are eliminated. In the blocking state, a port will drop any data, but will accept and process BPDUs. As described in the lesson, there is a specific algorithm which chooses the proper ports to block to achieve a loop free topology.

  2. In the listening state, each switch “listens” for BPDUs and uses their information in order to determine the active topology. This in essence means that the switch is trying to determine where it fits in to the active topology, and which ports will have which roles in order to achieve the purpose of STP. So, yes, you are correct in your understanding.

  3. This is a very good question. The learning state takes 15 seconds to complete. The purpose of this time period is for the switch to have a fully updated MAC address table before it begins forwarding. When STP was first introduced, this was a good idea, because switches would be overwhelmed if they went directly to forwarding state. For today’s switches, however, this is quite conservative and is not strictly necessary, and that is why later STP protocols such as Rapid STP have eliminated this time period (among other things) to speed up STP.

I hope this has been helpful!

Laz