-
Notifications
You must be signed in to change notification settings - Fork 2
mrt analysis
Pre-Alpha. This page describes behavior that may change.
Ze ships a standalone tool, ze-analyse, for processing real-world BGP data from the public route collectors (RIPE RIS, RouteViews). It reads MRT dump files and extracts the statistics that inform Ze's internal buffer sizing, caching strategies, and congestion handling. It is not a runtime component: it is the offline tool used to make design decisions about the runtime, and to sanity-check changes against real-world traffic.
If you are hunting a specific bug against an MRT capture, this is also the tool that feeds ze bgp decode through a pipe.
make analyseThis produces bin/ze-analyse. The target is independent from make ze, so you can build it without building the daemon.
ze-analyse download grabs MRT files from two public BGP collectors. Files land in test/internet/ (gitignored).
bin/ze-analyse download # Today's data at 00:00 UTC
bin/ze-analyse download 20260324 # Specific date
bin/ze-analyse download 20260324 1200 # Specific date and time
bin/ze-analyse download -o /tmp/mrt # Custom output directory| Source | Type | Interval | Size |
|---|---|---|---|
| RIPE RIS rrc00 (Amsterdam) | BGP4MP updates | 5 min | ~5 MB per file |
| RIPE RIS rrc00 | TABLE_DUMP_V2 RIB | Latest | ~400 MB |
| RouteViews route-views2 | BGP4MP updates | 15 min | ~2 MB per file |
| RouteViews route-views2 | TABLE_DUMP_V2 RIB | 2-hour intervals | ~100 MB |
RouteViews bz2 files are converted to gzip on download for Go stdlib compatibility.
Measures how many NLRIs each UPDATE carries and how many UPDATEs arrive per second. Separates traffic into setup (table dumps, convergence) and maintenance (steady-state churn) using per-source-peer burst detection.
bin/ze-analyse density test/internet/ripe-updates.*.gzOutput sections: NLRIs per UPDATE distribution (announced, withdrawn, total); UPDATEs per active second distribution; setup vs maintenance classification per source peer; per-peer maintenance rate distribution; channel-sizing recommendation with empirical P50, P95, and P99.
The output feeds the per-peer forward pool channel sizing. Results are documented in the in-tree Update Density Analysis.
Analyses attribute repetition across routes to guide caching decisions. Measures per-attribute cache hit rates, bundle deduplication effectiveness, and temporal locality (consecutive identical bundles).
bin/ze-analyse attributes test/internet/latest-bview.gz 2>/dev/null | jq .
bin/ze-analyse attributes test/internet/latest-bview.gz >/dev/null # summary onlyJSON on stdout, human summary on stderr, which is the combination you want for a run that writes the JSON to a file while you watch the summary scroll by.
Identifies per-ASN community defaults: communities that appear in nearly every route from a given ASN. Those defaults can be assumed present in a cache, encoding only exceptions to save wire bytes.
bin/ze-analyse communities test/internet/latest-bview.gz
bin/ze-analyse communities --threshold 0.90 --format json test/internet/latest-bview.gz
bin/ze-analyse communities --post-policy test/internet/latest-bview.gz| Flag | Default | Description |
|---|---|---|
--threshold |
0.95 |
Minimum frequency to be considered a default. |
--min-routes |
1000 |
Minimum routes from an ASN to generate defaults. |
--format |
yaml |
yaml or json. |
--post-policy |
off | Strip action communities to simulate a route server post-policy view. |
Counts how many path attributes each route carries, and produces a distribution table showing the typical attribute-set size.
bin/ze-analyse count-attrs test/internet/latest-bview.gzDumps MRT records as BGP UPDATE hex, one per line. Useful for piping into ze bgp decode or any other tool that takes hex UPDATEs on stdin.
bin/ze-analyse mrt-dump test/internet/ripe-updates.*.gz | head -5
bin/ze-analyse mrt-dump test/internet/latest-bview.gz | bin/ze bgp decode -ze-analyse handles two MRT record types from RFC 6396.
| Type | Content | Used by |
|---|---|---|
TABLE_DUMP_V2 |
RIB snapshots (one entry per route per peer). |
attributes, communities, count-attrs, mrt-dump. |
BGP4MP |
Live UPDATE messages with timestamps. |
density, attributes, communities, mrt-dump. |
Both .gz and .bz2 compressed files are supported.
- In-tree MRT analysis for the full version.
- Update Density Analysis for the empirical findings that inform forward pool channel sizing.
- Forward Congestion Pool architecture for the design that consumes these measurements.
Adapted from main/docs/guide/mrt-analysis.md.
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