-
Notifications
You must be signed in to change notification settings - Fork 2
bgp adj rib in
Pre-Alpha. This page describes behavior that may change.
Per-peer Adj-RIB-In store with raw hex replay for forensic analysis and route server convergence.
Storage.
plugin {
internal adj-rib-in { use bgp-adj-rib-in }
}
bgp {
peer upstream {
process adj-rib-in { receive [ update state ] }
}
}
receive [ update state ] captures every incoming UPDATE as raw bytes, plus the peer state transitions needed to know when a session is usable.
The plugin stores received UPDATEs as raw hex keyed by peer and prefix. Nothing is parsed or re-encoded on the way in: the cache is the wire bytes exactly as they arrived.
Two use cases:
-
Forensic replay. After an incident, dump the raw stored updates with
ze cli -c "rib routes received <peer>". The bytes are identical to what the peer sent, which is the ground truth for "did this peer actually send this route". -
Route server convergence. When a peer reconnects to a route server, the server replays the stored updates from every other peer.
bgp-adj-rib-inis what makes that replay possible.
The plugin also provides the validation gate for RPKI: when bgp-rpki is loaded, the adj-rib-in holds pending routes until validation returns.
The replay is driven by a resume cursor, not a bookmark. The caller passes the first sequence it still wants, and the plugin returns the last sequence it delivered, so the caller must resume from one past that. A delta replay whose cursor is fed straight back re-relays its boundary route on every iteration, which is what happened until the parameter and the return value were given distinct meanings.
Replay is bounded by the route server's peer-up cut, carried as presence plus value: supplying a maximum message id of zero bounds the replay at zero, and omitting it means unbounded. Zero is the ordinary value of that cut (the route server has seen no UPDATE yet), so treating it as "no cut" made the bound fail open and delivered every UPDATE on both rails.
When the route server claims the bgp-peer-up-replay role, bgp-adj-rib-in stands its own peer-up replay down. It learns that from the Stage-2 configure callback, which completes before any peer starts. Deriving it later raced session establishment, and both plugins replaying produced byte-identical duplicate UPDATEs.
Replay carries announcements only: a withdrawal deletes the entry, so nothing is left to replay. That is why a replayed announce arriving after a live withdrawal, before the cut existed, could resurrect a withdrawn route.
-
bgp-rpkiuses the plugin's validation gate to hold pending routes. -
bgp-rsreads from the plugin during the convergent replay on peer reconnect. -
bgp-ribreceives the validated updates for best-path selection.
main/internal/component/bgp/plugins/adj_rib_in/
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
- 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