Distance vector versus link-state
There are two major classes of routing protocol: distance vector and link-state. It's easy to remember which protocols belong to either class, but comprehending the differences between the two classes takes a bit more effort.
Distance vector routing is so named because it involves two factors: the distance, or metric, of a destination, and the vector, or direction to take to get there. Routing information is only exchanged between directly connected neighbors. This means a router knows from which neighbor a route was learned, but it does not know where that neighbor learned the route; a router can't see beyond its own neighbors. This aspect of distance vector routing is sometimes referred to as "routing by rumor." Measures like split horizon and poison reverse are employed to avoid routing loops.
Link-state routing, in contrast, requires that all routers know about the paths reachable by all other routers in the network. Link-state information is flooded throughout the link-state domain (an area in OSPF or IS-IS) to ensure all routers posess a synchronized copy of the area's link-state database. From this common database, each router constructs its own relative shortest-path tree, with itself as the root, for all known routes.
Consider the following topology.

Both distance vector and link-state routing protocols are suitable for deployment on this network, but each will go about propagating routes in a different manner.
Distance Vector
If we were to run a distance vector routing protocol like RIP or EIGRP on this topology, here's how R1 would see the network, assuming each link has a metric of 1 (locally connected routes have been omitted):

Notice that although R1 has connectivity to all subnets, it has no knowledge of the network's structure beyond its own links. R4 has even less insight:

Because they do not require routers to maintain the state of all links in the network, distance vector protocols typically consume less overhead at the expense of limited visibility. Because routers have only a limited view of the network, tools like split horizon and poision reverse are needed to prevent routing loops.
Link-State
Now, let's look at the same topology running a link-state routing protocol (in a single area). Because each router records the state of all links in the area, each router can construct a shortest-path tree from itself to all known destinations. Here's what R1's tree would look like:

R4 has constructed its own shortest-path tree, different from that of R1:

Although maintaining link-state information for the entire area typically requires more overhead than does processing advertisements only from direct neighbors, but provide more robust operation and scalability.
Comments
As usual neat & clear write-up. +1 to your fan's list :-)
It's funny how even some link-state protocols still act like link-state in certain scenarios.
Nice information. Thanks. I like to add one more point. If a network is huge its better to use link state than distance vector,because there are more limitations in distance vector like Hop count limit etc
A 'vector' has both direction and distance already. So then why did they call it 'distance vector'? Those crazy network guys..
I like the blog theme :p
Thank you!
This helped a lot, better than my teachers pdf´s, and all he had to do was translate the cisco notes.
anyways... as said above, very clear & neat
it is a boon for the learner........thanks a lot
never came across a definitive explanation untill now! More grease to your elbow... Thanks!
QUOTE " Venkatesan commented on 2 Oct 2008 at 6:53 p.m.
Nice information. Thanks. I like to add one more point. If a network is huge its better to use link state than distance vector,because there are more limitations in distance vector like Hop count limit etc"
The intuition seems appropriate at first glance but further investigation reveals that large networks are best supported using DV-centric approach instead of LS. Imagine a large network with 1000's of routers having to keep track of all the others.
Hence, it is clear why the networks of network - the Internet - adopts a path-vector approach in its usage of BGP.
I searched through google to understand the difference between link state and distance vector and out of all the sites I have reffered, this blog was the one which cleary helped me to understand the difference!! Thanks for providing the clarity!!
Cheers,
Arun
Clear and absorbed thanks for the day.
Good Explanation dude, brief and easy to understand!! Nice one!!
Good Information,
After seeing this difference. I think that its better to use Distance vector Routing for large networks. Because If a router uses Distance vector algo.. the router will come to know only the details of neighbouring router. But If a router uses Link state Routing then each router will find is own shortest path. I Think this not good for larger networks like (1000 routers).
This is my assumption. Any other guys you can clarify on this and please let me know, am I right?
@those of you speaking of DV vs LS for large networks, don't forget about AREAS. In OSPF the link states are only known within an area, outside of that OSPF acts like a DV protocol. Therefore, LS protocols are fine for large networks if designed properly.
Very nice, Very informative....
The information provided is really superb !
Thank you
nice post! thanks!
Its simple and easy to understand. It really help me a lot.
Its help me to understand the real difference,Thankyou!
Very nice explanation.
Raj
Very nice sharing & explanation....
I alwayz prefer internet 4 reading & understandin' rather than books :))
Thumbs Up


I remember when we had to count out excersises using Dijkstra-algorithm at college years ago. On a piece of paper..another useless thing I tought, and just realized OSPF uses the same math to build the shortest-path tree.