0% found this document useful (0 votes)
16 views

Routing Algorithms

Routing algorithms help direct internet traffic by computing optimal paths for data packets to travel from source to destination. There are two main types - adaptive algorithms dynamically determine routes based on changing network conditions, while non-adaptive algorithms use static routing tables. A key adaptive algorithm is Dijkstra's algorithm, which finds the shortest path between a source node and all other nodes in a graph. Congestion control is important to maintain network performance, and the leaky bucket algorithm regulates traffic flow into the network to prevent congestion.

Uploaded by

Ammulu nani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Routing Algorithms

Routing algorithms help direct internet traffic by computing optimal paths for data packets to travel from source to destination. There are two main types - adaptive algorithms dynamically determine routes based on changing network conditions, while non-adaptive algorithms use static routing tables. A key adaptive algorithm is Dijkstra's algorithm, which finds the shortest path between a source node and all other nodes in a graph. Congestion control is important to maintain network performance, and the leaky bucket algorithm regulates traffic flow into the network to prevent congestion.

Uploaded by

Ammulu nani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Routing Algorithms

Routing Algorithm:
• A routing algorithm is a procedure that lays down the route or path to
transfer data packets from source to the destination.
• They help in directing Internet traffic efficiently. After a data packet
leaves its source, it can choose among the many different paths to
reach its destination.
• Routing algorithm mathematically computes the best path, i.e. “least
– cost path” that the packet can be routed through.
Types of Routing Algorithm:
Adaptive Routing Algorithm:
Adaptive routing algorithms, also known as dynamic routing algorithms, makes routing decisions
dynamically depending on the network conditions. It constructs the routing table depending upon the
network traffic and topology. They try to compute the optimized route depending upon the hop count,
transit time and distance.
• The three popular types of adaptive routing algorithms are −
• Centralized algorithm − It finds the least-cost path between source and destination nodes by
using global knowledge about the network. So, it is also known as global routing algorithm.
• Isolated algorithm − This algorithm procures the routing information by using local information
instead of gathering information from other nodes.
• Distributed algorithm − This is a decentralized algorithm that computes the least-cost path
between source and destination iteratively in a distributed manner.
Non Adaptive Routing Algorithm:

Non-adaptive Routing algorithms, also known as static routing algorithms, construct a static routing
table to determine the path through which packets are to be sent. The static routing table is
constructed based upon the routing information stored in the routers when the network is booted
up.
• The two types of non – adaptive routing algorithms are −
• Flooding − In flooding, when a data packet arrives at a router, it is sent to all the outgoing links
except the one it has arrived on. Flooding may be uncontrolled, controlled or selective flooding.
• Random walks − This is a probabilistic algorithm where a data packet is sent by the router to
any one of its neighbours randomly.
Shortest Path Routing

• Dijkstra's Algorithm is a Graph algorithm that finds the shortest path from a source vertex to all

other vertices in the Graph (single source shortest path).

• It is a type of Greedy Algorithm that only works on Weighted Graphs having positive weights.
Fundamentals of Dijkstra's Algorithm
The following are the basic concepts of Dijkstra's Algorithm

1. Dijkstra's Algorithm begins at the node we select (the source node), and it examines the graph to find
the shortest path between that node and all the other nodes in the graph.

2. The Algorithm keeps records of the presently acknowledged shortest distance from each node to the
source node, and it updates these values if it finds any shorter path.

3. Once the Algorithm has retrieved the shortest path between the source and another node, that node
is marked as 'visited' and included in the path.

4. The procedure continues until all the nodes in the graph have been included in the path. In this
manner, we have a path connecting the source node to all other nodes, following the shortest possible
path to reach each node.
Congestion Control

• When too many packets are present in the network it causes packet delay and loss of
packet which degrades the performance of the system. This situation is called
congestion.

• The network layer and transport layer share the responsibility for handling
congestions. One of the most effective ways to control congestion is trying to reduce
the load that transport layer is placing on the network. To maintain this, the network
and transport layers have to work together.

• Leaky Bucket Algorithm is one of the algorithm to control congestion.


Leaky Bucket Algorithm
• Let see the working condition of Leaky Bucket Algorithm −
• Leaky Bucket Algorithm mainly controls the total amount and the rate of the traffic sent to the
network.
• Step 1 − Let us imagine a bucket with a small hole at the bottom where the rate at which water is poured
into the bucket is not constant and can vary but it leaks from the bucket at a constant rate.
• Step 2 − So (up to water is present in the bucket), the rate at which the water leaks does not depend on the
rate at which the water is input to the bucket.
• Step 3 − If the bucket is full, additional water that enters into the bucket that spills over the sides and is lost.

• Step 4 − Thus the same concept applied to packets in the network. Consider that data is coming from the
source at variable speeds. Suppose that a source sends data at 10 Mbps for 4 seconds. Then there is no
data for 3 seconds. The source again transmits data at a rate of 8 Mbps for 2 seconds. Thus, in a time span
of 8 seconds, 68 Mb data has been transmitted.

• That’s why if a leaky bucket algorithm is used, the data flow would be 8 Mbps for 9 seconds. Thus, the constant
flow is maintained.

You might also like