0% found this document useful (1 vote)
177 views

Routing Algorithms

The document discusses different routing algorithms used in computer networks. It describes adaptive routing algorithms that change based on network topology changes and non-adaptive static routing algorithms that are pre-determined. Static routing algorithms discussed include shortest path routing using Dijkstra's algorithm and multipath routing. Distance vector routing is presented as a distributed dynamic routing algorithm where routers exchange routing information to update their routing tables as the network changes. Issues with distance vector routing, such as counting to infinity, are also covered.

Uploaded by

hub23
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
177 views

Routing Algorithms

The document discusses different routing algorithms used in computer networks. It describes adaptive routing algorithms that change based on network topology changes and non-adaptive static routing algorithms that are pre-determined. Static routing algorithms discussed include shortest path routing using Dijkstra's algorithm and multipath routing. Distance vector routing is presented as a distributed dynamic routing algorithm where routers exchange routing information to update their routing tables as the network changes. Issues with distance vector routing, such as counting to infinity, are also covered.

Uploaded by

hub23
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Computer Networks

Prof. Hema A Murthy

Routing Algorithms
Adaptive algorithm:
Reflect change in topology Get information locally from adjacent routers

Non Adaptive Algorithm


Static routers Downloaded to routers when network is booted

Routing: Principle of Optimality:


If router I on optimal path from router I to K then optimal path from J to K also on same route!

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Routing Algorithms(Static)
Set of all optimal routes from: Source to a given destination
A sink tree!

Goal of routing algorithm find sink trees that are there! Shortest Path Routing:
Dijkstra Uses topology Greedy approach Possible shorter path of equal length need not be unique

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Static Routing Algorithms


Shortest path routing
To send a packet from one node to another find the shortest path between the pair of nodes

Multipath Routing
Multiple paths from Node a to node b. Randomly choose one of the paths

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Dijkstra (example)
f 10 5 a 4 b 3 c d 5 1 6 e 4 Shortest path from AD is via b and c

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Multipath Routing
Forward traffic based on a random number Example:Path from a to d
via b: 0.0 - 0.65 via f: 0.65 -1.0

Packet for d from a:


Generate a random number r: If 0 < r 0.65, choose b otherwise choose f

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Multipath Routing
Advantages:
Reliability disjoint entries multiple routes possible

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Static Routing
Disadvantages:
SSSP and Multipath:
Require complete knowledge of Network topology to make a good decision.

Hot potato routing


Forward on to shortest Queue (defined by hopcount) Use hot potato with static routing rank = Shortest Queue + shortest path
Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Distance Vector Routing


Distance Vector Routing: (Distributed Bellman Ford, Fulkerson)
Each router maintain a table: destination, estimated cost, link, hop count, time delay in ms, queue length, Updated by exchanging information between router - ICMP

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Dynamic Routing
Distributed Routing:
Dynamic routing Changing topology of the network Need to recompute route continuously

Indian Institute of Technology Madras

Computer Networks

Router a

Router i Via i a b c d e f g h i j k l

Router b Via j a b c d e f g h i j k l

Prof. Hema A Murthy

Via a a b c d e f g h i j k l

0 12 25 40 14 23 18 . . . . .

24 36 18 27 7 20 31 . . . . .

? 12 10 13

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Distance Vector Routing


Compute route from b to g via a 8 + 18 via i 10 +31 so update route to g to 26

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Distance Vector Routing


Example: b wants to update its information
a

. . .

e i

. . .

f j

. . .

g k

. . .

h l

Indian Institute of Technology Madras

Computer Networks

Prof. Hema A Murthy

Issues: Count to infinity


Initially bx 1 cx 2 dx 3 ex 4 Now x goes down

. . . . .
x b
1

d
3 3

2 2 1 4 6 6 8

4 4 4 4 6 6 8

1 exchange 2 exchange

3 3 5 5 7 7

3 5 5 7 7

Count to infinity Number of exchanges depends on definition of infinity


Indian Institute of Technology Madras

You might also like