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 posses a synchronized copy of the area's link-state database
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 posses a synchronized copy of the area's link-state database
As the name implies, distance vector routing protocols use distance to determine the best path to a remote network. The distance is usually the number of hops (routers) to the destination network.
Distance vector protocols send complete routing table to each neighbor (a neighbor is directly connected router that runs the same routing protocol). They usually use some version of Bellman-Ford algorithm to calculate the best routes. Compared with link state routing protocols, distance vector protocols are simpler to configure and require little management, but are susceptible to routing loops and converge slower than link state routing protocols. Distance vector protocols also use more bandwidth because they send complete routing table, while link state procotols sends specific updates only when topology changes occur.
RIP and EIGRP are examples of distance vector routing protocols.
Link state protocols:
Link state routing protocols are the second type of routing protocols. They have the same basic purpose as distance vector protocols, to find a best path to a destination, but use different methods to do so. Unlike distance vector protocols, link state protocols don’t advertise the entire routing table. Instead, they advertise information about a network toplogy (directly connected links, neighboring routers…), so that in the end all routers running a link state protocol have the same topology database. Link state routing protocols converge much faster than distance vector routing protocols, support classless routing, send updates using multicast addresses and use triggered routing updates. They also require more router CPU and memory usage than distance-vector routing protocols and can be harder to configure.
Each router running a link state routing protocol creates three different tables:
1. neighbor table – the table of neighboring routers running the same link state routing protocol
2. topology table – the table that stores the topology of the entire network
3. routing table – the table that stores the best routes
Shortest Path First algorithm is used to calculate the best route. OSPF and IS-IS are examples of link state routing protocols.
Difference between distance vector and link state routing protocols in attachment
A distance vector router’s understanding of the network is based on its neighbor’s perspective of the topology; consequently, the distance vector approach is sometimes referred to as routing by rumor. Routers running traditional distance vector protocols periodically send their complete routing tables to all connected neighbors. Convergence might be slow because triggered updates are not typically used (RIPv2 is an exception) and loop detection timers are long. In large networks, running a distance vector protocol might cause routing tables to become enormous and
result in a lot of traffic on the links.
Link state protocols
link state protocols don’t advertise the entire routing table. Instead, they advertise information about a network toplogy (directly connected links, neighboring routers…)
Link state routing protocols converge much faster than distance vector routing protocols, support classless routing, send updates using multicast addresses and use triggered routing updates. They also require more router CPU and memory usage than distance-vector routing protocols and can be harder to configure.
See the official Book Designing for Cisco Internetwork Solutions DESGN in Link below
In short I would like to add that DVR focuses primarly on the distance only where as the LS also focus the suitability of link based on some required statistics like congestion, life time etc.
- distance vector protocol periodically every 30 seconds send the routing table to all the neighbors if there ate changes or not in the Internet, while
- Link state protocol send if there is a change in the Internet and it is a whole topology that know about all the networks.