When doing any moderate to advanced networking, you are likely to have to deal with subnetting. While some people have an ability to do the binary math in their head to figure out the correct subnet-mask, some may find it difficult to calculate, for them Ipcalc is a tool in Linux which help them to calculate no. of subnets, subnetting mask and other Ip addressing related stuffs.Ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range. By giving a second netmask, you can design subnets and supernets. It is also intended to be a teaching tool and presents the subnetting results as easy-to-understand binary values.
How to Install Ipcalc
To install Ipcalc in Ubuntu or debian based distros, open terminal ( Ctrl + Alt + t) and run the following command$ sudo apt-get install ipcalc
How to use Ipcalc
1. Know everything about the network address$ ipcalc 192.168.1.0 Address: 192.168.1.0 11000000.10101000.00000001. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.1.0/24 11000000.10101000.00000001. 00000000 HostMin: 192.168.1.1 11000000.10101000.00000001. 00000001 HostMax: 192.168.1.254 11000000.10101000.00000001. 11111110 Broadcast: 192.168.1.255 11000000.10101000.00000001. 11111111 Hosts/Net: 254 Class C, Private Internet