13 min read

OSPF vs Static Routes for Multi Site Networks

Static routes are fine until the second path, the first dead neighbor, or the twelfth site. A practical guide to choosing OSPF or static routing per site, with configs, cost math, and a cutover procedure.

ByAndré Ribeiro· Founder, Obelinf
OSPF vs Static Routes for Multi Site Networks
OSPF vs Static Routes for Multi Site Networks · November 3, 2026
On this page

You can run a multi site network on static routes for years and never notice the cost. Then a second circuit arrives, a provider starts dropping packets without dropping the link, and the twelfth site needs a prefix that has to be reachable from every other site. The static table that was two lines per branch becomes a matrix that nobody wants to touch on a Friday afternoon.

The choice between OSPF and static routing is not a maturity test. It is a question about the shape of the network: how many paths exist between sites, how many prefixes have to be carried, how often the topology changes, and how much the team needs the network to discover a failure on its own. This guide works through those questions with real configurations, cost math, and a cutover procedure that can be reversed.

At a Glance: Static Routes vs OSPF vs iBGP

Static routes OSPF iBGP
Control plane None, entries are configured by hand Link state database and SPF Path vector with policy
Best fit Single path stub sites and simple hubs Any to any sites with multiple paths Internet edge and routing policy
Convergence Interface down, or a tracked object Hello and dead timers, or BFD BGP hold timer, or BFD
Path selection Fixed next hop and distance Interface cost Local preference, AS path, MED
Summarization Manual aggregate with a next hop Area range at an ABR Aggregate with policy
Failure visibility None beyond the tracked object Neighbor state and LSA changes Peer state and prefix counts
Operational load One line per prefix and next hop Areas, costs, and LSDB size Peers, filters, and policy
Main risk A blackhole nobody withdraws A poorly planned area or cost map A route leak or a filtered prefix

Start With the Shape of the Network

The first useful question is how many paths exist between any two sites. A branch with one circuit and one exit has no path decision to make, so a static default route toward the hub is both accurate and cheap. A site with two circuits, or two sites that need to reach each other without transiting the hub, has a path decision that changes when a link fails. That is the point where a routing protocol starts earning its keep.

The second question is how many prefixes each site carries. Static routing scales with the product of sites and prefixes because every remote prefix needs an entry somewhere. OSPF scales with the number of links and the size of the link state database, and a new prefix inside an existing area is learned without a configuration change on the remote routers.

The third question is how often the topology changes. A network that adds a site every two years can absorb a manual change. A network that adds a VLAN or a subnet every week cannot, because each addition becomes a ticket that touches every router that needs to reach it.

Where Static Routing Is the Right Answer

Static routing is underrated in the places where it fits. A branch office with one circuit, one firewall, and a single summary prefix toward the hub does not need an adjacency, a link state database, or an area. It needs two facts: this is the local subnet, and everything else goes to the hub. Static routes also make a deliberate exception visible in the configuration, which is useful when a prefix must follow a specific path for policy or testing.

On Cisco IOS, the hub side of a small hub and spoke network can be as short as this.

ip route 10.20.0.0 255.255.255.0 192.0.2.1
ip route 10.21.0.0 255.255.255.0 192.0.2.1
ip route 10.22.0.0 255.255.255.0 192.0.2.1

The weakness appears when the next hop is reachable at Layer 2 but no longer forwards traffic. A static route does not notice a provider outage that leaves the physical interface up. The fix is to track something that reflects the path, not just the link.

ip sla 10
 icmp-echo 10.20.0.1 source-interface GigabitEthernet0/0
 frequency 5
ip sla schedule 10 life forever start-time now
track 10 ip sla 10 reachability
ip route 10.20.0.0 255.255.255.0 192.0.2.1 250 track 10

The static route now carries administrative distance 250, which makes it conditional: it is installed only while the probe succeeds, and it loses to any route with a lower distance. When the probe fails, the tracked object goes down and the route is withdrawn. If a primary route already exists, the same pattern makes the tracked route a floating backup. The probe target should be beyond the circuit, not the local provider address, or you will track the wrong failure.

Use static routing when all of these are true: one path per site, a prefix count small enough to read, a change rate your team can handle, and no requirement to share paths between branches. If any of those is false, the next section is the reason.

Where Static Routing Breaks

The arithmetic is the first warning. If every site has four prefixes and every site needs a route to every other site, the number of static entries grows with the square of the site count. A hub and spoke design reduces this, because each spoke only needs a default and the hub holds one entry per remote prefix, but the hub then becomes both the forwarding bottleneck and the place where every change lands.

