[59063] in North American Network Operators' Group

home help back first fref pref prev next nref lref last post

Re: anyone has netrange -> cidr conversion script to share?

daemon@ATHENA.MIT.EDU (Stephane Bortzmeyer)
Fri Jun 13 10:06:10 2003

Date: Fri, 13 Jun 2003 16:05:33 +0200
From: Stephane Bortzmeyer <bortzmeyer@gitoyen.net>
To: william@elan.net
Cc: nanog@nanog.org
In-Reply-To: <Pine.LNX.4.44.0306112308490.1874-100000@sokol.elan.net>
Errors-To: owner-nanog-outgoing@merit.edu


On Wed, Jun 11, 2003 at 11:12:54PM -0700,
 william@elan.net <william@elan.net> wrote 
 a message of 12 lines which said:

>  Does anyone here has a script (or perl procedure) for converting range 
> of ips (i.e. 10.0.0.0 - 10.0.2.255) into cidr (i.e. result would be 
> 10.0.0.0/23,10.0.2.0/24 from the example before). 

netmask (available as a Debian package or a FreeBSD port)

~ % netmask -c 10.0.0.0:10.0.2.255 
       10.0.0.0/23
       10.0.2.0/24


home help back first fref pref prev next nref lref last post