Skip to content
Thomas Mangin edited this page Apr 8, 2026 · 3 revisions

Pre-Alpha. This page describes behavior that may change.

Graceful Restart (RFC 4724) and Long-Lived Graceful Restart (RFC 9494) state machine.

Category

Resilience.

Configuration

plugin {
    external gr  { run "ze plugin bgp-gr";  encoder json; }
    external rib { run "ze plugin bgp-rib"; encoder json; }
}

bgp {
    peer upstream {
        capability {
            graceful-restart {
                restart-time          120;
                long-lived-stale-time 3600;
            }
        }
        process gr  { receive [ state eor ] }
        process rib { receive [ state ];  send [ update ] }
    }
}

Full reference on the Graceful Restart configuration page.

Behaviour

When a peer session drops, the plugin sends retain-routes to the RIB, which marks the routes stale. It starts a restart timer of restart-time seconds. When the peer reconnects, fresh routes replace the stale ones and purge-stale removes what did not come back. If the timer expires without a reconnect, every stale route is purged (with a 5-second safety margin).

When long-lived-stale-time is configured, the LLGR flow kicks in after the GR window expires. Stale routes get the LLGR_STALE community and stale level 2 (deprioritised in best-path selection). Routes with NO_LLGR are deleted on entry. The LLST timer is per family.

Interactions

  • Depends on bgp-rib for the stale route handling. The engine starts bgp-rib first.
  • bgp-persist combines with this plugin to provide persist-across-restart for binary upgrades.
  • The RIB has its own timeout as a fail-safe: stale routes are expired at restart-time + 5s even if the plugin never issues purge-stale.

Source

main/internal/component/bgp/plugins/gr/

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally