OSPF Neighbor Calculator
Count OSPF adjacencies on any network type and see how much DR/BDR election cuts against a full mesh.
About OSPF Neighbor Calculator
OSPF avoids an O(n²) flooding mesh on multi-access media by electing a DR that relays LSAs, with a BDR standing by. Every DROther forms a full adjacency only with those two, so state grows linearly rather than quadratically. The 2n − 3 figure is what makes a large broadcast segment survivable, and the hello/dead pair is the single biggest term in OSPF convergence — 40 seconds of detection dwarfs the milliseconds SPF takes.
Formulas
OSPF Neighbor
On a broadcast or NBMA segment with a DR and BDR the adjacency count is 2n − 3; without election it is the full mesh n(n − 1) ÷ 2.
- n
- Routers on the segment
- 2n − 3
- Each DROther peers with DR and BDR, plus the DR–BDR adjacency
- dead interval
- Time without a hello before the neighbour is declared down — 4 × hello by default
Neighbour failure detection
Failure detection takes up to the dead interval, which defaults to 4 × hello.
Worked example
With the default values below, OSPF Neighbor Calculator returns Full Adjacencies Formed of 21. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Routers on the segmentaccepts 1–500 routers
- 12 routers
- OSPF network typeone of Broadcast — DR/BDR elected, NBMA — DR/BDR elected, Point-to-point, Point-to-multipoint
- Broadcast — DR/BDR elected
- Hello intervalaccepts 1–300 s
- 10 s
- Dead intervalaccepts 1–1,200 s
- 40 s
Results
- Full Adjacencies Formed
- 21
- Adjacencies Without DR/BDR
- 66
- Reduction from DR/BDR Election
- 68.18%
- Hello Packets per Second
- 1.200 pps
- Dead-to-Hello Ratio
- 4.0
- Election Behaviour
- DR and BDR elected by highest priority then highest router ID; DROthers peer only with them
Step by step
- 1Values used
- 2OSPF Neighbor
- 3Neighbour failure detection
- 4Full Adjacencies Formed= 21
- 5Adjacencies Without DR/BDR= 66
- 6Reduction from DR/BDR Election= 68.18
- 7Hello Packets per Second= 1.200 pps
- 8Dead-to-Hello Ratio= 4.0
- 9Election Behaviour= DR and BDR elected by highest priority then highest router ID; DROthers peer only with them
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How is OSPF Neighbor calculated?
On a broadcast or NBMA segment with a DR and BDR the adjacency count is 2n − 3; without election it is the full mesh n(n − 1) ÷ 2. OSPF avoids an O(n²) flooding mesh on multi-access media by electing a DR that relays LSAs, with a BDR standing by. Every DROther forms a full adjacency only with those two, so state grows linearly rather than quadratically.
Why does OSPF Neighbor matter?
The 2n − 3 figure is what makes a large broadcast segment survivable, and the hello/dead pair is the single biggest term in OSPF convergence — 40 seconds of detection dwarfs the milliseconds SPF takes.
What values do I need to enter?
This calculator takes 4 inputs: Routers on the segment, OSPF network type, Hello interval, Dead interval. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Should I tune hellos down or use BFD?
Use BFD. Sub-second hellos raise control-plane load on every router and are vulnerable to CPU spikes; BFD runs a lightweight dedicated session, typically 300 ms × 3, and just tells OSPF the neighbour is gone.
