CIDR Route Summarization (Rust)
aggregate-cidr collapses IPv4 and IPv6 prefixes into their minimal covering
set, with optional SPF ip4: / ip6: input and output. No dependencies.
A Rust rewrite of nabbi/route-summarization (Perl), with that version's quirks fixed.
$ printf '10.0.0.0/24\n10.0.1.0/24\n2001:db8::1\n' | aggregate-cidr
10.0.0.0/23
2001:db8::1
To replace the Perl version in place, symlink it:
ln -sf /usr/local/bin/aggregate-cidr /usr/local/bin/aggregateCIDR.pl
(details and rollback).
Build
Requires Rust 1.85 or newer.
Docs
- Usage: options, input formats, output, library API
- Migrating from the Perl version: symlink switch-over, rollback, what changed
- Testing: fuzz harness and the differential test against Perl
- Deployment: installing, and replacing the Perl version
License
GPL-3.0-or-later. See LICENSE and NOTICE, which also covers attribution for the original concept. The Perl version remains MIT.