Dist Vector Routing
Dist Vector Routing
• Completely decentralized
B A B C D E F G
C
A
D
A 0 1 1 ∞ 1 1 ∞
B 1 0 1 ∞ ∞ ∞ ∞
E
C 1 1 0 1 ∞ ∞ ∞
F G D ∞ ∞ 1 0 ∞ ∞ 1
• Internal
Information at E 1 ∞ ∞ ∞ 0 ∞ ∞
each node -----> F 1 ∞ ∞ ∞ ∞ 0 1
G ∞ ∞ ∞ 1 ∞ 1 0
Routing Tables
B
Cost Next
C
A Hop
D
B 1 B
• With this
E
information, C 1 C
routing table D ∞ -
F G
at A is --> E 1 E
F 1 F
G ∞ -
Evolution of the table.
F G
Final Distance Matrix
A B C D E F G
B
C A 0 1 1 2 1 1 2
A
D B 1 0 1 2 2 2 3
C 1 1 0 1 2 2 2
E D 2 2 1 0 3 2 1
E 1 2 2 3 0 2 3
F G F 1 2 2 2 2 0 1
G 2 3 2 1 3 1 0
Convergence
• In the absence of topological changes -- few
exchanges between neighbors before complete routing
table is formed.
• Convergence is achieved.
1. Periodic updates
– Even if nothing has changed, send periodically. Main reason is to let other
nodes know that the sender is alive.
– Refresh information that might be needed if some of the routes were to
become unavailable.
2. Triggered updates
– When a node receives an update from one of its neighbors which may lead to
a change in its routing tables (could be due to change in link cost).
C
A
• A was initially routing to G via F. So it now D
sets link cost to G to ∞.
• Next update from C; A learns that C has 2 E
hop path to G.
F G
• A now can reach G in 3 hops via C.
• A sends an update to F. Thus, F now, can
reach G via A in 4 hops.
Count to Infinity
• A discovers that link to E is lost. • The process continues
and thus, the system
• If before A’s message (saying that link cost to does not stabilize.
E is ∞) is received, if B or C advertise that
they can reach E in two hops, then A can be • This is the count to
confused. infinity problem.
C
A
• So B tells A this, and A thinks it can now reach D
E via B in 3 hops.
E
• This information reaches C who now thinks that
it can reach E in 4 hops via A. F G
Split Horizon
• One solution would be to approximate ∞ to say 16 hops.
• In link state routing, four sets of actions are required to ensure that each node has
the routing table showing the least-cost node to every other node.
1. Creation of the states of the links by each node, called the link state packet or LSP.
2. Dissemination of LSPs to every other router, called flooding, in an efficient and
reliable way.
3. Formation of a shortest path tree for each node.
4. Calculation of a routing table based on the shortest path tree.
• A link state packet (LSP) can carry a large amount of information. For the
moment, however, we assume that it carries a minimum amount of data: the node
identity, the list of links, a sequence number, and age.
Link State protocol in comparison to Distance Vector protocol has:
❖ All items in the database must be sent to neighbors to form link state packets.