Sites Prefixes per site Full mesh static entries Hub entries in a hub and spoke
4 4 48 12
8 4 224 28
12 4 528 44
16 4 960 60

The second warning is failure behavior. A static route is a claim, not a measurement. When the circuit degrades but stays up, the route remains installed and traffic keeps flowing into a path that is dropping packets. A routing protocol at least has a neighbor that can time out, and with BFD it can detect a path failure in under a second. A static route needs a tracked probe to approximate the same behavior, and the probe has to be designed and maintained.

How a static route and an OSPF adjacency detect a path failure and choose a new next hop Static Interface or probemust fail first Route withdrawnif tracked Backup routedistance decides OSPF Hello or BFDtimes out Adjacency downLSA withdrawn SPF runsnew next hop No neighbor, no state. Topology is already known.

The third warning is change cost. Adding a VLAN to one site is a local change under OSPF. Under static routing it is a change on every router that needs to reach that VLAN, and the chance of missing one grows with every site. That is how networks end up with a static route that points to a subnet nobody has used since the last renumbering.

OSPF in One Page

OSPF is a link state protocol. Each router describes its own links in a Type 1 router LSA, floods that information within an area, and runs the shortest path first algorithm over the resulting database. The database is the same on every router in an area, which is why OSPF can converge without a central hub and why a failed link is visible to every router that was using it.

The cost of an interface is the reference bandwidth divided by the interface bandwidth, rounded up to an integer. The default reference is 100 Mbps, which makes every link at 100 Mbps or faster cost 1. That is the single most common OSPF design mistake in a modern network, because a 1G backup path and a 10G primary path look equal.

Interface Cost at 100 Mbps reference Cost at 100 Gbps reference
100 Mbps 1 1000
1 Gbps 1 100
10 Gbps 1 10
100 Gbps 1 1

Set the reference on every router to a value above your fastest link. If 400G is on the roadmap, use 400G or higher now, because changing it later changes every cost in the domain at once.

router ospf 1
 router-id 10.255.0.11
 auto-cost reference-bandwidth 100000
 passive-interface default
 no passive-interface GigabitEthernet0/0
 network 10.255.0.11 0.0.0.0 area 0
 network 192.0.2.0 0.0.0.3 area 0
!
interface GigabitEthernet0/0
 description WAN to site B
 ip ospf network point-to-point
 ip ospf cost 10
 ip ospf bfd

The passive-interface default line is deliberate. It stops OSPF from forming adjacencies on user facing interfaces, and then you opt in the WAN links one at a time. The point to point network type removes the DR election on a link that only ever has two routers.

Junos expresses the same design under the protocol hierarchy.

set protocols ospf reference-bandwidth 100g
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 metric 10
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 bfd-liveness-detection minimum-interval 300
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 bfd-liveness-detection multiplier 3

Verification is the part that separates a working adjacency from a configured one. Start with the neighbor table.

show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.255.0.12       0   FULL/  -        00:00:38    192.0.2.2       GigabitEthernet0/0

FULL is the state that matters. INIT or EXSTART points to a hello parameter mismatch or an MTU mismatch, not a routing problem. On Junos the equivalent is show ospf neighbor, and show ospf interface detail shows the timers and the interface cost.

If the cost is 1 on a 10G link, the reference bandwidth was never changed. That is visible in show ip ospf interface before it becomes a path selection incident.

Design the Areas Before You Enable OSPF

A single area works in a lab and becomes uncomfortable at scale. The practical design is one area per site, with the WAN core in area 0. Each site router that connects to both its local area and the backbone becomes an Area Border Router, and the ABR is where summarization happens.

The reason to split areas is not mystery. It keeps the link state database small at each site, contains the scope of an SPF run, and gives you a boundary where prefixes can be summarized. The reason not to overdo it is that every area needs at least one ABR, and a badly placed ABR can turn a simple failure into a partition.

Area 0 backbone connecting three site areas through Area Border Routers with summary ranges Area 0 WAN core and loopbacks ABR site A Area 10 range ABR site B Area 20 range ABR site C Area 30 range Area 10 10.20.0.0/16 Area 20 10.21.0.0/16 Area 30 10.22.0.0/16

On the ABR, an area range summarizes the intra area prefixes of the source area into a single Type 3 LSA. The command names the area the prefixes come from, not the area they are advertised into.

router ospf 1
 area 10 range 10.20.0.0 255.255.0.0
 area 20 range 10.21.0.0 255.255.0.0
 area 30 range 10.22.0.0 255.255.0.0

Junos uses the same logic with a prefix instead of a mask.

