-
Notifications
You must be signed in to change notification settings - Fork 3
sysrib
Pre-Alpha. This page describes behavior that may change.
Cross-protocol RIB selector. Takes per-protocol best-path selections and picks the winner by admin distance, then hands the result to the FIB programmer.
Infrastructure.
plugin {
internal sysrib { use sysrib }
}
Not bound to peers. sysrib sits between bgp-rib and fib-kernel in the FIB pipeline and subscribes to per-protocol selection events from the bus.
For each prefix, sysrib collects the best path from every source protocol and picks the one with the lowest admin distance. Ze only has BGP as a source today, so admin distance is not particularly interesting in practice.
Admin distances match the values every other routing daemon uses.
| Protocol | Admin distance |
|---|---|
| Static | 10 |
| eBGP | 20 |
| iBGP | 200 |
After admin-distance selection, sysrib runs two additional phases before publishing.
Recursive next-hop resolution. Next-hops that are not directly connected are resolved by walking the unified Loc-RIB by longest-prefix-match, up to a maximum depth of 8 levels, accumulating the IGP metric along the chain. The resolver tracks the dependents of each next-hop so that when a covering route changes (reachability or metric) every dependent prefix is re-evaluated by cascade. The accumulated metric feeds best-path step 7.
ECMP grouping. Protocol routes for a prefix that share the winner's effective priority and metric are collected into one nexthop group rather than emitting separate single-path events. A group holds up to 128 members. FIB backends receive one event per prefix carrying the full set of paths.
The plugin then publishes selection change events for fib-kernel, fib-vpp, or fib-p4 to install into the actual forwarding table.
A route carries a forwarding action beside its next-hop: unicast, blackhole, unreachable, or prohibit. The protocol RIB sets it, sysrib copies it onto the winning route, and it rides out on every emitted change, a replay included, so the FIB backend programs a discard rather than a next-hop.
The action takes no part in selection. Admin distance, priority and metric decide the winner exactly as before, so a route never wins for being a discard. It IS part of the change test: a prefix that becomes a discard with its next-hop, metric and labels unchanged is still emitted, because the FIB must hear about it.
An unset action means the producer stated nothing, and the backend installs an ordinary unicast route. Today the only producer is the BGP RIB honoring the RFC 7999 BLACKHOLE community for a peer that is configured and authorized for it.
| Command | Output |
|---|---|
show rib |
Cross-protocol selected routes: prefix, family, next-hop, protocol, priority, route-type, and ecmp-paths. |
show nexthop-table |
Resolver tracking table: per next-hop next-hop, resolved, direct-nh, igp-metric, and dependents. |
show ecmp-groups |
Active groups: prefix, family, and a paths array of next-hop / weight / labels. |
All return JSON.
route-type names the forwarding action by name (blackhole, unreachable, prohibit), not as the Linux RTN_ number the wire contract carries. The key is OMITTED for an ordinary route, so finding the discards in a table is a search for the key rather than a read of every value.
Registered via ConfigureMetrics.
| Metric | Type | Meaning |
|---|---|---|
ze_systemrib_routes_best |
gauge | Current system-wide best-route count. |
ze_systemrib_route_changes_total{action} |
counter | Best-path changes emitted, labelled by action. |
ze_systemrib_events_received_total |
counter | Protocol RIB events received. |
See plugin metrics.
- Consumes best-path change events from
bgp-rib. - Publishes selection events for
fib-kernelorfib-p4.
main/internal/component/sysrib/, with the forwarding-action vocabulary in main/internal/core/rib/routetype/.
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology