Skip to content

fib kernel

Thomas Mangin edited this page Apr 8, 2026 · 5 revisions

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

Programs the Linux kernel forwarding table via netlink. The third stage of the FIB pipeline, after bgp-rib (per-protocol best-path) and sysrib (cross-protocol selection).

Category

Infrastructure.

Configuration

plugin {
    external fib-kernel { use fib-kernel; encoder json; }
}

fib-kernel is not bound to peers. It subscribes to sysrib selection events and installs routes in the kernel.

Behaviour

Every route installed by the plugin carries the protocol tag RTPROT_ZE=250 so Ze's routes are distinguishable from static routes, DHCP routes, and other daemons' routes. You can see them with ip route show proto 250.

Three operational behaviours worth knowing about:

Stale-mark-sweep on startup. When the plugin starts, it marks every existing RTPROT_ZE route in the kernel as stale, then sweeps any route that Ze has not re-programmed within a timeout. This is the crash recovery path: if Ze dies and restarts, the kernel routes Ze owned that BGP has not re-computed are cleared.

External change monitoring. fib-kernel subscribes to netlink multicast and detects when an external process (another daemon, a human with ip route) modifies a route owned by Ze. Depending on the policy, it re-asserts its own view or logs the external change.

Multi-path. When sysrib hands the plugin a multi-path entry (multiple equal-cost next hops for the same prefix), fib-kernel installs it as a kernel multi-path route. Full ECMP tuning (hash policy, per-flow vs per-packet) is not implemented.

Interactions

  • sysrib is the upstream source for every route installation.
  • bgp-rib feeds sysrib with best-path selections.
  • The Linux kernel's netlink multicast surface for external change detection.

Source

main/internal/plugins/fibkernel/

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally