Skip to content

fib kernel

Thomas Mangin edited this page May 30, 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 {
    internal fib-kernel { use fib-kernel }
}

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, up to 128 members), fib-kernel installs it as a kernel multi-path route. Full ECMP tuning (hash policy, per-flow vs per-packet) is not implemented.

Rich route programming. fib-kernel programs more than a plain destination and next-hop. Via netlink it supports route type (blackhole, unreachable, prohibit), route metric, target table (VRF / policy-based installation), MPLS labels (lwtunnel label push), and SRv6 SIDs (seg6). The fib-vpp backend programs the same selections into VPP via GoVPP with multi-path, route-type, metric, and table parity.

Metrics

Registered via ConfigureMetrics.

Metric Type Meaning
ze_fibkernel_routes_installed gauge Ze-installed kernel routes currently present.
ze_fibkernel_route_installs_total counter Routes successfully added to the kernel.
ze_fibkernel_route_updates_total counter Routes successfully replaced in the kernel.
ze_fibkernel_route_removals_total counter Routes successfully removed from the kernel.
ze_fibkernel_errors_total{operation} counter Backend operation failures, labelled by operation.

See plugin metrics.

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