ipcalc
I have a new tool in my arsenal.
I had to configure a network recently- and we were given the CIDR notation of x.x.x.x/26, which is smaller than a normal class-C subnet. It’s been a while since I’ve manually had to figure out subnet masks, gateways and network addresses but I gave it a go. Then I asked someone else for clarification. I had done it right– she confirmed my work with
“$>ipcalc x.x.x.x/26″
Which is interesting- on Fedora Core 4 , this gives a “help” screen and you have to use -bmn flags, and you get back:
$ ipcalc -bnm 192.168.1.0/26
NETMASK=255.255.255.192
BROADCAST=192.168.1.63
NETWORK=192.168.1.0
while on Debian, you get back something completely different:
~$ ipcalc 192.168.0.1/26
Address: 192.168.0.1 11000000.10101000.00000000.00 000001
Netmask: 255.255.255.192 = 26 11111111.11111111.11111111.11 000000
Wildcard: 0.0.0.63 00000000.00000000.00000000.00 111111
=>
Network: 192.168.0.0/26 11000000.10101000.00000000.00 000000
HostMin: 192.168.0.1 11000000.10101000.00000000.00 000001
HostMax: 192.168.0.62 11000000.10101000.00000000.00 111110
Broadcast: 192.168.0.63 11000000.10101000.00000000.00 111111
Hosts/Net: 62 Class C, Private Internet
Strange, huh? But at any rate, either screen gives me what I wanted.