set protocols ospf area 0.0.0.10 area-range 10.20.0.0/16
set protocols ospf area 0.0.0.20 area-range 10.21.0.0/16
set protocols ospf area 0.0.0.30 area-range 10.22.0.0/16

The ABR installs a discard route to Null0 for the summary by default, which prevents a loop when traffic arrives for a subnet inside the range that no longer exists. Do not remove that behavior unless you have a specific reason and a plan for the traffic that would otherwise follow a default route back into the network.

Branch areas can also be stub or NSSA. A stub area blocks external LSAs and relies on a default route from the ABR, which is appropriate when the branch has no local redistribution. An NSSA allows local external prefixes to be carried as Type 7 LSAs while still blocking Type 5 from the rest of the domain. A totally stubby area goes further and blocks inter area prefixes as well, leaving the default.

Area type Cisco config What it blocks When to use
Normal default Nothing Sites that originate external prefixes
Stub area 10 stub Type 5 external LSAs Simple branch with no local redistribution
Totally stubby area 10 stub no-summary Type 3 and Type 5, except a default Small branch with few local prefixes
NSSA area 10 nssa Type 5, allows Type 7 Branch with a local firewall or redistributed prefix
Totally NSSA area 10 nssa no-summary Type 3 and Type 5, allows Type 7 Branch with local external routes and a small table

Make Failure Detection Faster Than the Circuit

OSPF timers are chosen for stability, not for sub second failover. The defaults are fine on a LAN and too slow on a WAN that can fail in milliseconds.

Network type Hello Dead
Broadcast 10 s 40 s
Point to point 10 s 40 s
NBMA 30 s 120 s
Point to multipoint 30 s 120 s

Lowering the hello interval works, but it costs CPU and it makes the adjacency sensitive to loss. A better answer on links that can drop traffic without dropping the interface is BFD, which sends small packets at a negotiated interval and tears down the adjacency when they stop.

bfd interval 300 min_rx 300 multiplier 3
!
interface GigabitEthernet0/0
 ip ospf bfd

That configuration detects a failure in roughly 900 ms, which is faster than most providers can reroute and fast enough to keep a voice call from noticing. The exact values should match what the platform and the circuit can support. Aggressive timers on a saturated link cause false positives, and a false positive is an outage you created.

Cisco also supports a minimal dead interval that derives the hello from the dead timer.

interface GigabitEthernet0/0
 ip ospf dead-interval minimal hello-multiplier 3

That produces a hello every 333 ms and a dead interval of one second. It is useful on a point to point link between two devices you control. It is a poor default on a shared or congested path, and BFD is usually the cleaner tool because it is independent of the routing protocol.

Do not forget SPF and LSA throttling. A flapping link can cause more CPU load than the failure itself.

router ospf 1
 timers throttle spf 50 200 5000
 timers throttle lsa all 0 100 5000

The exact numbers depend on the platform. The principle is that the first SPF run should be fast, the hold time should back off, and the maximum wait should prevent a permanent storm.

A Cutover You Can Back Out Of

Moving from static to OSPF is safe if you treat it as an overlay first. The static routes keep winning on administrative distance while you prove the OSPF topology is correct, and you remove them only after the routing table agrees.

  1. Record every static route, its next hop, and the site prefix it serves. This is the baseline you will compare against.
  2. Assign a router ID per router, usually a loopback address, and decide area membership before any configuration is applied.
  3. Enable OSPF on the WAN interfaces only. Leave user facing interfaces passive so no adjacency forms where it should not.
  4. Set the reference bandwidth and interface costs on every router. Do this before the first adjacency comes up, or the first paths will be selected with the wrong costs.
  5. Confirm every neighbor reaches FULL and that the LSDB contains the expected number of routers and prefixes.
  6. Compare the OSPF route for each site prefix with the static route it will replace. They should point at the same next hop while both exist.
  7. Remove the static routes one site at a time, least critical first, and check the routing table, interface counters, and logs after each removal.
  8. Keep the static configuration in a rollback file. Restoring a static route is immediate because distance 1 beats OSPF distance 110.

The comparison is the step people skip. On Cisco, show ip route 10.20.0.0 255.255.0.0 tells you which protocol installed the route and which next hop it chose. While the static entry exists, the output says Known via "static", distance 1. After the static entry is removed, the same command should show ospf 1 with the expected metric and next hop. If it shows a different next hop, stop and find out why before you remove the next site. On Junos, show route 10.20.0.0/16 and show route protocol ospf give the same evidence. The route preference values differ from Cisco, so read the output rather than assuming a number.

Record the Routing Plan

