Routing Algorithm
Routing algorithm
• In order to transfer the packets from source to the destination, the
network layer must determine the best route through which packets can
be transmitted.
• Whether the network layer provides datagram service or virtual circuit
service, the main job of the network layer is to provide the best route. The
routing protocol provides this job.
• The routing protocol is a routing algorithm that provides the best path
from the source to the destination. The best path is the path that has the
"least-cost path" from source to the destination.
• Routing is the process of forwarding the packets from source to the
destination but the best route to send the packets is determined by the
routing algorithm.
Classification of a Routing algorithm
The Routing algorithm is divided into two categories:
• Adaptive Routing algorithm
• Non-adaptive Routing algorithm
Adaptive Routing algorithm
• An adaptive routing algorithm is also known as dynamic
routing algorithm.
• This algorithm makes the routing decisions based on the
topology and network traffic.
• The main parameters related to this algorithm are hop
count, distance and estimated transit time.
An adaptive routing algorithm
can be classified into three
parts:
• Centralized algorithm--It is also known as global routing algorithm as it
computes the least-cost path between source and destination by using
complete and global knowledge about the network.
• Link state algorithm--is referred to as a centralized algorithm since it is
aware of the cost of each link in the network.
• Isolation algorithm--that obtains the routing information by using local
information rather than gathering information from other nodes.
• Distributed algorithm--also known as decentralized algorithm as it
computes the least-cost path between source and destination in an
iterative and distributed manner.
Non-Adaptive Routing algorithm
• Non Adaptive routing algorithm is also known as a static
routing algorithm.
• When booting up the network, the routing information
stores to the routers.
• Non Adaptive routing algorithms do not take the routing
decision based on the network topology or network
traffic, it was already precomputed.
The Non-Adaptive Routing
algorithm is of two types:
• Flooding: In case of flooding, every incoming packet is
sent to all the outgoing links except the one from it has
been reached. The disadvantage of flooding is that node
may contain several copies of a particular packet.
• Random walks: In case of random walks, a packet sent
by the node to one of its neighbors randomly. An
advantage of using random walks is that it uses the
alternative routes very efficiently.
Differences b/w Adaptive and Non-Adaptive Routing
Algorithm
Basis Of Adaptive Routing algorithm Non-Adaptive Routing algorithm
Comparison
Adaptive Routing algorithm is an algorithm that The Non-Adaptive Routing algorithm is an
Define constructs the routing table based on the algorithm that constructs the static table to
network conditions. determine which node to send the packet.
Adaptive routing algorithm is used by dynamic The Non-Adaptive Routing algorithm is used by
Usage
routing. static routing.
Routing Routing decisions are made based on topology
Routing decisions are the static tables.
decision and network traffic.
Categorizatio The types of adaptive routing algorithm, are The types of Non Adaptive routing algorithm are
n Centralized, isolation and distributed algorithm. flooding and random walks.
Complexity Adaptive Routing algorithms are more complex. Non-Adaptive Routing algorithms are simple.
Properties of Routing Algorithm
Types of Routing
• Static Routing Algorithm
• Shortest path Routing
• Flooding
• Flow based routing
• Dynamic Routing Algorithm
• Link State Routing
• Distance Vector Routing
• Hierarchical Routing
• Broad cast Routing
• Routing for Mobile Host
Consider B is the
source
B D
C E
• 1. Consider the following subnet. Distance vector routing is used, and
the following vectors have just come into router C: from B: (5, 0, 8, 12,
6, 2); from D: (16, 12, 6, 0, 9, 10); and from E: (7, 6, 3, 9, 0, 4). The
measured delays to B, D, and E, are 6, 3, and 5, respectively. What is
C’s new routing table? Give both the outgoing line to use and the
expected delay.
2.Consider the following subnet. Distance vector routing is used, and
the following vectors have just come in to router F: from B: (5, 0, 8, 12,
6, 2); from D: (16, 12, 6, 0, 9, 10); and from E: (7, 6, 3, 9, 0, 4). The
measured delays to B, D, and E, are 9, 6, and 3, respectively. What is F’s
new routing table? Give both the outgoing line to use and the expected
delay.