Travel

Categories

Linux: Subnet (CIDR) Calculator

sipcalc

$ sudo apt-get install sipcalc

$ sipcalc 192.168.1.5/24

Another program is whatmask

wget http://downloads.laffeycomputer.com/current_builds/whatmask/whatmask-1.2.tar.gz

$ whatmask 202.54.1.2/27

------------------------------------------------
TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 202.54.1.2
CIDR = ........................: /27
Netmask = .....................: 255.255.255.224
Netmask (hex) = ...............: 0xffffffe0
Wildcard Bits = ...............: 0.0.0.31
------------------------------------------------
Network Address = .............: 202.54.1.0
Broadcast Address = ...........: 202.54.1.31
Usable IP Addresses = .........: 30
First Usable IP Address = .....: 202.54.1.1
Last Usable IP Address = ......: 202.54.1.30

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>