Use it on routers with redundant control processors for hitless switchovers and upgrades — and understand it when a failed router kept attracting traffic for minutes.
BGP Graceful Restart Reference
Graceful restart lets a router's BGP process restart without its neighbours withdrawing its routes. For a limited time the neighbours keep forwarding to it, on the assumption that it still passes traffic.
1. show ip bgp neighbors <ip> | include Graceful — negotiated on this session?
2. Not → it was enabled after the session came up; reset the session in a window.
3. During a restart: routes stale, forwarding continues?
4. After: stale flags cleared?
5. Fast failover wanted instead → helper mode only, or BFD.
capability advertised by both → session drops for a restart → helper marks routes stale and keeps forwarding → session returns within the restart time → routes resent, End-of-RIB → stale entries replaced or removed
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip bgp neighbors 192.0.2.2 | include Graceful|restart|staleVerification & 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.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational verification Verify boundary
show ip bgp neighbors 192.0.2.2 | include Graceful|restart|stale
show ip bgp neighbors 192.0.2.2 | section capabilities
show ip bgp 203.0.113.0/24
The neighbour output states whether graceful restart is enabled and the restart and stale-path times, and under capabilities whether it was advertised and received, and for which address families forwarding state is preserved. During a restart, prefixes learned from the neighbour are flagged S (stale) in the BGP table.
Known-good: the capability is advertised and received on both sides; in a planned restart, the routes turn stale, forwarding continues, and the stale flags clear once the session is back.
Step 2 Failure isolation workflow Narrow the fault
- A planned restart still caused an outage. The capability was not negotiated — it was enabled after the session came up and the session was never reset — or only one side has it.
- Traffic was lost for two minutes when a router failed. Neighbours acted as helpers for a router that was not forwarding; the restart time is how long they waited.
- Stale routes disappeared before the router was back. The restart took longer than the restart time.
- Routes remain flagged stale. The restarting router never sent End-of-RIB for that address family.
- Graceful restart is enabled but a switchover is not hitless. The platform does not preserve forwarding state, or stateful switchover is not configured.
- BFD and graceful restart work against each other. BFD reports the failure immediately while graceful restart tells the neighbour to wait; decide which behaviour is wanted per neighbour.
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.
It only helps if the restarting router really keeps forwarding. If it has failed outright, neighbours send traffic to it until the restart time (120 seconds by default) runs out. It is negotiated in the OPEN, so enabling it needs a session reset. It pulls against BFD's fast failover.
show ip bgp neighbors <ip> | include Graceful|restart|stale— enabled, restart and stale-path times.show ip bgp neighbors <ip> | section capabilities— advertised and received, per address family.show ip bgp <prefix>— routes flaggedS(stale) during a restart.
ReferenceWhat it is1 section · depth on demand
Mechanics & mental model
Graceful restart lets a router's BGP process restart — for a software upgrade or a switchover to a redundant control processor — without its neighbours withdrawing its routes. For a limited time the neighbours go on forwarding as before, on the assumption that the restarting router is still passing traffic.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
Without it, every BGP restart is a full outage of the routes through that router: neighbours remove them, traffic shifts or drops, and everything is relearned afterwards. Graceful restart avoids that — but only if the router really keeps forwarding while its control plane is down. Where it does not, the same feature keeps traffic flowing into a black hole.
ReferenceHow it works1 section · depth on demand
How it works
Two roles.
- The restarting router must be able to keep forwarding packets from its existing forwarding table while BGP is down. That requires hardware with a separate forwarding plane and stateful switchover.
- The helper is the neighbour. It needs no special hardware — only to keep using the restarting router's routes for a while after the session drops.
Negotiation. Both announce the graceful restart capability in their OPEN messages, with a restart time and, per address family, whether forwarding state is preserved. Since this happens in the OPEN, enabling the feature takes effect only when the session is next established.
router bgp 65001
bgp graceful-restart
What happens during a restart.
1. The session to the restarting router goes down.
2. The helper does not remove the routes. It marks them as stale and continues to forward traffic to the restarting router.
3. The restarting router comes back and re-establishes the session within the restart time (120 seconds by default).
4. Both send their routes again, ending with an End-of-RIB marker.
5. The helper replaces stale routes with the fresh ones and deletes any that were not sent again.
If the session is not back within the restart time, or the routes are not refreshed within the stale-path time (360 seconds by default), the helper removes the stale routes and reconverges normally.
The trade-off. During the restart window the helper cannot tell a planned control-plane restart from a complete failure of the router. In the second case traffic is sent to a dead router for up to the restart time. Networks that rely on fast failover to an alternate path — with BFD, for example — must weigh this, and often run routers without redundant control processors as helpers only.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Graceful restart lets a router restart its BGP process while traffic keeps flowing on its preserved forwarding table, for example during a supervisor switchover. RFC 4724 defines the mechanism. The capability (code 64) carries a Restart State bit, a 12-bit Restart Time in seconds, and a Forwarding State (F) bit per address family, which says whether forwarding state was kept. When the session drops, the receiving peer (the helper) keeps the restarting router's routes, marks them stale, and keeps forwarding on them.
What each side does (RFC 4724)
| Restarting router | Helper (peer) |
|---|---|
| Keeps forwarding with its preserved FIB, routes marked stale | Keeps the peer's routes, marked stale |
| Re-establishes the session with the R bit set | Waits up to the advertised Restart Time for the session |
| Defers best-path selection until End-of-RIB arrives from peers, or the selection deferral timer expires | Deletes stale routes for families whose F bit is missing in the new OPEN |
| After selection, removes stale routes and sends End-of-RIB | Removes remaining stale routes on End-of-RIB |
End-of-RIB marker
For IPv4 unicast it is an UPDATE of minimum length, with no withdrawals and no NLRI. For other address families it is an UPDATE containing only an empty MP_UNREACH_NLRI.
R1(config)# router bgp 65010
R1(config-router)# bgp graceful-restart
R1(config-router)# bgp graceful-restart restart-time 120
R1(config-router)# bgp graceful-restart stalepath-time 360
R1# show bgp ipv4 unicast neighbors 10.255.0.2 | include Graceful|Restart|stale|End-of-RIB
Graceful Restart Capability: advertised and received
Remote Restart timer is 120 seconds
Address families advertised by peer:
IPv4 Unicast (was preserved)
R1# show bgp ipv4 unicast | include ^S
(was preserved) is the F bit. Routes marked S in the table are the stale routes kept during a peer's restart.
Caveats (RFC 4724)
| Caveat | Consequence |
|---|---|
| Not all peers support graceful restart | Transient loops or black holes are possible |
| The router failed rather than restarted | Helpers keep forwarding into a dead router until the Restart Time expires |
| Interaction with BFD | Fast failure detection can conflict with graceful restart; use platforms that support both correctly |
Use graceful restart on routers with redundant control planes. On single-supervisor routers, fast failure detection is usually more valuable.
Documented example, not captured output.
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 Network & Protocols → BGP Graceful Restart Reference. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4271.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.