SM 34

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Computer science computer networks

Paper: CS6T2 : COMPUTER NETWORKS


PROGRAMME:BSC
SUBJECT: COMPUTER SCIENCE
SEMESTER: 6th SEM
SESSION:34

Text book reference:


Douglas E Comer and M.S.Narayana, “Computer Networks and Internets”, 5th edition,
Pearson Education, 2013
Computer science computer networks

WAN technologies and Routing:


Distance Vector Algorithm

NOTATION
Dx(y) = estimate of least cost from x to y
Distance vector: Dx = [Dx(y): y є N ]
Node x knows cost to each neighbour v: c(x,v)
Node x maintains Dx = [Dx(y): y є N ]

Then

dx(y) = min {c(x,v) + dv(y) }

where min is taken over all neighbors of x

Bellman-Ford example

5
3
v w 5
2
u 2 1 z
3
1 2
x 1
y

d (z) = min { c(u,v) + d (z), c(u,x) + d (z), c(u,w) + d (z) }


u v x w
= min {2 + 5, 1 + 3,5 + 3} = 4
Computer science computer networks

Clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3

B-FBasic
equation
idea: says:
Each node periodically sends its own distance vector estimate to neighbours
When node a node x receives new DV estimate from neighbour, it updates its own DV using
B-F equation:

D (y) ← min {c(x,v) + D (y)} for each node y ∊ N


x v v

 Under minor, natural conditions, the estimate Dx(y) converge the actual least cost
dx(y)
ALGORITHM
At each node x, Initialization
for all destinations y in N: Dx(y) = c(x,y) // If y is not a neighbor then c(x,y) = ∞
for each neighbor
w Dw(y) = ? for all destination y in N.
for each neighbor w send distance vector Dx = [ Dx(y) : y in N ] to w
loop
wait(until I receive any distance vector from some neighbor w)
for each y in N: Dx(y) = minv{c(x,v)+Dv(y)}
If Dx(y) is changed for any destination y Send distance vector Dx = [ Dx(y) : y in N ] to all
neighbours
Forever
Computer science computer networks

You might also like