Linux IP Calculator

I found a CLI IP Calculator for Ubuntu, it’s really useful to quickly resolve network details without leaving the console.

You can install using apt-get:

sudo apt-get install ipcalc

You can then run the following (as an example)

ipcalc 192.168.0.0/17

and get the following results

Address: 192.168.0.0 11000000.10101000.0 0000000.00000000
Netmask: 255.255.128.0 = 17 11111111.11111111.1 0000000.00000000
Wildcard: 0.0.127.255 00000000.00000000.0 1111111.11111111
=>
Network: 192.168.0.0/17 11000000.10101000.0 0000000.00000000
HostMin: 192.168.0.1 11000000.10101000.0 0000000.00000001
HostMax: 192.168.127.254 11000000.10101000.0 1111111.11111110
Broadcast: 192.168.127.255 11000000.10101000.0 1111111.11111111
Hosts/Net: 32766 Class C, Private Internet