job / aggregate6 Goto Github PK
View Code? Open in Web Editor NEWIPv4 and IPv6 prefix aggregation tool
License: BSD 2-Clause "Simplified" License
IPv4 and IPv6 prefix aggregation tool
License: BSD 2-Clause "Simplified" License
In case you're taking feature requests, it would be useful to generate an aggregated prefix list but with some sub-prefixes removed:
Mock-up to explain what I mean:
$ echo 192.0.2.0/25 192.0.2.128/26 192.0.2.192/27 192.0.2.224/27 > prefixes.txt
$ echo 192.0.2.3/32 192.0.2.128/30 > exceptions.txt
$ aggregate6 -e exceptions.txt prefixes.txt
192.0.2.0/31
192.0.2.2/32
192.0.2.4/30
192.0.2.8/29
192.0.2.16/28
192.0.2.32/27
192.0.2.64/26
192.0.2.132/30
192.0.2.136/29
192.0.2.144/28
192.0.2.160/27
192.0.2.192/26
If on the other hand you're not taking feature requests, feel free to close this issue. In any case, thank you for this very useful tool!
$ echo 2620:0:1c00::/40 | aggregate6
Traceback (most recent call last):
File "/usr/local/bin/aggregate6", line 9, in
load_entry_point('aggregate6==0.7', 'console_scripts', 'aggregate6')()
File "/usr/local/lib/python2.7/dist-packages/aggregate6/cli.py", line 107, in main
prefix_obj = ip_network(prefix)
File "/usr/lib/python2.7/dist-packages/ipaddress.py", line 199, in ip_network
' a unicode object?' % address)
ipaddress.AddressValueError: '3236:3230:3a30:3a31:6330:303a:3a2f:3430/128' does not appear to be an IPv4 or IPv6 network. Did you pass in a bytes (str in Python 2) instead of a unicode object?
> sudo -H pip install aggregate6
Collecting aggregate6
Downloading aggregate6-0.6.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-JFgKf2/aggregate6/setup.py", line 52, in <module>
reqs = [str(ir.req) for ir in install_reqs]
File "/Library/Python/2.7/site-packages/pip/req/req_file.py", line 79, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-JFgKf2/aggregate6/
> pip --version
pip 8.1.1 from /Library/Python/2.7/site-packages (python 2.7)
This is on Mac OS X 10.11.3.
Do you see any chance to keep the Python 3.6 support until CentOS 7 reaches EOL at 2024-06-30?
Great tool. Very helpful. Can you explain what the -t option does? I have tried using it multiple times with and without it and it returns the same output. Just confused on what you mean by "truncate IP/mask to network/mask"?
thanks,
I'm grateful for the aggregate6 tool because Firewalld on EL8 (CentOS/RHEL) crashes when giving Ipsets containing overlapping CIDR ranges (see https://wiki.fysik.dtu.dk/it/Linux_firewall_configuration#using-ipsets-in-firewalld-on-rhel-centos-8).
Could you kindly add some extra Installation instructions for EL8, because the pip3 fails on a minimal EL8 system:
On EL8 systems you must first install some prerequisites:
$ dnf install gcc platform-python-devel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.