Lecture 5

# Learn best 2 hop routes to a b c d e f g h b e says

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Nodes know only the cost to their neighbors; not the topology 2.  Nodes can talk only to their neighbors using messages 3.  All nodes run the same algorithm concurrently 4.  Nodes and links may fail, messages may be lost 32 Distance Vector Algorithm Each node maintains a vector of distances to all des9na9ons 1.  Ini9alize vector with 0 (zero) cost to self, ∞ (inﬁnity) to other des9na9ons 2.  Periodically send vector to neighbors 3.  Update vector for each des9na9on by selec9ng the shortest distance heard, aier adding cost of neighbor link –  Use the best neighbor for forwarding 33 9 10/29/13 Distance Vector (2) •  Consider from the point of view of node A –  Can only talk to nodes B and E To A B C D E F G H Ini9al vector Cost 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ F 2 4 G E 3 10 3 2 4 A 4 B H D 1 2 2 3 C 34 Distance Vector (3) •  First exchange with B, E; learn best 1- hop routes To A B C D E F G H B E says says ∞ ∞ 0 ∞ ∞ ∞ ∞ ∞ ∞ 0 ∞ ∞ ∞ ∞ ∞ ∞ B +4 ∞ 4 ∞ ∞ ∞ ∞ ∞ ∞ E +10 ∞ ∞ ∞ ∞ 10 ∞ ∞ ∞ A’s A’s Cost Next 0 -4 B ∞ -∞ -10 E ∞ -∞ -∞ -- Learned beler route F 2 4 G 3 3 E 10 2 4 A 4 B H D 1 2 2 3 C 35 10 10/29/13 Distance Vector (4) •  Second exchange; learn best 2- hop routes To A B C D E F G H B E says says 4 10 0 4 2 1 ∞ 2 4 0 3 2 3 ∞ ∞ ∞ B +4 8 4 6 ∞ 8 7 7 ∞ E +10 20 14 11 12 10 12 ∞ ∞ A’s A’s Cost Next 0 -4 B 6 B 12 E 8 B 7 B 7 B ∞ -- F 2 4 G 3 3 E 10 2 4 A 4 B 2 2 H D 1 3 C 36 Distance Vector (4) •  Third exchange; learn best 3- hop routes To A B C D E F G H B E says says 4 8 0 3 2 1 4 2 3 0 3 2 3...
View Full Document

## This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online