monocle v1.3.0: Reconstruct BGP RIB State at Any Timestamp

· BGPKIT Team
monocle release

We are happy to announce the release of monocle v1.3.0, now available on GitHub and crates.io, also available on Homebrew via brew install monocle.

This release introduces a major new command, monocle rib, which reconstructs BGP Routing Information Base (RIB) state at arbitrary timestamps.

New Feature: monocle rib

Most BGP tools show you what happened during an update file. monocle rib shows you the routing table as it existed at any moment in time.

Given a target timestamp, the command:

  1. Finds the latest RIB dump at or before that time
  2. Downloads and replays all overlapping BGP update files up to the exact target timestamp
  3. Materializes the final route state per peer and prefix

The result is the reconstructed RIB — not raw BGP messages, but the actual route state.

Basic Usage

Reconstruct the RIB for a single timestamp and print to stdout:

monocle rib 2025-09-01T12:00:00Z -c route-views6

Write multiple snapshots to a single SQLite file:

monocle rib \
  2025-09-01T08:00:00Z \
  2025-09-01T12:00:00Z \
  --sqlite-path /tmp/rib-snapshots.sqlite3 \
  -c route-views6

Filtering

Apply filters at reconstruction time to narrow the result set:

# Only routes originated by AS13335 (Cloudflare)
monocle rib 2025-09-01T12:00:00Z -c route-views6 -o 13335

# Routes for a specific prefix, including more-specifics
monocle rib 2025-09-01T12:00:00Z -c route-views6 -p 2606:4700::/32 --include-sub

# Routes from full-feed peers only
monocle rib 2025-09-01T12:00:00Z -c route-views6 --full-feed-only

# Routes where AS path contains a specific ASN
monocle rib 2025-09-01T12:00:00Z -c route-views6 -a "13335"

Performance Notes

The rib command keeps the working RIB state in memory during reconstruction, avoiding SQLite lookups and writes on the hot path. The updates query window was tightened from +2 hours lookahead to the exact target timestamp, reducing update file downloads by roughly one third for typical requests.

Installation

cargo install monocle

Or download pre-built binaries for Linux (x86_64, aarch64) and macOS (universal) from the GitHub release page.