Convert CDIR notation to IP range
Price Technology
pricetech at charter.net
Wed Jul 28 22:51:32 UTC 2004
On Wed, 28 Jul 2004 12:21:26 -0400, John Nichel <john at kegworks.com> 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
>
Let me see if I can help, and if someone else already has, so be it.
CIDR notation simple expresses the subnet mask a different way. An easy
way to convert is to take the CIDR number and place that many 1's in the
subnet mask. Per your example of 192.168.0.0/24 :
11111111 11111111 11111111 00000000 or 255.255.255.0 for a subnet mask.
This means that the first three octets (sets of eight bits) will be the
same on all nodes of the network. This is the Network Address. The last
octet of the mask, being zero, means that the number represented there is
the machine address.
Remember that octets range from 0 to 255, giving you a total of 256
Machine Addresses per Network Address. Remember also that .0 is the
address of the network and .255 is the broadcast address for the whole
subnet, so you actually have 254 usable addresses.
Clear as mud ???
Joebewan
More information about the users
mailing list