This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Author: Arjen Heidinga <dexter@beetjevreemd.nl> | |
# Licence: GPL | |
# A script that compresses/merges/consolidates a list of CIDR addresses. | |
# It will remove prefixes that are already contained in a 'supernet'. | |
# It will try to combine smaller subnets into a supernet (ie find both /24's of a /23) | |
# It will toss out prefixes that are larger than specified (nothing more specific than /24) |