aggregate6 - a fast versatile prefix list compressor
job at ntt.net
Thu Nov 30 20:07:49 UTC 2017
I re-implemented the venerable 'aggregate' tool (by Joe Abley & co) in
python under the name of 'aggregate6'. The 'aggregate6' tool is faster
and also has IPv6 support.
Installation is can be done through 'pip', or your operating system's
package manager (if they carry the 'aggregate6' tool).
$ pip install aggregate6
$ echo 10.0.0.0/16 10.0.0.0/24 2000::/4 3000::/4 | aggregate6
Note that 'aggregate6' can also be imported as module in your own python
>>> import from aggregate6 import aggregate
>>> aggregate(["10.0.0.0/8", "10.0.0.0/24"])
Related to the above example, NTT uses 'aggregate6' as library in their
network automation toolchain to help compress firewall rules.
When using a dump from the IPv4 Default-Free Zone, it appears that
'aggregate6' can deaggregate that list ~ 50 times faster than
'aggregate'. However the tradeoff is that 'aggregate6' uses a bit more
Aggregate6 has been tested with pypy, python2 and python3; and can be
used both from the command line or as python module. Aggregate6 is
published under the 2-Clause BSD license.
More information about the NANOG