The Mask calculator

(This document is still under construction)

What is calcmask?

Calcmask convert between Cisco wildcards, CIDR notation and the long form of netmasks.

This is best explained by examples, so here goes:

root@oasis:~# mask cidr 18
CIDR mask: 18
Netmask: 255.255.192.0
Cisco wildcard: 0.0.63.255
root@oasis:~# mask netmask 255.252.0.0
CIDR mask: 14
Netmask: 255.252.0.0
Cisco wildcard: 0.3.255.255
root@oasis:~# mask wildcard 0.0.0.7
CIDR mask: 29
Netmask: 255.255.255.248
Cisco wildcard: 0.0.0.7

It will also do all validation checks for you, so if you enter an invalid mask, it will tell you what is wrong with it. Very useful if you want to learn how it works.

Here is an example of an invalid netmask:

root@oasis:~# mask netmask 255.192.252.0
invalid netmask (255.192.252.0 doesn't convert to a bitmask of form 111... ...000)

I want it!

Calcmask is hosted on Sourceforge, so the latest version can always be downloaded the usual way:

There is a source tarball and debian package for the i386 platform. If enough people bug me about it I might release a binary tarball and/or Redhat rpm package, but I'm not really in the mood for that (:

Other stuff that might interest you!

If you like this program, you might be interested in the other isp utilities I've written. They can all be found here.

I have also written many other programs and scripts which might be of some use to you. They can all be found on my home page.


To comment on this page or the material presented here, drop me an email. My address is abz@blio.net---no spam please.

Last updated: Thu Nov 22 13:43:57 2000