Convert CDIR notation to IP range

Gene Heskett gene.heskett at verizon.net
Thu Jul 29 01:25:05 UTC 2004


On Wednesday 28 July 2004 12:21, John Nichel wrote:
>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
>
>--
>John C. Nichel
>ÜberGeek
>KegWorks.com
>716.856.9675
>john at kegworks.com

This isn't terribly difficult John.  What you seem not to have a grasp 
of is what the '/24' means.  What it means is that the first 24 bits 
is fixed as stated, and in all cases that 24 bits is actually the 
hexidecimal version of the decimals you are looking at.  In other 
words the first 3 (in this case 24/8=3) bytes are fixed, and this is 
the 192.168.0 portion of the address when stated in decimal.  That 
'mask' if you will, can be set to other values besides 24, like if 
you had only 16 address assignments availble from your ISP, then this 
masking value would be /28 for instance, with the 3rd 0 replaced by 
the lowest address of your assigned block.  The last, "unmasked" bits 
are free to be any value.  For a block of address that range from 
192.168.0.240 to 192.168.0.255, it would be stated as 
192.168.0.240/28 to make another example.

Does this help?

Anybody else with a better explanation, please feel free to jump right 
in and correct me if required.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.24% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.





More information about the users mailing list