Hence from ns perspective it should choose the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: servation about finding shortest-cost paths in graphs, originally due to Bellman and Ford. Consider a node n in the network and some destination d. Suppose that n hears from each of its neighbors, i, what its cost, ci , to reach d is. Then, if n were to use the link n-i as its route to reach d, the corresponding cost would be ci + li , where li is the cost of the n-i link. Hence, from n’s perspective, it should choose the neighbor (link) for which the advertised cost plus the cost of the link from n to that neighbor is smallest. More formally, the lowest-cost path to use would be via the neighbor j , where j = arg min(ci + li ). (18.1) i The beautiful thing about this calculation is that it does not require the advertisements from the different neighbors to arrive synchronously. They can arrive at arbitrary times, and in any order; moreover, the integration step can run each time an advertisement arrives. The algorithm will eventually end up computing the right cost and finding the correct route (i.e., it will converge). Some care must be taken while implementing this algorithm, as outlined below: CHAPTER 18. NETWORK ROUTING - I 8 WITHOUT ANY FAILURES Figure 18-4: Periodic integration and advertisement steps at each node. 1. A node should update its cost and route if the new cost is smaller than the current estimate, or if the cost of the route currently being used changes. One question you might have is what the initial value of the cost should be before the node hears any advertisements for a destination. clearly, it should be large, a number we’ll call “infinity”. Later on, when we discuss failures, we will find that “infinity” for our simple distance-vector protocol can’t actually be all that large. Notice that “infinity” does needs to be larger than the cost of the longest minimum-cost path in the network for routing between any pair of nodes to work correctly, because a path cost of “infinity” between some two nodes means that there is no path between those two nodes. 2....
View Full Document

This document was uploaded on 02/26/2014 for the course CS 6.02 at MIT.

Ask a homework question - tutors are online