OSNTC.053: How BGP Graceful Restart Preserves Routes and When It Fails

Illustrative network technician inspecting a rack of switches and routers

A BGP session can disappear while a router continues forwarding packets. Graceful Restart (GR) allows a participating neighbor to temporarily retain routing information while the restarting speaker reconstructs its control-plane state. GR reduces routing churn but cannot guarantee uninterrupted service. Continue from OSNTC.052: BGP route-leak prevention.

Prerequisites

Understand IP prefixes, BGP neighbors, next hops and route selection. Review OSNTC.050 on BFD and OSNTC.051 on RPKI. Estimated study time: 35–50 minutes.

Learning objectives

  • Distinguish a control-plane restart from loss of data-plane forwarding.
  • Explain the restarting and receiving speakers, GR capability, Restart State and Forwarding State flags, and End-of-RIB marker.
  • Predict stale-route retention and removal from a hypothetical timeline.
  • Recognize blackhole risks, timer boundaries and the relationship to BFD.
  • Perform a read-only verification workflow and identify authorization, rollback and escalation requirements.

1. Control plane versus data plane

The control plane learns paths, selects routes and programs forwarding entries. The routing information base (RIB) contains routing information used for path selection; the forwarding information base (FIB) directs packets toward next hops. A BGP process restart can interrupt a TCP session while hardware forwarding entries remain installed. A power failure, disconnected link or failed forwarding ASIC is different: retaining an old route cannot make an unavailable path carry traffic.

Without GR, losing a session normally triggers removal of routes learned from the affected peer and alternative route selection. Re-establishment causes further updates. GR trades immediate removal for a bounded recovery opportunity, useful when forwarding continuity is credible.

2. Negotiation and architecture

RFC 4724 specifies Graceful Restart Capability code 64 in the BGP OPEN exchange. The restarting speaker recovers its BGP process; the receiving speaker, often called a helper, retains eligible paths learned from that peer. The capability includes a 12-bit Restart Time in seconds, restart flags and address-family entries with their own flags. IPv4 and IPv6 unicast are separate address families; negotiation for one does not imply coverage for another.

The Restart State (R) bit indicates that a speaker has restarted. The Forwarding State (F) bit is family-specific and signals preservation of forwarding state, subject to the configuration exception in RFC 4724. It is not a measurement of packet delivery. A helper initially retains routes based on earlier capability information and can subsequently remove them when the renewed session fails to confirm the required state.

3. Recovery and stale routes

  • Before interruption: peers exchange capabilities and establish BGP.
  • At session interruption: under base RFC 4724 procedures, the helper marks eligible paths stale and temporarily retains them; paths already stale from an earlier restart are removed.
  • At reconnection: the restarting speaker signals restart. If the appropriate address family or forwarding-state indication is absent, corresponding stale paths are removed.
  • During resynchronization: fresh UPDATE messages replace retained stale paths. For IPv4 unicast, End-of-RIB (EoR) is an empty UPDATE. Multiprotocol families use MP_UNREACH_NLRI identifying the family without withdrawn destinations.
  • At completion: EoR triggers removal of paths still stale in the relevant family. The restarting speaker also defers route selection while waiting for its peers, bounded by a separate selection-deferral timer.

If the session does not return within the previously advertised Restart Time, the helper removes the stale paths. An implementation may impose a separate upper bound on stale-route retention. Restart Time is not a guarantee of forwarding. RFC 8538 extends GR to certain NOTIFICATION events when support is negotiated; Hard Reset is excluded. RFC 9494 specifies a separate Long-Lived Graceful Restart extension.

4. Worked example: two prefixes, one missing

Assume a fictional neighbor advertises a 90-second Restart Time and two documentation prefixes, 192.0.2.0/24 and 198.51.100.0/24. At t=0 its BGP session terminates while forwarding is assumed viable. At t=25 seconds the session returns with appropriate GR and forwarding-state signaling. At t=30 the helper receives an advertisement for 192.0.2.0/24. At t=35 it receives EoR without a refreshed advertisement for 198.51.100.0/24.

