0 votes 0 votes Computer Networks computer-networks distance-vector-routing + – LavTheRawkstar asked Apr 5, 2017 LavTheRawkstar 1.4k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 1 votes 1 votes Distance-Vector Routing Each node constructs a one-dimensional array containing the "distances"(costs) to all other nodes and distributes that vector to its immediate neighbors. The starting assumption for distance-vector routing is that each node knows the cost of the link to each of its directly connected neighbors. A link that is down is assigned an infinite cost. Information Stored at Node Distance to Reach Node A B C D E F G A 0 1 1 � 1 1 � B 1 0 1 � � � � C 1 1 0 1 � � � D � � 1 0 � � 1 E 1 � � � 0 � � F 1 � � � � 0 1 G � � � 1 � 1 0 Table 1. Initial distances stored at each node(global view). We can represent each node's knowledge about the distances to all other nodes as a table like the one given in Table 1. Note that each node only knows the information in one row of the table. Every node sends a message to its directly connected neighbors containing its personal list of distance. ( for example, A sends its information to its neighbors B,C,E, and F. ) If any of the recipients of the information from A find that A is advertising a path shorter than the one they currently know about, they update their list to give the new path length and note that they should send packets for that destination through A. ( node B learns from A that node E can be reached at a cost of 1; B also knows it can reach A at a cost of 1, so it adds these to get the cost of reaching E by means of A. B records that it can reach E at a cost of 2 by going through A.) After every node has exchanged a few updates with its directly connected neighbors, all nodes will know the least-cost path to all the other nodes. In addition to updating their list of distances when they receive updates, the nodes need to keep track of which node told them about the path that they used to calculate the cost, so that they can create their forwarding table. ( for example, B knows that it was A who said " I can reach E in one hop" and so B puts an entry in its table that says " To reach E, use the link to A.) Information Stored at Node Distance to Reach Node A B C D E F G A 0 1 1 2 1 1 2 B 1 0 1 2 2 2 3 C 1 1 0 1 2 2 2 D 2 2 1 0 3 2 1 E 1 2 2 3 0 2 3 F 1 2 2 2 2 0 1 G 2 3 2 1 3 1 0 Table 2. final distances stored at each node ( global view). In practice, each node's forwarding table consists of a set of triples of the form: ( Destination, Cost, NextHop). For example, Table 3 shows the complete routing table maintained at node B for the network in figure1. Destination Cost NextHop A 1 A C 1 C D 2 C E 2 A F 2 A G 3 A Table 3. Routing table maintained at node B. Hope this clarifies your doubt Regina Phalange answered Apr 6, 2017 • selected Apr 6, 2017 by LavTheRawkstar Regina Phalange comment Share Follow See 1 comment See all 1 1 comment reply Regina Phalange commented Apr 6, 2017 reply Follow Share http://www.cs.cmu.edu/~srini/15-441/S05/lectures/10-Routing.ppt You can go thru this ppt 0 votes 0 votes Please log in or register to add a comment.