BGP Resilience
BGP resilience is a set of separate mechanisms. Route Refresh reapplies policy without dropping the session. Graceful Restart retains forwarding during a restart. The RIB keeps eligible sent history in process memory for peer reconnects. Route reflection distributes iBGP routes without a full mesh. Use only the mechanisms the topology requires.
Route Refresh
When both peers negotiate Route Refresh, request a new advertisement without tearing down TCP:
ze cli -c "request peer transit-a refresh ipv4/unicast"
ze cli -c "request peer transit-a clear soft"
Enhanced Route Refresh adds Begin-of-RR and End-of-RR markers so stale routes can be removed after the replacement stream completes. Verify the negotiated capability with show bgp peer transit-a capabilities before relying on it.
Graceful Restart
Graceful Restart requires the bgp-gr and bgp-rib plugins. The restarting speaker advertises the capability, while the receiving speaker retains stale routes until End-of-RIB or timer expiry.
plugin {
internal rib {
use bgp-rib
}
internal gr {
use bgp-gr
}
}
bgp {
peer upstream1 {
session {
capability {
graceful-restart {
restart-time 120
long-lived-stale-time 3600
}
}
}
attach process gr {
receive [ open-received state eor ]
send [ update ]
}
attach process rib {
receive [ update state refresh ]
send [ update ]
}
}
}
Long-Lived Graceful Restart extends the stale period and deprioritises stale routes. It is active only when both peers negotiate it. Routes carrying NO_LLGR are removed rather than retained.
Load bgp-gr with internal <name> { use bgp-gr }, as the example above does, or in a child process with run "ze plugin bgp-gr": the RFC 9494 egress filter and the retention verdict the route reflector reads both run over the plugin connection, so either placement behaves the same.
See Graceful Restart for timers, stale levels, communities, and failure handling.
Restarting Ze
Use the restart path when peers should see a planned Graceful Restart:
ze signal restart
A normal stop does not claim that forwarding state will survive:
ze signal stop
After restart, confirm that peers negotiated GR, stale routes were retained only for the intended families, fresh routes replaced them, and no stale entries remain after End-of-RIB.
RIB reconnect replay
The mandatory bgp-rib plugin keeps sent history in process memory across peer
disconnects. BGP loads it automatically, but replay still requires peer
bindings that deliver received and sent UPDATEs, state and refresh events,
and permit UPDATE sends. Source peers must feed received UPDATEs and state to
the same RIB. The RIB restores only eligible history: source incarnation,
received path and revision, native NLRI identity, and the captured Initial
replay session must remain valid. It does not overwrite a route already
accepted on the new session.
This is not durable storage across daemon or RIB plugin restarts. Config-static
routes come from the current configuration instead of old sent history.
Operators migrating from the removed bgp-persist plugin must remove its
instance and replace its peer bindings with RIB bindings; there is no config
alias. See migration instructions.
Use show bgp rib status, the peer RIB commands, warnings, and the receiving
peer's routes to inspect replay results. A session-ready report means replay
attempts finished, not that every historical route was delivered.
Route reflection
Route reflection replaces an iBGP full mesh with client and non-client relationships. Ze applies ORIGINATOR_ID and CLUSTER_LIST loop protection and retains ordinary import and export policy per destination.
Design points:
- Give each reflector a stable router ID and cluster identity.
- Mark clients explicitly.
- Use at least two reflectors for a production cluster.
- Keep client export policy separate from eBGP policy.
- Verify that a route learned from one client reaches other clients and eligible non-clients, but does not return to its originator.
For a task-oriented example, see the FlowSpec route-reflector guide. The same reflection topology applies to other negotiated families, subject to their plugin support.
ADD-PATH and multipath
ADD-PATH advertises more than one path for a prefix. Multipath installs equal-cost next hops in the local RIB and FIB. These are independent:
- ADD-PATH changes what paths cross a BGP session.
- Multipath changes what equal candidates are installed locally.
Verify send and receive modes, path identifiers, best-path state, and installed ECMP next hops separately. See ADD-PATH and the BGP protocol page for current support.
Failure checklist
During a maintenance test:
- Record peer state and RIB counts.
- Trigger the intended refresh, session restart, or process restart.
- Watch peer state and recent events.
- Confirm forwarding remains valid where GR or LLGR promises it.
- Confirm stale routes disappear after refresh completion or timer expiry.
- Confirm every peer receives one coherent replacement stream.
- Check
show warnings,show errors, andshow health.