CS455 Sylabus

### Update message format and processing by the Distance Vector Routing Algorithm

• Reminder

• Reminder:

 The Distance Vector Algorithm is a gossip-based algorithm Nodes exchange distance vector messages with its immediate neighbors to perform the computation

• Structure of the distance vector update messages

• Vector:

• Vector = a row or column of numbers

Example:

 ``` 1 5 2 ```

• Distance vector = a vector of distance values

• Structure of a distance vector message:

 ``` Distance vector message sent by some node N: To Distance ----+---------- A 4 (meaning: distance(N, A) = 4 B * (meaning: distance(N, B) = infinite) .. .. .. .. ```

Example:

• Node A is aware of its distance to B and D:

• Node A will send the following distance vector message to its immediate neighbors:

• When does a node send distance vector update messages

• Trigger:

• Whenever the distance to some destination changes:

 The node must send a distance vector message (to all its immediate neighbors)

Comment:

• A node does not need to send the distance vector update message immediately:

 A node can collect the updates for some period of time and Then send all the updates in one distance vector message

• Dictatical note:

• The distance vector message only need to contain the changed distance values

But:

 In my examples, I list the distances to all nodes (That's because its easier to cut-and-paste and change some values than write out a new vector each time !!!)

• Using the distance vector messages: the distributed Bellman-Ford algorithm

• Suppose a node receives a distance vector message:

 ``` From: NNode Distance vector message: Dest | Distance --------+------------- A | dA B | dB ... | ... ```

• Update procedure:

 ``` Visual help: distance vector message /* --------------------------------------------- Update distances to "Dest" going "Via NNode" --------------------------------------------- */ for ( each entry (Dest, Dist) in the distance vector message ) do { Distance table: Dest | Via X ... Via NNode ... Via Y -------+------------------------------------ A | ... ... d(Me,NNode) + dA ... ... B | ... ... d(Me,NNode) + dB ... ... ....... Visual help: } /* ----------------------------------------------------- Find updated min. distance to "Dest" after an update ----------------------------------------------------- */ for ( each entry (Dest, Dist) in the distance vector message ) do { d(Me, Dest) = minall NNode x ( Via x | d(myself, Dest) ); Visual help: /* ----------------------------------------------------- Propagate a change to your neighbors ---------------------------------------------------- */ if ( d(Me, Dest) has changed ) { Schedule update message "Me, ToNode, d(myself, Dest)" Visual help: } } ```

• Recall:

 To reduce the number of distance vector messages, the updates can be collected for a period of time At the end of the collection period, all distance updates are sent in one message