Re: CIDR cleanup

2020-10-02 Thread Markus Weber (FvD)
On 02.10.2020 at 12:03 Job Snijders wrote: Marco Marzetti (PCCW) wrote an even faster compression tool! https://github.com/lamehost/aggregate-prefixes Both these python implementations are meant as replacements for ISC's vintage 'aggregate' Unix utility, with the notable difference that

Re: CIDR cleanup

2020-10-02 Thread Randy Bush
>> ok, i gotta ask. has someone tested to see if they all produce the >> same result givem the same input? i do not mean to imply they do >> not. i just have to wonder. > > Yes, of course. Marco and I collaborated on the tool's regression > testing. > > job@bench $ aggregate6 < dfz_ipv4

Re: CIDR cleanup

2020-10-02 Thread Job Snijders
On Fri, Oct 02, 2020 at 03:39:00AM -0700, Randy Bush wrote: > > Marco Marzetti (PCCW) wrote an even faster compression tool! > > https://github.com/lamehost/aggregate-prefixes > > > > Both these python implementations are meant as replacements for ISC's > > vintage 'aggregate' Unix utility, with

Re: CIDR cleanup

2020-10-02 Thread Randy Bush
> Marco Marzetti (PCCW) wrote an even faster compression tool! > https://github.com/lamehost/aggregate-prefixes > > Both these python implementations are meant as replacements for ISC's > vintage 'aggregate' Unix utility, with the notable difference that they > also support IPv6. ok, i gotta

Re: CIDR cleanup

2020-10-02 Thread Job Snijders
On Thu, Oct 01, 2020 at 02:15:01PM -0300, Marcos Manoni wrote: > Check https://github.com/job/aggregate6 (thank you, Job) Marco Marzetti (PCCW) wrote an even faster compression tool! https://github.com/lamehost/aggregate-prefixes Both these python implementations are meant as replacements

Re: CIDR cleanup

2020-10-01 Thread John Kristoff
On Thu, 1 Oct 2020 13:32:53 + John Von Essen wrote: > I tried to write my code to do this, and its not trivial, just > lookinh for a shortcurt. I did a breif glance at some CIDR related > Perl cpan modules, and nothing has jumped out. I wrote the code below some time ago. I've not used it

Re: CIDR cleanup

2020-10-01 Thread Marcos Manoni
Hi, Check https://github.com/job/aggregate6 (thank you, Job) El jue., 1 oct. 2020 a las 10:36, John Von Essen () escribió: > > Sorry if this is slightly off-topic, but I am writing some code for a custom > GeoDNS routemap. My starting data set is a raw list of /24 subnets, no prefix >

Re: CIDR cleanup

2020-10-01 Thread Charles Cloughly
Not Perl, though this may be useful depending on your environment: https://github.com/rus-cert/compress-cidr The examples are for IPv6, though I use it to consolidate lists of IPv4 in a variety of jobs/scripts without issue. YMMV. From: NANOG on behalf of John Von

Re: CIDR cleanup

2020-10-01 Thread Jon Meek
The Perl Net::Netmask module is also worth checking out. It may not be better at aggregation but it does have other functions that could be helpful. I use the shortest match address lookup functions of Net::Netmask very heavily and have reproduced them in a R / C++ package. Jon On Thu, Oct 1,

Re: CIDR cleanup

2020-10-01 Thread Tim Jackson
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use NetAddr::IP qw(Compact); my @ips = ( '105.170.72.0/24', '105.170.73.0/24', '105.170.74.0/24' ); my @agged = aggregate(\@ips); sub aggregate { my @naddr = map { NetAddr::IP->new($_) } @{$_[0]}; my @output =