Use it when OSPF picks a slower path, converges slowly, forms unnecessary adjacencies, or when standardising OSPF settings.
OSPF Tuning & Optimization
OSPF tuning adjusts cost (reference bandwidth or per-interface cost), timers, passive interfaces, network type and default-route origination to control path choice, convergence and overhead.
1. show ip route <prefix> — which next hop and total cost?
2. Expected path costs more? Add up the costs hop by hop (show ip ospf interface brief).
3. Fast links costing 1 → raise the reference bandwidth on all routers.
4. Or set ip ospf cost on the interfaces concerned.
5. Check the route again.
reference bandwidth the same on all routers → interface costs reflect speed or intent → SPF sums cost along each path → lowest total installed → equal totals shared
Traffic prefers a slower link, or routers in the same area pick different paths for the same destination.
Possible stored cause: auto-cost reference-bandwidth differs between routers, or the default (100 Mbps) makes all fast links cost 1.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Traffic prefers a slower link, or routers in the same area pick different paths for the same destination.
Step 1 Verification & evidence Verify boundary
show ip ospf interface; show ip protocols; compare cost/reference bandwidth and passive-interface state.
Step 2 Layered verification Verify boundary
Step 3 Common failure modes Narrow the fault
Inconsistent reference bandwidth, wrong manual cost, passive transit interface or overly aggressive timers.
Step 4 Troubleshooting workflow Narrow the fault
Focus for this topic: Inconsistent reference bandwidth, wrong manual cost, passive transit interface or overly aggressive timers.
Step 5 Common mistakes Narrow the fault
- Tuning timers aggressively without BFD.
- Different reference bandwidth on routers in one domain.
Step 6 Evidence-first troubleshooting Narrow the fault
Evaluate a design by tracing normal and failed paths: which component owns gateway/routing/policy, what state converges, which dependency becomes unavailable and what evidence confirms recovery. Redundancy without independent failure domains can create only apparent resilience.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Default reference bandwidth is 100 Mb/s, so 100M, 1G and 10G links all cost 1 — set auto-cost reference-bandwidth 100000 (or higher) on every router. Use passive-interface default and enable only links to neighbours. Point-to-point network type on Ethernet links removes DR/BDR election. Use BFD rather than very short hello timers.
show ip ospf interface brief— cost per interface.show ip route <prefix>— total cost in brackets[110/cost].show ip ospf | include Reference— reference bandwidth.show running-config | include auto-cost|ip ospf cost— what is configured.
ReferenceWhat it is1 section · depth on demand
Concept overview
Reference bandwidth, interface cost, timers, passive interfaces and design choices influencing path/convergence.
Key ideas: OSPF path cost is additive. Consistent reference-bandwidth and deliberate interface cost let the topology express preferred paths; passive interfaces suppress unnecessary neighbor formation.
ReferenceWhy it matters1 section · depth on demand
Why it matters
OSPF path cost is additive. Consistent reference-bandwidth and deliberate interface cost let the topology express preferred paths; passive interfaces suppress unnecessary neighbor formation.
ReferenceHow it works2 sections · depth on demand
How it works
OSPF progresses through distinct evidence layers: interfaces participate in an area, neighbors exchange Hellos, compatible peers form adjacencies, LSAs synchronize into the LSDB, SPF calculates candidate paths, and selected routes may enter the RIB. Forwarding still depends on next-hop/FIB resolution.
Mechanism, scope & boundaries
Enterprise architecture balances failure domains, convergence, scale, operational simplicity and policy boundaries. Hierarchy and redundancy are useful only when control-plane and data-plane behavior during failure is understood.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Reference bandwidth — worked numbers
OSPF cost = reference bandwidth / interface bandwidth, minimum 1. The IOS default reference is 100 Mbit/s:
| Interface | Default cost | With auto-cost reference-bandwidth 100000 |
|---|---|---|
| 100 Mbit/s | 1 | 1000 |
| 1 Gbit/s | 1 | 100 |
| 10 Gbit/s | 1 | 10 |
| 100 Gbit/s | 1 | 1 |
With the default, 1G and 10G look equal. The reference must be identical on every router in the domain, or path costs become asymmetric. Manual ip ospf cost on an interface overrides the calculation.
Faster failure detection without fragile timers
| Method | Configuration | Detection |
|---|---|---|
| Default (broadcast) | hello 10 s, dead 40 s | Up to 40 s |
| Sub-second hellos | ip ospf dead-interval minimal hello-multiplier 4 | ~1 s, but CPU-bound |
| BFD (preferred) | bfd interval 300 min_rx 300 multiplier 3 + ip ospf bfd | ~900 ms, often hardware-assisted |
Hello and dead intervals must match on both neighbours; BFD timers are negotiated.
Other tuning with real effect
| Knob | Command | Why |
|---|---|---|
| Point-to-point on Ethernet links | ip ospf network point-to-point | No DR/BDR election, no Type 2 LSA, faster adjacency |
| Passive by default | passive-interface default + no passive-interface Gi0/0/1 | No hellos on user ports |
| SPF throttling | timers throttle spf 50 200 5000 | Quick first SPF, back-off during instability |
| LSA throttling | timers throttle lsa 0 20 5000 | Limits LSA storms |
Verify
show ip ospf interface brief lists area, cost, state and neighbour count per interface — the fastest way to spot an inconsistent cost or a transit link that became passive. show ip ospf | include Reference shows the reference bandwidth in use.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Infrastructure → OSPF Tuning & Optimization. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc2328.html · confidence 94%Deep reference
Healthy vs suspicious evidence
How to read the evidence
Design & tradeoffs
ENCOR design tradeoffs
Tuning should reflect design intent; faster timers increase control-plane sensitivity and are not a substitute for resilient design.