03-17-2013 03:05 AM - edited 03-07-2019 12:17 PM
Hi Team,
Whenever there is a looping in switch how other switch and the same switch where loop occured will get a information about looping. What BPDU carries to inform about looping in a network.
PLease clarify
Thanks in advance
Naveen
Solved! Go to Solution.
03-17-2013 03:41 AM
Hello Naveen,
With STP, switches do not really detect a loop. Rather, they decide to put a port into Forwarding state only if it is determined that the port is needed in an active topology.
What does it mean that the port is needed? Imagine a switched network that has no physical loops, i.e. there are no switching loops possible either. This network has a tree structure, then. One of the switches can be declared as the root of this tree (any of them - for now, forget even about STP). Notice now that each port on each switch in this network is needed - because it is either an "uplink", connecting the switch onto an upward branch towards the root, or it is a "downlink", connecting another network segment to this switch. Each of these ports is required and needed - if you removed any of them, a part of the network would get disconnected.
What STP does is locating these "uplink" and "downlink" ports and making sure that
In fact, STP behaves as a very simple distance vector routing protocol that tries to locate the best path from each switch towards the root switch, and making sure that each switch has exactly one best path towards the root (if there were multiple paths there would be loops). BPDUs contain simple metrics that allow the bridge to decide which port should be the Root or Designated. Any port that is neither Root nor Designated is not needed in the topology, and will be left blocked.
Hence, STP does not detect switching loops. What STP does is make sure that the active topology is loop free and a switching loop cannot occur. The idea is that if STP can provide a loop-free logical switched topology, there is no need to detect loops because they cannot occur, anyway.
BPDUs contain, apart from a few technical fields, these data:
The Root Bridge ID identifies the "destination" towards which STP tries to construct a shortest path from each switch. The primary tiebreaker is the sender's distance from the Root bridge - obviously, each switch selects that neighbor that provides the least cost path (after taking into account the cost of the link to the neighbor). If there are multiple paths left that provide the same cost path, the switch will select the path through the neighbor with the lowest Bridge ID, and if there are multiple links towards the same neighbor, then the link that is connected to the neighbor's port with the lowest Port ID. As you can see here, STP tries ardently to make sure that there is always a way to choose exactly one path towards the root even if there are multiple physical paths possible.
Once again, STP and BPDUs do not detect loops. They construct a loop-free topology in which it is not necessary to detect loops anymore.
Feel welcome to ask further!
Best regards,
Peter
03-17-2013 03:41 AM
Hello Naveen,
With STP, switches do not really detect a loop. Rather, they decide to put a port into Forwarding state only if it is determined that the port is needed in an active topology.
What does it mean that the port is needed? Imagine a switched network that has no physical loops, i.e. there are no switching loops possible either. This network has a tree structure, then. One of the switches can be declared as the root of this tree (any of them - for now, forget even about STP). Notice now that each port on each switch in this network is needed - because it is either an "uplink", connecting the switch onto an upward branch towards the root, or it is a "downlink", connecting another network segment to this switch. Each of these ports is required and needed - if you removed any of them, a part of the network would get disconnected.
What STP does is locating these "uplink" and "downlink" ports and making sure that
In fact, STP behaves as a very simple distance vector routing protocol that tries to locate the best path from each switch towards the root switch, and making sure that each switch has exactly one best path towards the root (if there were multiple paths there would be loops). BPDUs contain simple metrics that allow the bridge to decide which port should be the Root or Designated. Any port that is neither Root nor Designated is not needed in the topology, and will be left blocked.
Hence, STP does not detect switching loops. What STP does is make sure that the active topology is loop free and a switching loop cannot occur. The idea is that if STP can provide a loop-free logical switched topology, there is no need to detect loops because they cannot occur, anyway.
BPDUs contain, apart from a few technical fields, these data:
The Root Bridge ID identifies the "destination" towards which STP tries to construct a shortest path from each switch. The primary tiebreaker is the sender's distance from the Root bridge - obviously, each switch selects that neighbor that provides the least cost path (after taking into account the cost of the link to the neighbor). If there are multiple paths left that provide the same cost path, the switch will select the path through the neighbor with the lowest Bridge ID, and if there are multiple links towards the same neighbor, then the link that is connected to the neighbor's port with the lowest Port ID. As you can see here, STP tries ardently to make sure that there is always a way to choose exactly one path towards the root even if there are multiple physical paths possible.
Once again, STP and BPDUs do not detect loops. They construct a loop-free topology in which it is not necessary to detect loops anymore.
Feel welcome to ask further!
Best regards,
Peter
03-17-2013 09:28 AM
Hello Peter,
What an amazing answer,
You rock man
Julio Carvajal
03-18-2013 07:51 PM
HI Peter thanks for the wonderful explaination. But my doubt is whenever BPDU filter or incase of UDLD failed to receive bpdu, STP topology will be not aware of the loop right. So if any uplink has been connected along with existing uplink and which is not a part of STP topology loop might occur. So in this case how the switches come to know there is a loop in the network.
Thanks & Regards,
Naveen
03-20-2013 12:42 PM
Hello Naveen,
I apologize for answering so late - I've been somewhat busy in the last days.
But my doubt is whenever BPDU filter or incase of UDLD failed to receive bpdu, STP topology will be not aware of the loop right. So if any uplink has been connected along with existing uplink and which is not a part of STP topology loop might occur. So in this case how the switches come to know there is a loop in the network.
I assume you are asking how are switches supposed to detect a switching loop if an uni-directional link condition occured, or if BPDU Filter is inappropriately used.
The answer is that the switches do not detect this loop in general. That is one of the weaknesses in STP in that it is very vulnerable when its BPDUs are filtered or lost. That is why there are additional mechanisms to STP that try to detect if there is something wrong with the BPDU delivery. These mechanisms also do not detect a loop. What they do is that they react to a sudden loss of BPDU or UDLD messages from the other side. These mechanisms are:
Once again, though, these mechanisms do not detect a loop but rather a condition that would cause a loop if STP was left to run without change.
Best regards,
Peter
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