Usable IP Range from CIDR Notation

Occasionally I need to find the usable IP address range given a particular CIDR notation. Usually I use an online calculator but today I found a better Linux based CLI tool, sipcalc, which save me opening up my web browser.

On Arch Linux you can simple install with:

$ sudo pacman -Sy sipcalc

And then to use:

[andy@home-pc ~]$ sipcalc 192.168.16.0/22
-[ipv4 : 192.168.16.0/22] - 0

[CIDR]
Host address		- 192.168.16.0
Host address (decimal)	- 3232239616
Host address (hex)	- C0A81000
Network address		- 192.168.16.0
Network mask		- 255.255.252.0
Network mask (bits)	- 22
Network mask (hex)	- FFFFFC00
Broadcast address	- 192.168.19.255
Cisco wildcard		- 0.0.3.255
Addresses in network	- 1024
Network range		- 192.168.16.0 - 192.168.19.255
Usable range		- 192.168.16.1 - 192.168.19.254

-
[andy@home-pc ~]$ 

Happy days!! 🙂

Be the first to comment

Leave a Reply