Skip to content
We areTOP 1%

What is the difference between distance-vector and link-state routing?

MediumConceptRouting Protocols
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

In distance-vector routing, each router knows only its distance (cost) to every destination and which neighbour to use, and it periodically shares its whole table with its neighbours. In link-state routing, each router floods information about its own links to every router, so all routers build the same map of the network and compute shortest paths themselves.

Distance vectorLink state
Knowledgeneighbours' tables onlyfull topology
AlgorithmBellman-FordDijkstra
Typical metrichop countlink cost based on bandwidth
Convergenceslow; count-to-infinity possiblefast
Resourceslittle memory and CPUmore memory and CPU
ExampleRIPOSPF, IS-IS
  • Distance vector is often called "routing by rumour", because a router trusts whatever its neighbours report.
  • Between autonomous systems (networks run by different organisations), the internet uses BGP, a path-vector protocol that advertises the full list of networks a route passes through.

Example: Finding a railway station in a new city: distance vector is asking the person at each junction "how far is the station from here?" and trusting the answer; link state is giving everyone the full city map so each can work out the shortest route alone.

More in Routing Protocols

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account