Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityAdvanced

Advanced OSPF: throttling, stub router, graceful restart, fast reroute and OSPFv3

In short: Large OSPF networks need more than the basics. Throttling paces SPF runs and new LSAs during instability, stub router and graceful shutdown move traffic away before maintenance, graceful restart keeps forwarding during a control-plane restart, LFA fast reroute pre-computes backup paths, and OSPFv3 carries IPv6 and IPv4 address families.

Controlling how fast OSPF reacts

OSPF wants to react quickly to change, but a flapping link can make it react too often. Two throttling features use an exponential back-off: the first event is handled almost at once, and if more events follow, the wait grows up to a maximum.

  • SPF throttling paces how often SPF runs: timers throttle spf 50 200 5000 (initial delay, hold time and maximum wait in milliseconds).
  • LSA throttling paces how often a router regenerates the same LSA: timers throttle lsa 0 20 5000. A matching timers lsa arrival value stops a router accepting copies of one LSA too quickly.
  • Incremental SPF (ispf) recalculates only the part of the tree affected by a change. It helps most in large areas with many leaf networks.
Advanced OSPF featuresStable, fast OSPFfor large networksSPF throttlingpace recalculationsLSA throttlingpace new LSAsStub routermax-metricGraceful restartkeep forwardingLFA fast reroutebackup pre-computedPrefix suppressionhide transit linksOSPFv3IPv6 and IPv4 AFsGraceful shutdownleave politely
Figure 1. Features that make OSPF converge faster, recover more gently and scale further. Most networks need only a few of them.

Planned work: stub router and graceful shutdown

Before you reload a core router you want traffic to move away first, not to fall into a hole while neighbours notice the router is gone. Stub router (max-metric router-lsa) makes the router advertise its transit links with the maximum cost, so others route around it while it still reaches its own networks. With on-startup it does the same for a set time after boot, giving BGP and other processes time to settle before the router attracts traffic.

Graceful shutdown (the shutdown command under the OSPF process, or ip ospf shutdown on an interface) flushes the router's LSAs and tells neighbours it is leaving, so they recalculate immediately instead of waiting for the dead timer.

router ospf 1
 max-metric router-lsa on-startup 300
 timers throttle spf 50 200 5000
 timers throttle lsa 0 20 5000

Unplanned events: graceful restart and fast reroute

Graceful restart, also called non-stop forwarding (NSF), helps routers with redundant supervisors or route processors. When the control plane restarts, the hardware keeps forwarding with its last known routes, and helpful neighbours keep the adjacency alive while the router resynchronises. The IETF version uses type 9 opaque LSAs to signal the restart. It only helps if the topology does not change during the restart.

Loop-free alternate (LFA) fast reroute pre-computes, for each prefix, a backup next hop that will not loop traffic back. When the primary link fails, the router switches to the backup in the data plane within tens of milliseconds, before OSPF has even finished recalculating. Remote LFA extends this to topologies, such as rings, where no direct neighbour qualifies, by tunnelling traffic (usually with MPLS) to a router further away that can deliver it safely.

Prefix suppression, OSPFv3 and route troubleshooting

Prefix suppression stops OSPF advertising the subnets of transit links between routers. Those addresses are rarely needed by users, so hiding them shrinks the routing table and makes the infrastructure harder to reach from outside. Loopbacks and passive interfaces are still advertised.

OSPFv3 was written for IPv6. It runs per link rather than per subnet, uses link-local addresses for neighbours, moves addressing information into new LSA types (link and intra-area prefix LSAs) and uses IPsec or an authentication trailer for security. With address families, a single OSPFv3 process can also carry IPv4 routes, so a dual-stack network can run one protocol for both.

router ospfv3 1
 address-family ipv6 unicast
 address-family ipv4 unicast
!
interface GigabitEthernet0/1
 ospfv3 1 ipv6 area 0
 ospfv3 1 ipv4 area 0

When a route is missing even though neighbours are Full, check in order: is the interface or network actually in OSPF and in the right area; is it passive but still advertised; is there a summary, filter-list or distribute-list in the path; is the area a stub that blocks that LSA type; is the router ID duplicated; and does the next hop resolve on the network type in use?

Real-world example: maintenance without complaints

An internet service provider in a mid-sized city used to reload its core routers at 2 a.m. and accept a few seconds of packet loss for night-shift customers. After adding max-metric router-lsa to its maintenance procedure, engineers now set the router to stub mode, wait until monitoring shows traffic has moved to the other core router, then reload it. With on-startup configured, the router comes back with maximum metrics for five minutes while BGP converges. Combined with LFA fast reroute on the core ring for unplanned failures, the provider's monitoring now shows almost no loss during planned work.

Practice

What does max-metric router-lsa do?
It makes the router advertise its transit links with the maximum cost, so other routers stop sending transit traffic through it while it still reaches its own networks.
How does LFA fast reroute speed up recovery?
It pre-computes a loop-free backup next hop for each prefix and switches to it in the data plane immediately when the primary path fails.
Can OSPFv3 carry IPv4 routes?
Yes. With address families, one OSPFv3 process can carry both IPv6 and IPv4.

Key takeaways

  • SPF and LSA throttling use exponential back-off to stay stable during flapping.
  • Stub router (max-metric) and graceful shutdown move traffic away before maintenance.
  • Graceful restart keeps forwarding during a control-plane restart.
  • LFA and remote LFA fast reroute pre-compute backup paths for very fast recovery.
  • OSPFv3 supports IPv6 and, with address families, IPv4.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.