answersLogoWhite

0

The looping problem solved by switches by using an algorithm named Spanning Tree algorithm and Routers by using Dijkstra's shortest path algorithm.

Switches handle the looping problem through making spanning tree.

Switches:

Switching handle the looping problem by building Spanning Tree.

Spanning Tree Algorithm:

There are possibilities in the extended LANs having loop like structure. Bridges and switch must be able to correctly handle loops. This addressed by having the bridge or switch run a distributed Spanning Tree Algorithm.

If you think of the extended LAN as being represented by a graph that has loops (cycles) then a spanning tree is a subgraph of this graph that covers (Spans) all the vertices, but contains no cycles. That is a spanning tree keeps all the vertices of the original graph, but throws out some of the edges.

Consider the following extended LAN with many bridges or switch forms loops.


If we remove some ports for the bridge or switch from the topology, the extended LAN reduced to a cyclic tree. The main idea of the spanning tree is for the bridge or switch to select the ports over which they will forward frame. The algorithm selects ports as follows.

  • The spanning tree algorithm first selects the bridge with smallest id as the root of the spanning tree as described below.
  • The root bridge or switch always forwards frames out over all of its ports.
  • Each bridge computes the shortest path to the root and records the corresponding port. This port is also selected as the bridge or switch preferred path to the root.
  • All the bridge or switch connected to a given LAN elect a single designated bridge that will be responsible for forwarding frames towards the root bridge.

Routers:

Routers rely on routing protocols to build shortest path to avoid routing loops. (Ex) Link State Routing protocol and Distance Vector Routing protocol.

Link State Routing protocol build routing table based on Dijkstra's algorithm and Distance Vector Routing protocol build routing table based on Bellman Ford algorithm.

  • The local node may be the start (root) of the tree.
  • The local node has cost 0 and makes itself as permanent node.
  • From the list of tentative nodes -
  • Find a node with lower cumulative cost and make it as permanent.
  • Select the direction with the shortest cumulative cost.
  • To examine each neighbor node of it that was the last permanent node.
  • Repeat the steps until every node becomes permanent.
User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions