Shortest Path Routing Algorithm

Shortest Path Routing Algorithm in Computer Networks:

It is one of the simple static routing algorithms that widely used for routing in the network. The basic idea is to build a graph with each node representing a router and each line representing a communication link. To choose a route between any two nodes in the graph, the algorithm finds the shortest path between the nodes.

Shortest Path Routing Algorithm

The shortest path means the path in which anyone or more metrics are minimized. The metric may be distance, bandwidth, average traffic, communication cost, mean queue length, measured delay or any other factor. Dijkstra Algorithm is mostly used for this purpose. The basic objective of the algorithm is to label each node with its distance from the source node along the best-known path.

Steps of Shortest Path Routing Algorithm:

1. Initially, no path is known as – All nodes are labelled with infinity.

2. As the algorithm progresses labels change reflecting the better path. The label called as tentative label.

3. As it is found that the label represents the shortest path then it is made permanent and never changed thereafter.