Please explain it in terms of metric.I am confused on what kind of metric is used by both of them. Also explain terms like cost,hops, hop count in the context.


Distance-vector protocols use a vector (direction) and a simple hop count (how many routers it must pass through) to determine how to get to a network. A router will look at the number of hops as the metric to determine the best path to send traffic destined for a particular network.

Link-state protocols let each router get a complete picture of the area in which they reside. The metric is an arbitrary number, often called cost. Since each router knows all the paths to a particular network in its area, it compares the costs for each possible path to arrive at the path which it will use to send traffic destined for a particular network. Cost can be based on things like bandwidth (the usual default), or it can be any arbitrary number the network designer may wish to use. The cost for a path to a network is the aggregated costs for each link in the path.

One problem with distance-vector routing is that it can send traffic to slower links which have less hops than faster links which have more hops, whereas link-state routing doesn't care about the number of hops, only the cost, to get to the destination network, and the cost can reflect something important like the bandwidth of the path. Distance-vector routing also has convergence problems compared to link-state routing.


The difference between DV and LS protocols actually has nothing to do with choice of metric; the common misconception that it does is simply because the only non-proprietary DV protocol in common use (RIPV2) uses hop count as its metric, and none of the LS protocols do.

There's a now-obsolete Cisco-proprietary DV routing protocol called IGRP, which was almost identical to RIPV1 except that it used a composite metric based on bandwidth and delay (the same one used in the current proprietary EIGRP) instead of hop count.

The real difference is in what routers advertise to each other. In LS they only advertise what networks they have working direct connections to (that's what a router's "link state" means); eventually all the routers in the network have a complete list of their own and everybody else's direct connections, and then essentially consider all possible ways of getting from themselves to any of the other networks in the list, calculate the metric for each way, and pick the ones with the lowest metrics and install them as routes.

In DV, routers not only advertise their own directly-connected networks, they advertise networks that they've heard about from other routers; in other words, they send out their whole routing tables. Each route they advertise includes a calculated metric which can be, but does not have to be, the number of routers they'd need to send a packet destined for a particular network to go through ("hop count"). Because much of the information each router sends was determined indirectly, DV routing is sometimes referred to as "routing by rumor".

In short, in DV routers advertise actual routes; in LS routers advertise link states. In LS, every router knows exactly who's directly connected to whom ("the topology of the network"); in DV they only who has some way of reaching whom.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.