Running OSPF

OSPF is a more advanced interior gateway routing protocol. Unlike RIP, which is a distance-vector protocol, OSPF is a link-state protocol. Instead of determining the best route by looking at the distance (number of hops), link-state protocols run a shortest-path first (SPF) algorithm to create a database of the network's topology and, from that database, to determine the best (that is, shortest) path to a destination.

The nice thing about OSPF is that not only can hops be used as metrics, as in RIP, but you can set OSPF to determine the best path. The best path might use the fewest number of hops or the highest bandwidth links, while using one route for multicast and another for regular unicast packets. Setting up all this multi-topology OSPF routing is a lot of work, but doing so is often worth the effort.

As an IGP, OSPF operates within a single network administrative boundary or domain, which is sometimes called an autonomous system (AS).

Each router running OSPF goes through the following process to discover the network topology and determine the best path to each destination:

  1. OSPF creates link-state advertisements (LSAs), which describe the network topology that the router has in its link-state database.
  2. The router floods the LSAs to all routers in the domain.
  3. When the router receives LSAs from other routers, it adds the information to its link-state database.
  4. The router runs the Dijkstra SPF calculation to determine the shortest path to each destination in ...

Get Junos® OS For Dummies®, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.