The first route is refreshed at 30 seconds; the second is removed at 35 seconds, not 90. EoR indicates that the initial refresh has finished. If the session never reconnects, the 90-second Restart Time bounds the wait for re-establishment. An alternative route, if eligible and available, can be selected. All values are illustrative rather than measured results.

5. Blackholes, BFD and security

A blackhole occurs when traffic follows an installed route but cannot reach its destination. A helper may remove stale routes early if independent evidence establishes that the neighbor’s forwarding state is no longer viable. BFD offers rapid path-failure evidence, but its interaction with GR and control-plane independence depends on implementation and configuration. Consult platform documentation rather than assuming that every BFD event has identical consequences. Compare OSNEC.011 on OSPF fast reroute, which addresses alternate paths instead of stale BGP state.

GR is not routing authentication. It does not establish prefix-origin authority or validate an AS path’s propagation policy. Continue to apply RPKI, route filtering and leak prevention.

6. Read-only verification workflow

Use a paper worksheet or authorized isolated FRRouting lab. The following FRR 10.6 operational command is documented for displaying GR neighbor information. Replace the documentation address only with an authorized lab peer. The command syntax was checked against the documentation, not executed on a router.

show bgp ipv4 neighbors 192.0.2.1 graceful-restart
  • Record peer address, address family, local and remote capabilities, restart time and current session state.
  • Compare timestamps in authorized neighbor logs, routing snapshots, forwarding telemetry and any available EoR indication.
  • Distinguish control-plane recovery from confirmed data-plane reachability. Record missing evidence rather than declaring a route healthy based on a flag.
  • Escalate inconsistent forwarding, persistent stale routes or unexpected withdrawals to the routing owner with affected prefixes, family, timeline and change ticket.

Never restart a production routing process, change GR timers, disable BFD or modify route policy without owner authorization, impact analysis, change control, a rollback plan and post-change reachability verification. A rollback restores the previously approved configuration through the organization’s procedure. No production access or live failure injection is required.

Glossary

  • RIB: routing information base used for path selection.
  • FIB: forwarding information base used to direct packets.
  • Stale route: retained routing information awaiting refresh or removal.
  • EoR: End-of-RIB marker indicating completion of the initial update for an address family.
  • Blackhole: failure to deliver traffic along a selected path.

Practice exercises

  • A. A BGP process restarts but its forwarding ASIC remains operational. Explain why GR may reduce loss but cannot guarantee zero loss.
  • B. In the worked example, calculate when the unrefreshed route is removed. Repeat if the session never reconnects.
  • C. The session returns with the F flag clear for IPv6 unicast. What happens to IPv6 stale paths under the base mechanism?
  • D. Build a worksheet with four columns: timestamp, control-plane evidence, data-plane evidence and action. Add a case where forwarding evidence is missing.

Knowledge check

  • What distinguishes a RIB from a FIB?
  • How do the R and F flags differ?
  • Why can EoR trigger removal before a timer expires?
  • Does GR replace BFD or RPKI?
  • Which operations require change control and rollback planning?

Answer key

A: Retained paths can keep packets moving while forwarding remains valid; hardware or next-hop failures can still interrupt delivery. B: 35 seconds at EoR; 90 seconds if the session never returns. C: Remove stale routes for the affected family promptly. D: Mark forwarding unverified and escalate when service risk or inconsistent state warrants investigation.

Knowledge check: 1. RIB supports route selection; FIB directs packets. 2. R indicates restart; F indicates family-specific forwarding-state preservation. 3. EoR marks completion of the initial refresh, allowing remaining stale routes to be removed. 4. No; BFD supplies failure-detection evidence and RPKI validates origin authorization. 5. Production process restarts, timer changes, BFD changes and routing policy changes require authorization and rollback planning.

Primary references

We volunteer daily to ensure the credibility of the information on this platform is Verifiably True. If you would like to support to help further secure the integrity of our research initiative, please scan the QR code below.

BitcoinVersus.Tech research support QR code

Leave a Reply