Lec 20

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Lecture 20

Distance Vector and Link State Routing

Flooding
dij required complete knowledge of the network
but for actual routing algos, decisions based on local knowledge, not the complete picture of the
network
A simple local technique is flooding, in which every incoming packet is sent out on every outgoing
line except the one it arrived on
here even if some routers are damaaged this will ensure the message will reach the
destination
what is the cost though ?
each packet has a hop counter, at each transmission hop_counter-- and once it reaches zero its
killed
this prevents the packet from living forever inside the network
Not practical for sending most packets (cost), but flooding is tremendously robust

Distance Vector Routing


this computes without having complete network knowledge
for each node there is a routing table consiting of rows
each row would have 3 entries - destination , best_neighbour and cost_involved (bandwidth,
laency etc)
each router begins with information about neighbours, then table is exchanged with each other
whenever there is an update in your table you share it
eventually the updates will stop
this is an asynchronous algorythm
Also known as Bellman Ford Routing algo

Working

cost = delay
once every T sec
each router
sends to all its neighbours
a list of its estimated delays/costs to all destinations
This router also receives a similar table from its neighbours
Imagine that one of these tables has just come in from neighbor X, with Xi being X’s estimate of
how long it takes to get to router i.
updation (from slides): If the router knows that the delay to X is m msec, it also knows that it can
reach router i via X in Xi + m msec. By performing this calculation for each neighbor, a router can
find out which estimate seems the best and use that estimate and the corresponding link in its
new routing table.

Example

You know the cost to go to youur immediate neighbours


once a table is computed in one round, in the next round that table is transmitted to its nighbours
and discarded, in this round the routing table at the node is recomputed from its neighbours

Count to Infinity Problem


it always converges, but the rate is a problem
it reacts rapidly to good news, but slowly to bad news.
took too long to converge after the network topology changed
thats why it is not used now

in the leftside
it takes 4 excahanges to find best route from A to E
in the right side
initially after 4 excahnges you have the correct path
now A to B is broken
now in the next iteration of B it doesnot receive anything from A, only receives from C
C to A is 2 , so B computes it as 1+2 =3
in the next iteration C gets B -> A and D-> A as 3 hence C -> A is 4
again B recomputes it and then again C recomputes it and so on.
Basically now the table is not converging (or slow convergence)
It basically has to be all nodes -> infinity so it takes a long time

Link State Routing


DVR was used in the ARPANET, now discontinued
now replaced by link state routing
Variants of link state routing called IS-IS and OSPF are the routing algorithms that are most
widely used inside large networks and the Internet today

Working

when a router comes online, it discovers its neighbour and network addresses
set metrics to each of its neighbours
constructs a packet with this info and tells all routers in this network about what it learned
floods the network with this info
not blind flodding, but sequence number maintains if the packet has come before, if router
gets a packet from the same router with seq num < expected num (cur seq num), then that
packet is dropped
now once info is echanged, all the routers get all the info including the new one. Each router has a
global idea
now all of the routers can compute the shortest path without ambiguity

From slides

When a router is booted, its first task is to learn who its neighbors are. It accomplishes this goal
by sending a special HELLO packet on each point-to-point line.
The router on the other end is expected to send back a reply giving its name (ip address). These
names must be globally unique
The link state routing algorithm requires each link to have a distance or cost metric for finding
shortest paths
The cost to reach neighbors can be set automatically, or configured by the network operator
A common choice is to make the cost inversely proportional to the bandwidth of the link
higher bindwdth it can handle many things hence delayish :: cost is low

Link State Routing

https://www.youtube.com/watch?v=kW6zV-040SY

link : edge
state: up or down
step 1 :
sent hello packet to all neighbours
formulate the table <neighbour_node, distance>
all the nodes does this
step 2:
flooding
each node sends the table info to all other nodes
step 3:
each node gets a global knowledge i.e. get a complete topography idea
this is absent in DVR
step 4:
now to go from node i to j
apply dijkristra
single source shortest path

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy