← Lessons

quiz vs the machine

Platinum1660

Networking

Link State Routing With OSPF

Understand how routers build a full map of a network and compute shortest paths.

5 min read · advanced · beat Platinum to climb

Routing Inside An Organization

While BGP routes between independent networks on the internet, an organization needs to route within its own network. OSPF, short for open shortest path first, is a widely used interior routing protocol built on the link state idea.

How Link State Works

Each router describes its own directly connected links and floods that description to every other router.

  • A router lists its neighbors and the cost of each link.
  • These descriptions are flooded so every router learns them.
  • Each router assembles them into an identical map of the whole network.

Because every router holds the same map, they all compute consistent paths.

Computing The Shortest Path

From its map, each router runs a shortest path computation, the same idea as Dijkstra, treating link costs as edge weights. The result is the lowest cost next hop toward every destination.

  • Lower cost links, such as faster ones, are preferred.
  • When a link fails, routers reflood and recompute, converging on a new path.

Areas For Scale

Large deployments split the network into areas so flooding and recomputation stay local. A backbone area connects the others, keeping each router map manageable as the network grows.

Key idea

OSPF floods each router link costs so every router builds the same network map, then computes shortest paths from it, reconverging when links change.

Check yourself

Answer to earn rating on the learn ladder.

1. What does each OSPF router flood to the others?

2. How does an OSPF router pick the next hop to a destination?