Back to Top (IP Routing)


  • OSPF: Open Shortest Path First
  • IGP: Interior gateway protocol
  • Link-state protocol: OSPF uses different approach to BGP and RIP
  • IS-IS is also a link-state protocol
  • Understand full topology: Link-state protocols learn all routers, all links/subnets
  • Same information in each router: all links and routers
  • Embeds its own transport protocol: does not use TCP or UDP, it runs directly on IP.
  • LSA: OSPF peers send link state advertisements (LSAs)
  • LSDB: LSAs are stored in a link state database (LSDB)
  • Three main steps: become neighbors, exchange DB info, choose best routes


  • Router ID is assigned to each router, IPv4 address format, but can be anything.
  • Router ID selection: manual configuration, highest UP loopback, highest UP non-loopback
  • Neighbors: “Hello” with router ID and known neighbors. Hello also lets existing neighbors known they are still active.
  • Checks to become a neighbor: Area ID, hello & dead timers must be the same, neighbor links on same subnet. Default Hello timer is every 10 seconds. If using authentication must match. Stub area must match as well. Rrouter IDs must be unique.
  • Known neighbors: When routers see each other in a neighbors router, they know that they are known.

Exchange Information

  • Designated routers / backup routers are used to reduce flooding traffic on networks like Ethernet. Neighbor relationships are with the DR.
  • DR is based on high priority (configurable, default 1) or highest router ID.
  • Routers ignore updates unless they come from DR
  • Routers flood LSAs / DBD
  • Routers look at LSAs/DBD and request information it does not already have.
  • Link state request (LSR) is sent out, an responded to with a link state update (LSU)
  • Then LSAcks are exchanged
  • Full neighbor state: LSUs exchanged.

Choose best route

  • SPF: Shortest path first “algorithm”
  • Cost: reference bandwidth (default 100,000 Kbps) / interface bandwidth
  • Shortest path: lowest aggregate cost of all links in the different paths/routes
  • CSPF: Constrained shortest path first uses metrics other than standard OSPF costs

Multi-Area OSPF

A single OSPF Autonomous System can be organized as multiple areas, for management / scaling purposes.

For a large number of routers in a single area:

  • Link state data base of each router becomes large. Much of the information may not be relevant to each router.
  • Routing table becomes large
  • Number of updates becomes large, across the entire network
  • Each router will have to run SPF each time an update is set

For the above reasons, OSPF supports multiple areas.

  • Area: group of routers
  • Number of routers per area: rule of thumb is less than 50, but no hard number
  • Area 0: Backbone Area. Every other area must join to the backbone area.
  • Need to plan address usage in order to benefit from areas: for example different areas sticking to different address rranges.
  • Summarization, instead of advertizing each subnet, summarize all the routers using a summaization, the prefix covering all the subnets. This is why addrerss planning is so important.
  • Area Border routers (ABRs): connect to more than one aera.
  • Autonomous System Boundary Router (ASBR): Connect to non-OSPF routing protocols, BGP, EIGRRP,…