A Rust library and CLI tool for historical BGP data analysis.
Similar to bgpreader, it streams BGP elements in chronological order from:
- Multiple RIPE RIS and RouteViews route collectors
- Arbitrary time ranges
- Both RIBs and updates
- High Performance: Built with Rust for maximum speed
- Robust Ecosystem: Uses BGPKIT parser and broker
- Streaming: Efficiently process BGP data on the fly without loading everything into memory
- Caching: Optional local file caching to avoid re-downloading archive data
Add bgpflux to your Cargo.toml or install the CLI tool:
cargo install bgpfluxStream updates from specific collectors
bgpflux \
--start "2010-09-01T00:00:00Z" \
--end "2010-09-01T01:00:00Z" \
--collectors route-views.wide,rrc04 \
--data-type updateStream RIB dumps
bgpflux \
--start "2010-09-01T00:00:00Z" \
--end "2010-09-01T01:00:00Z" \
--collectors route-views.wide,rrc04 \
--data-type ribStream both RIB and updates
bgpflux \
--start "2010-09-01T00:00:00Z" \
--end "2010-09-01T01:00:00Z" \
--collectors route-views.wide,rrc04 \
--data-type rib,updateCache archive files
bgpflux \
--start "2010-09-01T00:00:00Z" \
--end "2010-09-01T01:00:00Z" \
--collectors route-views.wide,rrc04 \
--data-type update \
--cache-dir cacheuse bgpflux::{BgpStream, BgpStreamConfig, DataType};
fn main() {
let config = BgpStreamConfig::new(
"2010-09-01T00:00:00Z",
"2010-09-01T01:00:00Z",
vec!["route-views.wide", "route-views.sydney"],
DataType::Update,
).unwrap();
let stream = BgpStream::new(config).build();
for elem in stream {
println!("{}", elem);
}
}- BgpStream: Main streaming interface that aggregates data from multiple collectors
- BgpStreamConfig: Configuration for time ranges, collectors, and data types
- BgpStreamElem: Represents a single BGP element with metadata
This project uses code adapted from:
- bgpkit-broker for timestamp parsing
- bgpkit-parser for BGP data parsing
- filter support
- live mode