A Debian-originating tool to calculate netmasks. Use it like: netmask -c '192.168.0.0 - 192.168.1.255'