Merging CIDR lists

John Levine johnl at iecc.com
Thu Apr 7 17:24:19 UTC 2011


In article <alpine.BSF.2.00.1104071026040.41686 at wonkity.com> you write:
>Does anyone have a convenient way to merge a list of CIDR netblocks?

Using Net::CIDR or Net::CIDR::Lite, both of which are in the ports,
this script will do it:

----- snip -----
use Net::CIDR;

print join(' ',Net::CIDR::cidradd(@ARGV)) . "\n";
----- snip -----


More information about the freebsd-questions mailing list