Module 3.3 60 minIntermediate

OSPF in a single area

OSPF builds a complete topological map by exchanging Link State Advertisements. This chapter walks through neighbour formation, the router ID, the DR/BDR election on multi-access segments, and a complete single-area configuration.

Course plan — preview

What you'll learn

  • Configure OSPFv2 in a single area with the network and router-id commands.
  • Explain Hello/Dead timers and the conditions for adjacency.
  • Identify when DR/BDR is elected and when it is bypassed.

How OSPF builds adjacencies

OSPF routers exchange Hello packets every 10 seconds (every 30 on non-broadcast media). Two routers become neighbours after exchanging Hellos with matching area, hello/dead timers, authentication, subnet and stub-area flag. The MTU is not in the Hello: it is compared later, in the Database Description packets, so an MTU mismatch lets the neighbour appear and then stalls it in EXSTART or EXCHANGE. Once full, they share complete LSDBs and run Dijkstra to compute the best path to every prefix.

Router ID — the OSPF identity

Each router has a 32-bit Router ID, written as a dotted-decimal IP. Selection priority: explicit 'router-id', then the highest IP on an up/up loopback, then the highest IP on any other up/up interface. Only an up loopback counts — a loopback that is shut down is skipped entirely, however high its address, and the next candidate wins. The process never runs with 0.0.0.0: with no usable address it simply cannot pick an ID.

The Router ID is chosen when the OSPF process starts, and then it is sticky. Adding a higher loopback later, or typing a new 'router-id', changes nothing until the process restarts ('clear ip ospf process' or a reload). Always set Router ID explicitly with 'router-id' so renumbering interfaces does not change router identity.

15 more sections in this chapter, plus a 4-question quiz and a hands-on lab.

Course plan

Modules 2–8 are part of the Course & Lab Pass and All-Access Max — start with a free account

You can see the title, summary, learning objectives and the opening sections. The rest of this chapter, like all of modules 2–8, comes with the Course & Lab Pass and All-Access Max. A free account opens Module 1: How Networks Work end-to-end and saves your labs — start there, no card required.

  • Read every chapter in Module 1 — How Networks Work
  • Save labs of up to 5 devices
  • Save up to 3 topologies
  • See the full course syllabus + chapter titles

Free account · no card required · compare plans any time

Build it step by step