Convert CDIR notation to IP range
Rick Stevens
rstevens at vitalstream.com
Wed Jul 28 22:47:10 UTC 2004
Sam Varshavchik wrote:
> John Nichel writes:
>
>> Hi,
>>
>> My binary skills are lacking, so does anyone know of a tool (online
>> or otherwise) to convert CDIR notation into the physical IP range? eg
>> convert 192.168.0.0/24 into 192.168.0.0 through 192.168.0.255 (so I
>> can see what the actual range is). TIA
>
>
> Get the perl Net::CIDR module from CPAN.
I know I'm late, but did you try the dread "ipcalc" program that comes
with Linux?. E.g.
[root at prophead root]# ipcalc -n 192.168.0.71/26
NETWORK=192.168.0.64
That's your first address (the network)
[root at prophead root]# ipcalc -b 192.168.0.71/26
BROADCAST=192.168.0.127
And that's the last address (the broadcast). So, 192.168.0.71/26
covers 192.168.0.64 through 192.168.0.127, inclusive. Not too hard, eh?
"man ipcalc" for more details.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens at vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- "I understand Windows 2000 has a Y2K problem." -
----------------------------------------------------------------------
More information about the fedora-list
mailing list