Q3 2025 July Public Promo/Forrester Rotating
  • 50% off tech skill building. Use code JULY50 at checkout. Save now
  • 2025 Forrester Wave™ names Pluralsight as Leader among tech skills dev platforms. Get the report
close button
Hamburger Icon

Dynamic routing protocols: Distance vector vs link state

There are two major classes of dynamic routing protocols: distance vector and link state routing protocols. Learn about each protocol and how they operate.

Dec 12, 2007 • 3 Minute Read

If you're working towards your Cisco Certified Network Professional (CCNP), Certified Cyber Intelligence Professional (CCIP), or Cisco Certified Design Professional (CCDP) certifications, you'll need to know advanced IP addressing and routing.

These certifications test your knowledge on implementing scalability for Cisco Integrated Services Routers (ISR) connected to LANs and WANs.

To ace these exams, you'll need to understand:

  •  Advanced IP addressing
  •  Routing principles
  •  Multicast routing 
  •  IPv6 
  •  Manipulating routing updates
  •  Configuring basic BGP
  •  Configuring EIGRP, OSPF, and IS-IS

In this article, we dive into routing principles and dynamic routing protocols.

Introduction to dynamic routing protocols

There are two major classes of dynamic routing protocols: Distance vector and link state routing protocols.

We'll begin with a description of each routing class's operational principles. Afterwards, we'll cover the details on their actual operation and design.

If you need to refresh your memory on static and default routing concepts before we get started, take a look at our article on Default and static routing basics.

Router protocols: Distance vector vs link state

There are different routing classes available to provide a more spherical solution packet. Different networks have special needs, and different routing protocols have been designed to meet these needs.

When it comes to using the "right" routing protocol, there is no straightforward answer. You should investigate a variety of parameters before deciding. Consider bandwidth prerequisites, reliability, convergence speed, and network architecture, just to name a few.

We won't concentrate on the details of the best routing decision process here. But we will illustrate the details behind the operation of the different routing classes so you can make the appropriate decisions yourself.

What are distance vector routing protocols?

Distance vector routing protocols decide on the best path to a given destination based on the distance. Distance is usually measured in hops, though the distance metric could be delay, packets lost, or something similar.

If the distance metric is hop, then each time a packet goes through a router, a hop is considered to have traversed. The route with the least number of hops to a given network is concluded to be the best route towards that network.

The vector shows the direction to that specific network. Distance vector protocols send their entire routing table to directly connected neighbors. Examples of distance vector protocols include Routing Information Protocol (RIP) and Interior Gateway Routing Protocol (IGRP).

If you're interested in learning more about RIP, check out my article on RIPv2.

What are link state routing protocols?

Link state protocols are also called shortest-path-first protocols. Link state routing protocols have a complete picture of the network topology. They know more about the whole network than any distance vector protocol.

Three separate tables are created on each link state routing enabled router. One table is used to hold details about directly connected neighbors. One is used to hold the topology of the entire internetwork. The last one is used to hold the actual routing table.

Link state protocols send information about directly connected links to all the routers in the network. Examples of link state routing protocols include Open Shortest Path First (OSPF) and Intermediate System to Intermediate System (IS - IS).

There are also routing protocols that are considered to be hybrid in the sense that they use aspects of both distance vector and link state protocols. Enhanced Interior Gateway Routing Protocol (EIGRP) is one of those hybrid routing protocols.

Operation of distance vector routing protocols

To illustrate the routing updating process for distance vector routing protocols, let's say that we have routers that have been set in service at the same time and all run a distance vector routine protocol.

Each router sends its distance vector to its neighbor. Each router also receives distance vectors from each neighbor as well. When each router combines its own information with the information learned from neighbors, the best estimate route to a given destination is inserted into the routing table.

Upon receiving the routing updates from all neighbors, the final router, which we’ll call RouterH, performs its calculation and estimates the best route to any given destination. 

The result of this process? The first router (RouterA) to the penultimate router (RouterG), tell RouterH how far away RouterD is. RouterH knows that both routers (A and G) are neighbor routers. As a result, it adds one to the hop metric and concludes that it can reach RouterD via both RouterA and RouterG with an overall distance of two hops.

Operation of link state routing protocols

As already mentioned, link state routing protocols hold three distinctive tables: a neighbor table, a topology table, and an actual routing table.

With that in mind, link state routing operation follows four simple steps. Each link state enabled router must perform the following:

  1.  Discover its neighbors and build its neighbor table
  2.  Measure the cost (delay, bandwidth, etc.) to each of its neighbors
  3.  Construct and send a routing update of its learnings to all routers in the network
  4. Apply the Dijkstra algorithm to construct the shortest path to all possible destinations

Link state routing in 4 steps

Below you'll find more details on the four step process.

Step 1: Neighbor discovery

Each link state enabled router periodically sends a HELLO message on each of its links. Neighbor routers respond to these HELLO messages identifying themselves. These replies include their network addresses. The router that initiated the HELLO uses them to build up its neighbor table. 

Step 2: Measuring link cost

Each router performs a set of tests to measure the cost to each of its neighbors. The cost could be a measure of the end-to-end delay, throughput, or a combination of these metrics.

How these tests are performed is a topic for another article. The important thing to know is that each link state enabled router has to possess an estimate of the cost for each of its links.

Step 3: Building and distributing link state packets

Each router builds up a packet containing its neighbors and the corresponding link costs to these neighbors.

At the beginning of the packet, each router adds its identity along with a sequence number and an age parameter. The age parameter ensures no packet will wander around for an indefinite period of time. After the construction process, the packet is flooded in the network.

Step 4: Evaluating shortest paths

Using all the details from its link state table, a router is able to compute, using the Dijkstra algorithm, the shortest path to any given destination.

Final reflections on distance vector vs link state

Here's a quick recap of what you learned in this article comparing distance vector and link state protocols: 
 
  • Distance vector protocols send their entire routing table to directly connected neighbors.
  • Link state protocols send information about directly connected links to all the routers in the network.
  • Distance vector protocols have slow convergence and suffer from the count-to-infinity problem.
  • Link state routing protocols are widely used in large networks due to their fast convergence and high reliability.

Learn more about dynamic routing in this Pluralsight course.

Pluralsight Content Team

Pluralsight C.

The Pluralsight Content Team delivers the latest industry insights, technical knowledge, and business advice. As tech enthusiasts, we live and breathe the industry and are passionate about sharing our expertise. From programming and cloud computing to cybersecurity and AI, we cover a wide range of topics to keep you up to date and ahead of the curve.

More about this author