CS455 Sylabus

### Data structure used/maintained by the Distance Vector Routing Algorithm

• Data Structures used in the Routers:

• Each node (router) maintains two data structures:

• A routing table containing entries of the form:

• A distance table with the following structure:

• The distance to a destination node

• The distance to a destination node:

 Distance to a (destination) node x = the smallest of the distances in the distance table that that (destination) node x

Example:

• Sample distance table:

Then:

 ``` Distance to C = 2 Other distances: Distance to A = 1 Distance to B = 2 Distance to E = 3 .... ```

• A more sublte example:

• Suppose a node G has the following distance table entry:

 ``` Distance table of a node G: Dest | Via D Via F -------+--------------------- .... | ... ... F | 5 7 .... | ... ... ```

Question:

 What is the distance from G to F ?

 ``` distance(G,F) = min( 5, 7 ) = 5 ```

• Example with a full network (to provide context):

• Relationship of the Routing table and Distance table

• Fact:

 The routing table can be constructed using the information in the distance table (So we do not need to maintained the Routing table explicitly)

• How to construct the Routing table using the Distance table:

 ``` for ( each destination D ) { Find the smallest distance to D in the Distance table The neighbor used to reach D is the "next node" in the routing table } ```

• Example:

• Example of a distance table entry:

Notice that:

 Smallest distance to destination F is via the neighbor node D

The Routing table of node G will be like this:

 ``` Dest Next hop ---------+------------ ... | ..... F | D ... | ..... ```

• My combined distance and routing table

• Dictactical note:

 In the presentation of the Distance Vector algorithm, I combine the distance table and the routing table into a single table

Example:

• Initializing the data structures

• Example network:

• Initialization at node A:

• Node A is only aware of the link cost to its immediate neighbors:

• Therefore, the distance vector is initialzed as follows:

Note:

 Initially, the node G is not in the distance table !!! I include every destination in the tables because it's easier to make the figures !!!

• The routing table is initialized as follows:

• Other relevant information (used by Distance Vector Algorithm)

• Other information:

 Distance from the (computing) node to all its neighbors

Note:

 "Distance" a neighbor node = delay to the neighbor node (The node can measure the queueing delay and transmission delay as discussed previously)