By
K.Sivapriya
Msc(IT)
Nadar Saraswathi College Of Arts & Science
Theni
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.
Cont…
 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.
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.
Distance Vector Routing Algorithm
 A distance-vector routing (DVR) protocol
requires that a router inform its neighbors of
topology changes periodically. Historically
known as the old ARPANET routing algorithm
(or known as Bellman-Ford algorithm). ...
Distances,based on a chosen metric, are
computed using information from the
neighbors' distance vectors.
Cont…
 Distributed: It is distributed in that each node
receives information from one or more of its
directly attached neighbors, performs calculation
and then distributes the result back to its neighbors.
 Iterative: It is iterative in that its process continues
until no more information is available to be
exchanged between neighbors.
 Asynchronous: It does not require that all of its
nodes operate in the lock step with each other.
working of Distance Vector
Routing Algorithm
 Knowledge about the whole network: Each
router shares its knowledge through the entire
network. The Router sends its collected
knowledge about the network to its neighbors.
 Routing only to neighbors: The router sends
its knowledge about the network to only those
routers which have direct links. The router
sends whatever it has about the network
through the ports.
Cont…
The information is received by the router and
uses the information to update its own routing
table.
 Information sharing at regular
intervals: Within 30 seconds, the router sends
the information to the neighboring routers.
Link State Routing
 In link-state routing, each router shares its
knowledge of its neighbourhood with all
routers in the network. Link-state protocols
implement an algorithm called the shortest path
first (SPF, also known as Dijkstra's Algorithm)
to determine the path to a remote destination
Link State Routing algorithm
 Knowledge about the neighborhood: Instead
of sending its routing table, a router sends the
information about its neighborhood only. A
router broadcast its identities and cost of the
directly attached links to other routers.
 Flooding: Each router sends the information to
every other router on the internetwork except
its neighbors. This process is known as
Flooding.
Cont…
Every router that receives the packet sends the
copies to all its neighbors. Finally, each and
every router receives a copy of the same
information.
 Information sharing: A router sends the
information to every other router only when the
change occurs in the information.
Link State Routing has two phases
 Reliable Flooding
 Initial state: Each node knows the cost of its
neighbors.
 Final state: Each node knows the entire graph.
 Route Calculation
 Each node uses Dijkstra's algorithm on the
graph to calculate the optimal routes to all
nodes.
Cont…
 The Link state routing algorithm is also known
as Dijkstra's algorithm which is used to find the
shortest path from one node to every other
node in the network.
 The Dijkstra's algorithm is an iterative, and it
has the property that after kth iteration of the
algorithm, the least cost paths are well known
for k destination nodes.

Routing algorithm

  • 1.
  • 2.
    Routing algorithm  Inorder 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.
  • 3.
    Cont…  The routingprotocol 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.
  • 4.
    Classification of aRouting algorithm  The Routing algorithm is divided into two categories:  Adaptive Routing algorithm  Non-adaptive Routing algorithm
  • 5.
    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.
  • 6.
    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.
  • 7.
    Distance Vector RoutingAlgorithm  A distance-vector routing (DVR) protocol requires that a router inform its neighbors of topology changes periodically. Historically known as the old ARPANET routing algorithm (or known as Bellman-Ford algorithm). ... Distances,based on a chosen metric, are computed using information from the neighbors' distance vectors.
  • 8.
    Cont…  Distributed: Itis distributed in that each node receives information from one or more of its directly attached neighbors, performs calculation and then distributes the result back to its neighbors.  Iterative: It is iterative in that its process continues until no more information is available to be exchanged between neighbors.  Asynchronous: It does not require that all of its nodes operate in the lock step with each other.
  • 9.
    working of DistanceVector Routing Algorithm  Knowledge about the whole network: Each router shares its knowledge through the entire network. The Router sends its collected knowledge about the network to its neighbors.  Routing only to neighbors: The router sends its knowledge about the network to only those routers which have direct links. The router sends whatever it has about the network through the ports.
  • 10.
    Cont… The information isreceived by the router and uses the information to update its own routing table.  Information sharing at regular intervals: Within 30 seconds, the router sends the information to the neighboring routers.
  • 11.
    Link State Routing In link-state routing, each router shares its knowledge of its neighbourhood with all routers in the network. Link-state protocols implement an algorithm called the shortest path first (SPF, also known as Dijkstra's Algorithm) to determine the path to a remote destination
  • 12.
    Link State Routingalgorithm  Knowledge about the neighborhood: Instead of sending its routing table, a router sends the information about its neighborhood only. A router broadcast its identities and cost of the directly attached links to other routers.  Flooding: Each router sends the information to every other router on the internetwork except its neighbors. This process is known as Flooding.
  • 13.
    Cont… Every router thatreceives the packet sends the copies to all its neighbors. Finally, each and every router receives a copy of the same information.  Information sharing: A router sends the information to every other router only when the change occurs in the information.
  • 14.
    Link State Routinghas two phases  Reliable Flooding  Initial state: Each node knows the cost of its neighbors.  Final state: Each node knows the entire graph.  Route Calculation  Each node uses Dijkstra's algorithm on the graph to calculate the optimal routes to all nodes.
  • 15.
    Cont…  The Linkstate routing algorithm is also known as Dijkstra's algorithm which is used to find the shortest path from one node to every other node in the network.  The Dijkstra's algorithm is an iterative, and it has the property that after kth iteration of the algorithm, the least cost paths are well known for k destination nodes.