Both the "Distance vector" and "Link State" are terms used to describe and group routing Protocols into two broad categories. The purpose of using any routing protocol by a router is to dynamically communicate information about all network paths which are used to reach a destination network and select the best out of them to forward packets between networks. The decision of selecting the best path will be taken by the routing protocols based on whether the routing protocols select the best routing path based on a distance metric (the distance)
and interface (the vector), or whether it selects the best routing path by calculating the state of each link in a path and finding the path which has the lowest total metric to reach the destination network.
and interface (the vector), or whether it selects the best routing path by calculating the state of each link in a path and finding the path which has the lowest total metric to reach the destination network.
Distance Vector
The distance vector protocols find the best path to a remote network by judging distance. Each time a packet goes through a router, that's called a hop. The route with the least number of hopes to the network is determined to be the best route. The vector indicated the direction to the remote network. Both RIP and IGRP are distance-vector routing protocols. They send the entire routing table to directly connected neighbors.
Following are some common Distance Vector routing protocols:
Following are some common Distance Vector routing protocols:
- Routing Information Protocol (RIP)
- Interior Gateway Routing Protocol (IGRP)
Link State
In link-state protocols, also called shortest path first protocols, the routers each create three separate table. One of these tables keeps track of directly attached neighbor, one determines the topology of the entire internetwork, and one is used as the routing protocol. OSPF is an IP routing protocol that is completely link state. Link state protocols send updates containing the state of their own links to all other routers on the network.
While a link state protocol would give priority to the A C D B path because it is using a faster medium then the ISDN one. in the following scenario that would be better to use a link state protocol but if all links would have the same speed then it would be better to use Distance Vector routing Protocol.
Comparing
In the following figure you can see that if all routers were running a Distance Vector Protocol then the best path from A to B would directly be over the ISDN serial link, though that link is slower then route from A C D B.While a link state protocol would give priority to the A C D B path because it is using a faster medium then the ISDN one. in the following scenario that would be better to use a link state protocol but if all links would have the same speed then it would be better to use Distance Vector routing Protocol.
Hybride
Hybrid protocols use aspects of both distance vector and link state for example, EIGRP.