You are on page 1of 26

Applications of Graph Theory in

Routing
By
Paritosh Ramanan [2009C6PS681G]
A R Pavan [2009C6PS678G]

Routers
A router is a device used heavily in computer
networks.
It discretely distributes data packets to each
computer directly connected.
It is also responsible for communicating with
other computers on other networks in the
most optimum way.

Routers

The Working of Routers


The router uses the routing algorithm, stored in
the router's memory, to compute the path that
would best serve to transport the data from the
source to the destination.

The routing protocol you choose for your


network determines which algorithm you will
use.
The overall performance of your network
depends mainly on the routing algorithm.

ROUTING PROTOCOLS

Routing Protocols
The decision of which path to take in order to
send the data is based upon the "weights" or
metrics, which normally depend on the average
delay time experienced by the router to
send/receive information.
Time delay can be due to the material of the
cable used.
Therefore, the best possible path to take will be
the one with the lowest metric.
Contd

The routing protocol provides the information


needed by the routing algorithm to compute its
decisions, through a process known as a routing
update.
In the process it gathers information about
networks and routers from the surrounding
environment and stores the information within a
routing table in the router's memory.

The routing algorithm is run using the


information within this table to calculate the best
path from one network to another.
Contd

Calculating the new values within the formula


then generates a sum. The result of this
calculation is used then to determine where to
send information.
Through a series of updates, each router will
tell the other what information it has.
Eventually, an entire routing table will be built.

ROUTING ALGORITHMS
Distance Vector Algorithm
Link-State Algorithm

Distance Vector Algorithm


Distance vector algorithm (also called the
Ford-Fulkerson algorithm) use metrics or costs
to determine the best possible path.
The core crux of the algorithm lies in the
formula
m(i,k)=min[m(i,t)+m(t,k)]

Illustration
Router Link

Metric

A
A-B

B-C

A-C

D
C-D

Distance Vector Algorithm


The router counts weights of all its direct links
and saves it to the table.
It sends this information to neighbour routers.
It in turn receives information of all its
neighbouring routers and thereby updates its
own tables.

Illustration

Illustration

Drawback

Link-State Algorithm

Identify the routers that are physically connected to them and get their IP
addresses.

Routers measure the delay time for neighbour routers by sending echo packets
over the network. Every router that receives these packets replies with an echo
reply packet.

They broadcast their information over the network for other routers and receive
the other routers' information. In this step, all routers share their knowledge and
broadcast their information to each other.

In this way, every router can know the structure and status of the network.

Routers use an appropriate algorithm to identify the best route between two
nodes of the network. In this step, routers choose the best route to every node.

They do this using an algorithm, such as the Dijkstra shortest path algorithm.

DIJKSTRAS ALGORITHM

Dijkstras Algorithm
Status record for each node
on the network:
Predecessor field - shows
the previous node.
Length field - shows the
sum of the weights from
the source to that node.
Label field - shows the
status of node; each
node have one status
mode: "permanent" or
"tentative."

Finding the Shortest Path


This algorithm works well, but it is so
complicated that it may take a long time for
routers to process it.
That would cause the efficiency of the
network to fail.
If a router gives the wrong information to
other routers, all routing decisions will be
ineffective.

Result

Thank You

You might also like