Spanning Tree – Which Interface Will Be the Root Port?

spanning tree

I am currently studying for my CCNA and the current topic is STP. I ran into this topology and it caused me some confusion.
enter image description here

I was trying to identify the root port for SW2. Here was my logic for that.

I was told that the cost is added on the receiving interface.

  1. The Root Bridge would advertise its BPDUs out of its Gig0/2 interface (let's ignore the Fa0/1 one), with the cost of 0.
  2. SW3 would receive it on its Gig0/1 interface and add a cost of 4 to it.
  3. It would then forward the frame out its Fa0/2 and Gig0/3 interfaces and after SW2 received them, it would add another +4 cost to it, since both of its interfaces are GigabitEthernet, therefore the cost for both links should be 8.

enter image description here

Since the cost and the bridge ID of the neighboring device (SW3) are the same for both ports, it would use the lowest port ID/priority as the tiebreaker. So shouldn't Gig0/2 be the root port in its case? Since Fa0/2 has lower port priority, or does it not? Thanks in advance.

Best Answer

The costs are not the same:

SW2-Gi0/2 links with SW3-Fa0/2, so that's only 100 Mbit/s, increasing its root path cost in contrast to SW2-Gi0/3.

You should note that a path cost of 4 for 1 Gbit/s is from the original 802.1D STP and long obsolete. RSTP and MSTP use 20 Tb/s divided by link speed per default, ie. 20,000 for 1 Gbit/s, 200,000 for 100 Mbit/s, and so on.

Related Topic