0% found this document useful (0 votes)
18 views4 pages

SM 34

This document discusses distance vector routing and the Bellman-Ford algorithm. It introduces the notation and basic idea of distance vector routing, where each node maintains a distance vector containing the estimated distances to all other nodes. The Bellman-Ford algorithm is then described, where each node periodically sends its distance vector to neighbors, and upon receiving an update, recalculates its own distance vector using the Bellman-Ford equation to select the minimum distance through any neighbor. Pseudocode of the algorithm is provided.

Uploaded by

gfgc magadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

SM 34

This document discusses distance vector routing and the Bellman-Ford algorithm. It introduces the notation and basic idea of distance vector routing, where each node maintains a distance vector containing the estimated distances to all other nodes. The Bellman-Ford algorithm is then described, where each node periodically sends its distance vector to neighbors, and upon receiving an update, recalculates its own distance vector using the Bellman-Ford equation to select the minimum distance through any neighbor. Pseudocode of the algorithm is provided.

Uploaded by

gfgc magadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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