The configuration is not the plan. The plan is the set of decisions that explain why the configuration looks the way it does: which router is the ABR for each area, which circuit sets each cost, which prefixes are summarized, and which static routes are deliberate exceptions.

The circuit inventory is the input to the cost table. If the inventory says a circuit is 1 Gbps and the OSPF cost assumes 10 Gbps, the routing plan and the physical network have already diverged. Pull the circuit list and compare it with the interface costs.

curl --fail --silent --show-error -H "Authorization: Bearer ${OBELINF_API_KEY}" \
  "https://api.obelinf.com/${OBELINF_ORG}/circuits?all=true" \
  | jq -r '.circuits[] | [.name, (.site_a_name // ""), (.site_b_name // ""), (.bandwidth // 0)] | @tsv'
wan-nyc-dc1	NYC	DC1	1000
wan-nyc-dc1-backup	NYC	DC1	500
wan-dc1-lon	DC1	LON	10000

The bandwidth field is in Mbps. A 1 Gbps circuit appears as 1000, so the same number can be compared with the interface bandwidth used in the cost calculation without a unit conversion. Record the OSPF cost next to the circuit and the mismatch becomes visible in one row.

Obelinf keeps sites, circuits, and device records in the same inventory, which makes it easier to review the area map and the cost table together. The multi site network use case describes how those records fit into a site by site operating model.

The practical next step is small. Pick one site, export its static routes, and build the OSPF configuration without removing anything. Compare the two routing tables for a week. If they agree, you have a cutover plan. If they do not, you have found the prefix nobody documented, which is exactly the problem the exercise was meant to surface.

Frequently Asked Questions

When should a multi site network use static routes instead of OSPF?
Use static routes when each site has one path, a small number of prefixes, and changes are rare. A branch with a single circuit and a default route toward the hub is easier to read and troubleshoot as two static lines than as an OSPF adjacency. Reach for OSPF when sites have more than one path, when traffic must flow between branches without crossing a hub, or when prefixes are added often enough that manual route entries become a change management problem.
Does OSPF work over MPLS and internet VPN circuits?
Yes, with the right network type. A point to point tunnel or pseudowire should be configured as an OSPF point to point interface so no DR election is needed and both ends form an adjacency directly. Internet VPNs that cannot carry multicast need a point to multipoint or NBMA design, or a tunnel that carries the OSPF multicast group. Tune hello and dead timers to the circuit, and add BFD when the provider can drop the path without dropping the physical interface.
Why do a 1 Gbps and a 10 Gbps link have the same OSPF cost?
OSPF divides the reference bandwidth by the interface bandwidth and rounds up to an integer. The default reference is 100 Mbps, so every link at 100 Mbps or faster gets a cost of 1. Set the reference bandwidth on every router to a value above your fastest link, for example 100 Gbps, and the costs become 100 for 1G, 10 for 10G, and 1 for 100G. The value must match across the OSPF domain or path selection becomes inconsistent.
What is the difference between an OSPF area range and a static summary route?
An area range is configured on an Area Border Router and summarizes the intra area prefixes of the source area into a single Type 3 LSA. The ABR also installs a discard route to Null0 by default so traffic for a missing subnet inside the summary is dropped instead of looped. A static summary route only points at a next hop, so it can blackhole traffic when the component routes disappear and nothing withdraws the summary.
Can I run OSPF and static routes on the same router?
Yes, and most migrations depend on it. A static route has an administrative distance of 1 and OSPF has 110, so the static route wins while it exists. That lets you build the OSPF adjacency, verify the routes in the link state database, and then remove the static entries one at a time. A floating static with distance 250 can also serve as a backup when the OSPF route disappears.
How do I migrate from static routes to OSPF without an outage?
Enable OSPF on the WAN interfaces first, leave the LAN interfaces passive, and confirm every neighbor reaches FULL. Compare the OSPF route for each site prefix against the static route before you change anything. Then remove the static routes one site at a time, starting with the least critical, and watch the routing table, interface counters, and logs after each removal. Rollback is fast because restoring the static route immediately wins on administrative distance.
How should I document an OSPF routing plan?
Record the router ID, area membership, WAN circuit, interface cost, summary range, and every deliberate static exception in one place. The circuit bandwidth is the input to the cost calculation, so the routing plan and the circuit inventory should be reviewed together. Obelinf keeps sites, circuits, and device records in the same inventory, which makes the area map and the cost table easier to keep aligned as sites are added.

Stop reaching for a spreadsheet

Obelinf keeps every subnet, device, circuit, and rack in one live source of truth, with audit logs and a topology view. Free for personal use.

Related Articles