IP Calculator

Quick post tonight after several days hibernation :D. In my Ubuntu (and other Linux environment), there is a tool named ipcalc that can used as IP address calculator. With this tool, I can easily know what the network address of an certain IP address. I can also know how many client can join into a range of IP address.

For example, I get IP address with network mask, with ipcalc I know that the network address for IP is See the log below as appear on my desktop :

tedy@tedy-laptop:~$ ipcalc
Address:          00001010.00100010.00011111.00100 010
Netmask: = 29 11111111.11111111.11111111.11111 000
Wildcard:              00000000.00000000.00000000.00000 111
Network:       00001010.00100010.00011111.00100 000
HostMin:          00001010.00100010.00011111.00100 001
HostMax:          00001010.00100010.00011111.00100 110
Broadcast:          00001010.00100010.00011111.00100 111
Hosts/Net: 6                     Class A, Private Internet

Theoretically to find out what is the network address of any given IP address is simply by do Boolean operation AND between IP address and its netmask. So the step to calculate network address manually is like these :

  1. Convert the IP address & network mask into biner form. This should be long explanation how to convert IP address into biner form.
  2. Then perform Boolean operation : <IP Address> AND <Network Mask>,  just keep in mind that in the AND operation if 1 meet 0 then the result will be 0 (vice versa). Only if 1 meet by 1 then the result would be 1.

That’s it, I can explain it longer, Wikipedia explains t well here. I know the theory but I’m too lazy to do math operation like that :p I’m glad to found simple tool like ipcalc. It makes my life a little bit easier 😀

Leave a Reply