Distance Vector Routing-Tut
Distance Vector Routing-Tut
Distance Vector Routing-Tut
A distance-vector routing (DVR) protocol requires that a router inform its neighbors of
topology changes periodically. Historically known as the old ARPANET routing algorithm (or
known as Bellman-Ford algorithm).
Bellman Ford Basics – Each router maintains a Distance Vector table containing the distance
between itself and ALL possible destination nodes. Distances,based on a chosen metric, are
computed using information from the neighbors’ distance vectors.
From time-to-time, each node sends its own distance vector estimate to neighbors.
When a node x receives new DV estimate from any neighbor v, it saves v’s distance
vector and it updates its own DV using B-F equation:
Dx(y) = min { C(x,v) + Dv(y)} for each node y ∈ N
Example – Consider 3-routers X, Y and Z as shown in figure. Each router have their routing
table. Every routing table will contain distance to the destination nodes.
Consider router X , X will share it routing table to neighbors and neighbors will share it routing
table to it to X and distance from node X to destination will be calculated using bellmen- ford
equation.
Dx(y) = min { C(x,v) + Dv(y)} for each node y ∈ N
As we can see that distance will be less going from X to Z when Y is intermediate node(hop) so
it will be update in routing table X.
Similarly for Z also –
Finally the routing table for all –
Note – Distance Vector routing uses UDP(User datagram protocol) for transportation.
Link State Routing –
It is a dynamic routing algorithm in which each router shares knowledge of its neighbors
with every other router in the network.
A router sends its information about its neighbors only to all the routers through
flooding.
Information sharing takes place only whenever there is a change.
It makes use of Dijkastra’s Algorithm for making routing tables.
Problems – Heavy traffic due to flooding of packets.
– Flooding can result in infinite looping which can be solved by using Time to leave
(TTL) field.
Comparison between Distance Vector Routing and Link State Routing: