Aggregate a list of IP prefixes into their minimum equivalent representation
Go to file
2023-11-16 21:35:30 -08:00
.github/workflows Remove unnecessary archive formats from release CI 2023-11-16 21:35:29 -08:00
benches Add bench for small runs / startup time 2023-11-16 21:35:29 -08:00
doc Update bench results 2023-11-16 21:35:29 -08:00
src Specialize on truncate arg for ~5% speedup in truncate case 2023-11-16 21:33:59 -08:00
test-data Add benches and plot generation 2023-11-15 16:53:45 -08:00
tests tests: Test against aggregate6 output ordering behaviour 2023-11-15 16:53:31 -08:00
.gitignore Initial commit 2023-03-13 23:11:45 -07:00
Cargo.lock Add bench for small runs / startup time 2023-11-16 21:35:29 -08:00
Cargo.toml Add bench for small runs / startup time 2023-11-16 21:35:29 -08:00
LICENSE Add license 2023-03-18 22:06:46 -07:00
README.md Improve README 2023-11-16 21:35:30 -08:00

rs-aggregate

rs-aggregate will aggregate an unsorted list of IP prefixes

Intended to be a drop-in replacement for aggregate6 with better performance.

Takes a list of whitespace-separated IPs or IP networks and aggregates them to their minimal representation.

Installation

rs-aggregate is built statically. CI-built binaries can be found in the GitHub releases for most common platforms. Simply download the appropriate binary and place it in your path.

It can also be installed via some software management tools:

FreeBSD

pkg install rs-aggregate

Cargo

cargo install rs-aggregate

Known differences from aggregate6

  • -m/--max-prefixlen supports different maximums for each address family as ipv4,ipv6 format. A single value is also supported and has the same behaviour as aggregate6 (apply the same maximum to both address families).
  • -v verbose dump is not supported
  • Truncation errors (when host bits are set without the -t flag) are printed based on the parsed address, ie. always in CIDR format, whereas aggregate6 prints errors based on the input.

Performance

Performance comparison of rs-aggregate vs aggregate6. A speedup of >100x is achieved on DFZ data.

Full DFZ (1154968 total, 202729 aggregates):

dfz perf comparison

IPv4 DFZ (968520 total, 154061 aggregates):

ipv4 dfz perf comparison

1024 random prefixes (startup time):

startup time comparison