8

I'm trying to figure out the differences(pros/cons) between two routing protocols approach and I would be great-full for any help, advice and explanation. As far I can say that it seems like distance vector is more static and more local based routing, since it doesn't know the network state whereas link state is more aware of current states therefore it seems more natural to use it over distance-vector, but I have a feeling like I'm missing something. And I would be glad to here about more aspects and different issues I have to consider while choosing one of them.

Murali Suriar
  • 10,166
  • 8
  • 40
  • 62
Artem Barger
  • 267
  • 1
  • 4
  • 9

5 Answers5

9

Distance Vector

Pure distance vector protocols are rare; the only one really remaining in any sort of use is RIP. EIGRP, a Cisco proprietary protocol, is also technically distance vector, but it makes use of several optimisations that allow it to overcome the traditional shortcomings of distance vector protocols. Distance vector protocols do not distribute any topology information; they simply advertise the next hop to a route, along with a cost.

Pros:

  • Minimal configuration required.
  • Low CPU/memory overhead.

Cons:

  • Prone to routing loops (less applicable to EIGRP).
  • Slow convergence time.
  • Different routers may have different perceptions as to the 'state' of the network.

Link state

Link-state protocols function by advertising each router's connected interfaces to every other device in the routing domain. Effectively, each device builds a database of the full network topology, and uses this database to determine the best path to each destination network.

The two major link-state protocols in use are OSPF and IS-IS; both are based around an implementation of Dijkstra's algorithm. OSPF is the more well-known of the two; IS-IS tends to be found more in service provider networks.

Pros:

  • All routers in the network have a consistent view of the world.
  • Loops are essentially impossible in a link-state network.
  • Fast reconvergence.

Cons:

  • Higher CPU/memory footprint required.
  • Difficult to filter routes being advertised to specific routers, as link-state algorithms rely on the entire AS having a consistent view of the world.

Protocol choice

In terms of which protocol type you should use, it depends on your requirements. In general, unless you are being forced to do so by a vendor, RIP should not be used. If you are running an all Cisco network, EIGRP can be brought up with very little manual configuration. If interoperability between vendors is a requirement, OSPF may be a better choice. As mentioned in another answer, if you are going to be exchanging routes with a 3rd party, BGP is the protocol of choice.

One last point: dynamic routing protocols are useful only when your topology is redundant, and you need automatic failover. If you have a single router which supports all of your LAN environments and your ISP circuit, then a default route to your ISP would be more than sufficient.

Murali Suriar
  • 10,166
  • 8
  • 40
  • 62
8

Personally I would choose your routing protocol not the way it works. Now days the right answer is practically always OSPF if its an internal network. If its an external network then the answer is probably BGP ( but you wouldn't be asking in that case ). Link state protocols have fast convergence.

OSPF is a link state protocol, an open standard.

RIP can still be used on tiny networks or to redistribute routing from simple devices to more complex devices ( or to inject default routes )

James
  • 2,212
  • 1
  • 13
  • 19
  • 1
    +1 for BGP for external and OSPF for internal. You'd only want to use anything else in an IP network if your devices don't support those. – David Pashley Jul 05 '09 at 22:07
  • I can see reasons why people may want to run eigrp in a cisco only shop. I chose routing protocols based on device support and protocol behavior, not on the color of the protocol or the underlying algorithm. – chris Jul 08 '09 at 18:24
1

I'm no expert, but... I seem to recall this old formula for just this kind of thing:

(increasing stabilty) x (decreasing latency) = (weighted score for a route)

Just chipping in .02 cents. Hope it will help with your considerations.

Avery Payne
  • 14,326
  • 1
  • 48
  • 87
1

I 100% agree with james -- use the routing protocol based on the requirements not based on the technology.

First -- why are you considering a routing protocol? Are you redistributing routes in a multirouter environment? Are you looking for faster convergence time in a diverse route environment?

If you need complex traffic engineering and you have a complex network with diverse routes and very different link speeds, and if you are in a 100% cisco environment, you might want to consider eigrp. Otherwise, if you have a complex network and diverse routes and you want reasonable convergence times, you really only have OSPF as a choice. I guess you could consider ISIS if you want job security...

If you just want to redistribute a bunch of directly connected routes between a bunch of routers, rip is probably fine. There are quite a few routing devices that only support RIP, such as many wireless APs and cheapo routing switches.

At no point does the actual algorithm used for determining a route or preventing loops really enter into the picture.

chris
  • 11,784
  • 6
  • 41
  • 51
-1

From this page:

Comparing link state algorithm with distance vector algorithm

We know that when a packet arrives to a router, the router indexes a forwarding table and determines the link interface to which the packet is to be delivered. And the routing algorithms are operating in network routers, exchanging and compute the information that is used to configure those forwarding table. The purpose of a routing algorithm is finding a good path from source router to destination router among a set of routers. Normally, a good path is one that has the least cost and it is also the shortest path.

There are some types of routing algorithms such as link states or distance vector routing algorithms. While link states algorithm is an algorithm using global information, the distance vector algorithm is iterative, asynchronous, and distributed. For DV algorithm, each node talks to only its directly connected neighbors, but provides its neighbor with least cost estimates from itself to all the nodes. For LS algorithm, each node talks with all other nodes, but tell them only the cost of it’s directly comparison of some of their attribute. There are some aspects for us to compare these two algorithms

Message complexity: With link state, every node has to keep the information about the cost of each link within the network. And every times, if any of the cost is changed, all the nodes. With distance vector algorithm, message is exchanged between two hosts which are directly connected to each other. And if the change of cost in the link which is belongs to the least cost path for one of the nodes, the DV algorithm will update the new value. But if the change doesn't belong to the least cost part between 2 hosts, there will no updating

Speed of convergence: the implementation of LS is an O (|N|2) which need O (|N||E|) message. But with the DV algorithm, it can converge slowly and have routing loops while the algorithm is converging. In addition, the DV algorithm also suffers from the count to infinity problem.

Robustness: For LS, when a router is down, it can broadcast a wrong cost for the closest one. And also, a node can corrupt or drop packet it get as part of a LS broadcast. However, an LS node is computing for its own forwarding table and other node do the calculation for themselves. So it makes the calculation separated in some way within LS which provide robustness. For DV, the wrong least cost path can be passed to more than one or the entire node so the wrong calculation will be process in the entire net work. This problem of DV is much worse than LS algorithm.

And from this page:

Advantages of Distance Vector Protocols

Well Supported

Protocols such as RIP have been around a long time and most, if not all devices that perform routing will understand RIP.

mgorven
  • 30,036
  • 7
  • 76
  • 121
neel
  • 1
  • 1
    copy/paste from http://www.helium.com/items/612704-comparing-link-state-algorithm-with-distance-vector-algorithm/print. – petrus Aug 14 '11 at 01:19