Académique Documents
Professionnel Documents
Culture Documents
Antonio Carzaniga
Faculty of Informatics University of Lugano
20052007
Antonio Carzaniga
Outline
Recap on link-state routing Distance-vector routing Bellman-Ford equation Distance-vector algorithm Examples
20052007
Antonio Carzaniga
Recap on Routing
Goal: each router u must be able to compute, for each other router v, the next-hop neighbor x that is on the least-cost path from u to v
20052007
Antonio Carzaniga
Recap on Routing
Goal: each router u must be able to compute, for each other router v, the next-hop neighbor x that is on the least-cost path from u to v v
20052007
Antonio Carzaniga
Recap on Routing
Goal: each router u must be able to compute, for each other router v, the next-hop neighbor x that is on the least-cost path from u to v v x3 x4 u x2 x1
20052007
Antonio Carzaniga
Recap on Routing
Goal: each router u must be able to compute, for each other router v, the next-hop neighbor x that is on the least-cost path from u to v v x3 x4 u x2 x1
20052007
Antonio Carzaniga
20052007
Antonio Carzaniga
20052007
Antonio Carzaniga
20052007
Antonio Carzaniga
20052007
Antonio Carzaniga
broadcast transmission of topology information global knowledge of the network local computation
20052007 Antonio Carzaniga
20052007
Antonio Carzaniga
20052007
Antonio Carzaniga
The measured costs are used to build LSAs, which are issued also at regular intervals
20052007
Antonio Carzaniga
The measured costs are used to build LSAs, which are issued also at regular intervals Changes in link costs are propagated quickly to all routers Routers can then react by recomputing paths and by updating their forwarding tables accordingly
in fact, this reaction is not dierent from the normal behavior of the protocol
20052007
Antonio Carzaniga
Distance-Vector Routing
20052007
Antonio Carzaniga
Distance-Vector Routing
Every router u maintains a distance vector
v is a destination node in the network Du [v] is the best known distance between u and v nu [v] is the next-hop router on the best known path to v
20052007
Antonio Carzaniga
Distance-Vector Routing
Every router u maintains a distance vector
v is a destination node in the network Du [v] is the best known distance between u and v nu [v] is the next-hop router on the best known path to v
20052007
Antonio Carzaniga
Distance-Vector Routing
Every router u maintains a distance vector
v is a destination node in the network Du [v] is the best known distance between u and v nu [v] is the next-hop router on the best known path to v
Routers exchange their distance vectors with their neighbors If the distance vector of a neighbor leads to a better path to some destinations, the router updates its distance vector and sends it out again to its neighbors
20052007
Antonio Carzaniga
Distance-Vector Routing
Every router u maintains a distance vector
v is a destination node in the network Du [v] is the best known distance between u and v nu [v] is the next-hop router on the best known path to v
Routers exchange their distance vectors with their neighbors If the distance vector of a neighbor leads to a better path to some destinations, the router updates its distance vector and sends it out again to its neighbors After a number of iterations, the algorithm converges to a point where every router has a minimal distance vector
20052007
Antonio Carzaniga
Distance-Vector Routing
20052007
Antonio Carzaniga
Distance-Vector Routing
Local transmission of topology information
routers exchange their distance vectors only with their neighbors no broadcast protocol needed (a local broadcast can be useful)
20052007
Antonio Carzaniga
Distance-Vector Routing
Local transmission of topology information
routers exchange their distance vectors only with their neighbors no broadcast protocol needed (a local broadcast can be useful)
router u knows its distance Du [v] and the rst step along that path router u does not know about any link cost except its adjacent links
20052007
Antonio Carzaniga
Distance-Vector Routing
Local transmission of topology information
routers exchange their distance vectors only with their neighbors no broadcast protocol needed (a local broadcast can be useful)
router u knows its distance Du [v] and the rst step along that path router u does not know about any link cost except its adjacent links
Global computation
20052007
Antonio Carzaniga
Intuition
20052007
Antonio Carzaniga
Intuition
The main idea behind the distance-vector algorithm is expressed well by the Bellman-Ford equation
Du [v] = xneighbors(u)
min
(c(u, x) + Dx [v])
20052007
Antonio Carzaniga
Intuition
The main idea behind the distance-vector algorithm is expressed well by the Bellman-Ford equation
Du [v] = xneighbors(u)
min
(c(u, x) + Dx [v])
v x3 x4 u x2 x1
20052007 Antonio Carzaniga
Intuition
The main idea behind the distance-vector algorithm is expressed well by the Bellman-Ford equation
Du [v] = xneighbors(u)
min
(c(u, x) + Dx [v])
18 x3 6 u x2 1 x4 25 20 x1
20052007 Antonio Carzaniga
Distance-Vector Algorithm
Executing locally at node u
20052007
Antonio Carzaniga
Distance-Vector Algorithm
Executing locally at node u Variables storing values known at each iteration
20052007
Antonio Carzaniga
Distance-Vector Algorithm
Executing locally at node u Variables storing values known at each iteration
20052007
Antonio Carzaniga
Distance-Vector Algorithm
Executing locally at node u Variables storing values known at each iteration
Du [v], cost of the least-cost path from u to v (distance vector) nu [v], next-hop node (neighbor of u) on the least-cost path from u to v
20052007
Antonio Carzaniga
Distance-Vector Algorithm
Executing locally at node u Variables storing values known at each iteration
Du [v], cost of the least-cost path from u to v (distance vector) nu [v], next-hop node (neighbor of u) on the least-cost path from u to v Dx [v], distance vectors of every neighbor node x
20052007
Antonio Carzaniga
20052007
Antonio Carzaniga
7 when link cost c(u, x) changes 8 do for v N 9 do Du [v] minxneighbors(u)(c(u, x) + Dx [v]) 10 if Du was updated 11 then send Du to all neighbor nodes
20052007
Antonio Carzaniga
20052007
Antonio Carzaniga
Example
b 2 a
c 6
20052007
Antonio Carzaniga
Example
a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 a 2 a a 4 b 2 b 0 b 1 b c c 1 c 0 c 6 d 4 d d 6 d 0 b 2 a 4
c 6 d
20052007
Antonio Carzaniga
Example
a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 a 2 a a 4 b 2 b 0 b 1 b c c 1 c 0 c 6 d 4 d d 6 d 0 a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 2 4 a 2 0 a 3 2 4 a 4 0 b 2 0 b 0 2 1 b 1 0 b 6 2 1 c 3 1 6 c 1 0 c 0 1 6 c 6 0 d 4 0 d 6 4 6 d 6 0 d 0 4 6 b 2 a 4
c 6 d
20052007
Antonio Carzaniga
Example
a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 a 2 a a 4 b 2 b 0 b 1 b c c 1 c 0 c 6 d 4 d d 6 d 0 a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 2 4 a 2 0 a 3 2 4 a 4 0 b 2 0 b 0 2 1 b 1 0 b 6 2 1 c 3 1 6 c 1 0 c 0 1 6 c 6 0 d 4 0 d 6 4 6 d 6 0 d 0 4 6 a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 2 4 a 2 0 3 a 3 2 4 a 4 0 3 b 2 0 6 b 0 2 1 b 1 0 6 b 6 2 1 c 3 1 6 c 1 3 0 c 0 1 6 c 6 3 0 d 4 6 0 d 6 4 6 d 6 6 0 d 0 4 6
20052007
Antonio Carzaniga
Example (2)
b 2 a
c 9
20052007
Antonio Carzaniga
Example (2)
a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 a 2 a a 4 b 2 b 0 b 1 b c c 1 c 0 c 9 d 4 d d 9 d 0 b 2 a 4
c 9 d
20052007
Antonio Carzaniga
Example (2)
a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 a 2 a a 4 b 2 b 0 b 1 b c c 1 c 0 c 9 d 4 d d 9 d 0 a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 2 4 a 2 0 a 3 2 4 a 4 0 b 2 0 b 0 2 1 b 1 0 b 6 2 1 c 3 1 9 c 1 0 c 0 1 9 c 9 0 d 4 0 d 6 4 9 d 9 0 d 0 4 9 b 2 a 4
c 9 d
20052007
Antonio Carzaniga
Example (2)
a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 a 2 a a 4 b 2 b 0 b 1 b c c 1 c 0 c 9 d 4 d d 9 d 0 a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 2 4 a 2 0 a 3 2 4 a 4 0 b 2 0 b 0 2 1 b 1 0 b 6 2 1 c 3 1 9 c 1 0 c 0 1 9 c 9 0 d 4 0 d 6 4 9 d 9 0 d 0 4 9 a Da Db Dd b Db Da Dc c Dc Db Dd d Dd Da Dc a 0 2 4 a 2 0 3 a 3 2 4 a 4 0 3 b 2 0 6 b 0 2 1 b 1 0 6 b 6 2 1 c 3 1 9 c 1 3 0 c 0 1 9 c 7 3 0 d 4 6 0 d 6 4 9 d 7 6 0 d 0 4 9
20052007
Antonio Carzaniga