0% found this document useful (0 votes)
9 views18 pages

Dist Vector Routing

NA

Uploaded by

dynamogaming8055
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views18 pages

Dist Vector Routing

NA

Uploaded by

dynamogaming8055
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Distance Vector Routing

• Completely decentralized

• No node has complete information about the costs of


all network links

• Gradual calculation of path by exchanging information


with neighbors
– Remember -- network as a graph ?
Specifics

• Each node constructs a one-dimensional array containing


the “distances” or “costs” to all other nodes (as it
relates to its knowledge) and distributes it to its
immediate neighbors.

• Key thing -- each node knows the cost of links to its


neighbors.

• If no link exists between two nodes, the cost of a


direct link between the nodes is “infinity”.
Representation
• The cost from X to Y via Z is the cost from X to Z plus the “minimum”
cost from Z to Y.

• Dx (Y,Z) = C(X, Z) + minW{Dz(Y,W)}


• LHS -- Cost from X to Y via Z
• RHS -- first term -- cost to go to Z
-- second term -- minimum cost to go from Z to Y.

• Minimum cost from Z to Y computed by taking all possible paths into


consideration.
An Example

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.

• Each node sends a message to neighbors


with a list of distances.
Cost Next
• F --> A with G is at a distance 1 Hop
B 1 B
• C --> A with D at distance 1.
C 1 C
D 2 C
B
E 1 E
C
A
D
F 1 F
G 2 F
E

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.

• This table is consistent.

• Convergence is achieved.

• Notice -- no centralized authority


Routing updates
• When are routing updates sent ?

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).

o Note: typically order of periodicity is seconds to several minutes.


Link/Node Failures
• Nodes that first notice send new lists of
distances to neighbors.
• How do they detect failures ?
– Route updates don’t arrive
– Probing with test packets.
Example Revisited
• Let link from F to G fail.
• F sets new distance to G to ∞; sends
update to A. B

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.

• Another possibility, B gets A’s update followed


by C’s update which says that E is reachable in
2 hops. B

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.

• With Split Horizon, when a node sends a routing table update to


its neighbors, it “does not” send those routes it learned from “a
particular” neighbor, back to that neighbor.
– For example, B had E, 2, A. When it sends a route update to A, it does
not include this.

• With split horizon with poison reverse, this update is reported


but the link weight is set to ∞.
– For example B sends (E, ∞) to A.
Link State Routing Protocol

• 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.

Creation of Link State Packet (LSP)

• 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:

❖ It requires large amount of memory.

❖ Shortest path computations require many CPU circles.

❖ If network use the little bandwidth ; it quickly reacts to topology changes.

❖ All items in the database must be sent to neighbors to form link state packets.

❖ No split horizon techniques are possible in the link state routing.

❖ Distance Vector Routing Protocol Ex: RIP(Routing Information Protocol)


❖ Link State Routing Protocol Ex: OSPF(Open Shortest Path First)

You might also like