Spanning-Tree Reconvergence

Hello Jugal

If you connect an Ethernet cable from one port onto another port on the same switch, the switch will detect a L2 loop, and will block one of the two ports. How does it decide which one? Well, the criteria that are checked are the following:

The port that will be blocked is the one that has:

  1. highest path cost to the root bridge
  2. highest bridge ID
  3. highest port ID of the sending device
  4. highest port ID of the receiving device

Regardless of whether or not the switch is the root bridge, all of these will be checked. Because both ports are on the same switch, both ports are receiving and sending ports. So ultimately, it is the port with the highest port ID that will be blocked.

Your question is a very good one. It can happen more often then you think. If you have a rack that looks like this, no matter how tidy you keep it, if you’re not careful, you may connect one switchport to another on the same switch.

On switches like Cisco’s, this is not a problem because one of the ports will be blocked. However, I have had a case where someone made such a connection on a small cheap unmanaged switch that didn’t have STP, and the whole network segment went down, and it was quite difficult to track down the specific link. But in any case, that’s how it works…

I hope this has been helpful!

Laz