If I have to travel from one place to the other, I shall choose the best path both in terms of traffic and type of road. In the same way, the network chooses its path with lesser traffic to deliver the packets. How it is done and why? Let’s have a look.
Routing is the process that forwards network packets from a source to the destination. The brain behind choosing the best path to deliver the packets is the routing algorithm. Depending upon the method of choosing path (static or dynamic), routing algorithms are classified into two.
Adaptive Routing Algorithms:
These are also known as dynamic routing algorithms since the path of the network depends on the network topology and traffic. The decision changes when there is a change in topology or load on the network. There are several variables in consideration for optimization like the number of hops, MTU, Latency, transit time, etc. Further, these algorithms are classified into three.
Distributed Algorithm:
It is also known as a decentralized algorithm. No node has the information about all the nodes instead it has the details about the nodes that are connected to it. Through an iterative process, the nodes find an efficient path to the destination. There might be a delay in the packets if the interval between the receiving and transmitting packets changes.
Centralized Algorithm:
As the name suggests, the whole data of the network will reside within a centralized node and it makes the routing decisions for the packets. This facilitates the network with more efficiency since one node has complete information about the network. But if that node goes down, the entire network will be taken down.
Isolated Algorithm:
Routing decisions are made according to the information that the node already has without gathering the information from the other nodes. This might result in the delay if the packets are sent over a congestion network.
Non-Adaptive Algorithms:
It is also known as static routing. Once the network is booted, the routing information gets stored in the network. In this algorithm, the decision is not taken based on the network topology or the traffic, unlike the adaptive algorithm. It is based on the already available information in the router. These are further classified into the following:
Flooding:
This is the technique in which all the incoming packets are sent to every link except to the source. It might result in transmitting multiple or duplicate packets to the same link. This brings in the unwanted traffic to the network.
Random Walk:
In this algorithm, packets are sent to the neighboring nodes or links randomly. It is more efficient in using alternative routes.
Neologism and Related Terms:
Shortest Path First routing Algorithm or Dijkstra’s Algorithm: It is an algorithm to find the shortest path between two nodes in a network graph.
Hops: It is the count of intermediate routers, through which the data should flow, present between the source and destination.
Latency: It is the time delay in processing the data packets to a router.
2 thoughts on “Basics of Routing Algorithms”