Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
15 views

Routing Algorithm

Uploaded by

harishkudua
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Routing Algorithm

Uploaded by

harishkudua
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Routing algorithm

o 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.
o 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.
o 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:

o Adaptive Routing algorithm


o Non-adaptive Routing algorithm

Adaptive Routing algorithm

o An adaptive routing algorithm is also known as dynamic routing algorithm.


o This algorithm makes the routing decisions based on the topology and network traffic.
o 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:

o 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. This algorithm takes the connectivity between the nodes and link cost
as input, and this information is obtained before actually performing any calculation. Link
state algorithm is referred to as a centralized algorithm since it is aware of the cost of
each link in the network.
o Isolation algorithm: It is an algorithm that obtains the routing information by using local
information rather than gathering information from other nodes.
o Distributed algorithm: It is also known as decentralized algorithm as it computes the
least-cost path between source and destination in an iterative and distributed manner. In
the decentralized algorithm, no node has the knowledge about the cost of all the network
links. In the beginning, a node contains the information only about its own directly
attached links and through an iterative process of calculation computes the least-cost
path to the destination. A Distance vector algorithm is a decentralized algorithm as it
never knows the complete path from source to the destination, instead it knows the
direction through which the packet is to be forwarded along with the least cost path.

Non-Adaptive Routing algorithm

o Non Adaptive routing algorithm is also known as a static routing algorithm.


o When booting up the network, the routing information stores to the routers.
o Non Adaptive routing algorithms do not take the routing decision based on the network
topology or network traffic.
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 The Non-Adaptive Routing algorithm is an


algorithm that constructs the algorithm that constructs the static table
Define
routing table based on the network to determine which node to send the
conditions. packet.

Adaptive routing algorithm is used The Non-Adaptive Routing algorithm is


Usage
by dynamic routing. used by static routing.

Routing decisions are made based


Routing decision Routing decisions are the static tables.
on topology and network traffic.

The types of adaptive routing


The types of Non Adaptive routing
Categorization algorithm, are Centralized, isolation
algorithm are flooding and random walks.
and distributed algorithm.

Adaptive Routing algorithms are Non-Adaptive Routing algorithms are


Complexity
more complex. simple.
Comparison between Distance Vector Routing and Link
State Routing
Distance Vector Routing Link State Routing

Bandwidth required is more due to


Bandwidth required is less due to local
flooding and sending of large link
sharing, small packets and no flooding.
state packets.

It updates tables with information about It has the information of the whole
its neighbors. So, it works based on local network. So, it works based on global
information information

Make use of Bellman Ford Algorithm. Make use of Dijakstra’s algorithm.

It updates on a broadcast basis It updates on a multicast basis

Traffic is less. Traffic is more.

Convergence time is moderate i.e, good


news spread fast and bad news spread Converges faster.
slowly.

Count of infinity problem. No count of infinity problem.

Persistent looping problem i.e, loop will No persistent loops, only transient
be there forever. loops.

Practical implementation is RIP and Practical implementation is OSPF and


IGRP. ISIS.

Conclusion
 Both Distance Vector Routing and Link State Routing are used to find the
best paths for data packets on a network, Routing decides the best path for
transmission of packets between different networks.
 Distance vector routing protocol is a protocol that chooses the best path for the destination based
on the parameter distance.
 NET ID, Cost, and Next hop are the components of the routing table in distance vector routing.
 Link State protocols are also known as the Shortest-path-first protocols and they choose the
path based on the cost of the path.
Routing is the process of choosing the path in the network. Distance vector routing is the
routing protocol that selects the path based on parameter distance. Link State routing
protocol is the protocol that chooses the best path based on the cost of the path.
Link State Routing

Link State protocols are also known as the Shortest-path-first protocols.

All the routers receive the information related to their directly connected links by the link state
protocols. Examples IS-IS (Intermediate System to Intermediate System) and OSPF (Open
Shortest Path First). It is also one of the dynamic routing algorithms in which information about
neighboring routers is shared by the router with all other routers of the network. The router
transmits the information of its neighbor routers to all the routers with the help of flooding.
Information is shared at the time of update only.
In this, Dijkstra’s algorithm is used for creating the routing tables.

Operation

The following steps are executed in the operation of link State routing:

Discovery: A HELLO message is sent to every link of the router on a regular interval by link
state for enabling the router.

Link Cost: To find the cost of every neighbor of the router, each router needs to be subjected to
a series of tests. For determining the cost of its neighbors, end-to-end delay, throughput, or a
combination of both can be used. It is necessary for all the routers that are enabled by link state
to have a cost estimate for all its links.

Link State Packets: Packet is created by every router and this packet contains its neighbors
and also contains the information on the link cost of these neighbors.

Shortest Path: After this, a Dijkstra algorithm can be used by the router to find the shortest
path for reaching the given destination with the help of all the information stored in its link state
table.

2) Distance Vector Routing

Distance vector routing protocol is a protocol that chooses the best path for the destination
based on the parameter distance. Generally, the number of hops is the criteria for measuring
distance metric. Some other factors like packet loss, delay, etc. are also considered for
measuring distance metrics. If the hop is used for the metric distance when the packet passes
through the router then the hop is travelled every time The route in the network having the least
number of hops is considered as the best route for that network.e.g RIP (Routing Information
Protocol) and IGRP (Internal Gateway Routing Protocol) are some examples of distance
vector routing algorithms.
It is one of the dynamic algorithms and in this algorithm, every router calculates the difference
between itself and every potential destination router or we can say its immediate neighbors of
the router. The routing table is updated when the entire network knowledge is shared by the
router with its neighbors.
Information is shared between the routers on a regular basis.
In this routing tables are created by using the bellman ford algorithm.

You might also like