Lec 20
Lec 20
Lec 20
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
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
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
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
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