http://linuxg.net/install-subnetcalc-on-ubuntu/
As you may know, SubNetCalc is a useful command-line app for calculating IPv4 or IPv6 subnet address calculator. For given ip addresses, masks or prefix lentgs, the app calculates network addresses, broadcast addresses, the max number of hosts and host address ranges, the output being displayed in colors.
The latest version available is SubNetCalc 2.4.2, which has been recently released, bringing fixes.
Installation instructions:
Up to date packages are available via some third party PPA, so installing the software on Ubuntu 15.04 Vivid Vervet, Ubuntu 14.10 Utopic Unicorn, Ubuntu 14.04 Trusty Tahr, Ubuntu 12.04 Precise Pangolin and derivative systems like Linux Mint 17.2 Rafaela, Linux Mint 17.1 Rebecca, Linux Mint 17 Qiana, Linux Mint 13 Maya, Pinguy OS 14.04, Elementary OS 0.3 Freya, Elementary OS 0.2 Luna, Deepin 2014, Peppermint 6, Peppermint 5, LXLE 14.04 and Linux Lite 2 is easy. You need to add the PPA to your system, update the local repository index and install the subnetcalc package:
$ sudo add-apt-repository ppa:dreibh/ppa
$ sudo apt-get update
$ sudo apt-get install subnetcalc
Optional, to remove subnetcalc, do:
$ sudo apt-get remove subnetcalc