Whatmask(1)
π WHATMASK π
ok so real talk, bestie: this is the whatmask(1) page β like, the manual page for whatmask, living in section 1 of the manual. It's a subnet mask notation conversion tool, and ngl it's about to make your whole networking life easier. π¦
β¨ NAME β¨
whatmask β Subnet mask notation conversion tool. That's it, that's the vibe. π
πΈ SYNTAX πΈ
whatmask <netmask or ip/netmask>
see the Examples section below
so simple it's giving main character energy fr fr π
π DESCRIPTION π
Whatmask is a small C program that will help you with network settings. tiny program, huge slay. π₯
Whatmask can work in two modes. Let's break it down, bestie.
π§ Mode One: just the mask
The first mode is to invoke Whatmask with only a subnet mask as the argument. In this mode Whatmask will echo back the subnet mask in four formats, plus the number of useable addresses in the range. four formats, one command, zero stress. π
Netmask Notations supported:
- Name β Example
- CIDR β
/24 - Netmask β
255.255.255.0 - Netmask (hex) β
0xffffff00 - Wilcard Bits β
0.0.0.255
yes the original page spells it "Wilcard" and we are keeping it, periodt. π«Ά
The above notations are all identical. CIDR notation commonly has a / in front of the number (representing the number of bits). Whatmask can accept these notations with or without a slash. This notation is used more and more recently. A lot of popular routers and software support this notation. it's literally everywhere now, iykyk. π
Netmask notation is pretty much the standard old-school way of doing it. It is supported by most systems (Un*x, Win, Mac, etc.). classic. never misses. π
Netmask (Hex) is the hexadecimal representation of the netmask. Many implementations of ifconfig use this notation. shoutout ifconfig. π
Wilcard Bits are similar to the netmask, but they are the logical not of the netmask. This notation is used by a number of popular routers (and nobody knows why...). like. why. we may never know. π
To use Whatmask in the first mode simply type whatmask <notation> The notation can be in any of the four formats and Whatmask will automagically figure out what it is and display all four notations. it just knows. β¨
π¦ Mode Two: the full network tea
To use Whatmask in its second mode execute Whatmask with any ip address within the subnet, followed by a slash (/), followed by the subnet mask in any format. (e.g. 192.168.0.23/255.255.255.224, or 192.168.0.23/27) Put no spaces in the argument. no spaces bestie, i mean it. π€
Whatmask will echo back the following:
- The netmask in the following formats: CIDR, Netmask, Netmask (Hex), Wildcard Bits
- The Network Address
- The Broadcast Address
- The number of Usable IP Addresses
- The First Usable IP Address
- The Last Usable IP Address
(Whatmask assumes that the Broadcast address is the highest address in the subnet. This is the most common configuration.)
that assumption is lowkey doing a lot of heavy lifting but it's correct like 99% of the time so we move. π
π OPTIONS π
<no options>β see above and below for usage. yeah. there are no flags. the argument IS the interface. iconic honestly. π
π EXAMPLES π
Examples of how Whatmask works, in all their glory. look at her go. π
myhost> whatmask /26
---------------------------------------------
TCP/IP SUBNET MASK EQUIVALENTS
---------------------------------------------
CIDR = .....................: /26
Netmask = ..................: 255.255.255.192
Netmask (hex) = ............: 0xffffffc0
Wildcard Bits = ............: 0.0.0.63
Usable IP Addresses = ......: 62
myhost> whatmask 255.255.192.0
---------------------------------------------
TCP/IP SUBNET MASK EQUIVALENTS
---------------------------------------------
CIDR = .....................: /18
Netmask = ..................: 255.255.192.0
Netmask (hex) = ............: 0xffffc000
Wildcard Bits = ............: 0.0.63.255
Usable IP Addresses = ......: 16,382
myhost> whatmask 0xffffffe0
---------------------------------------------
TCP/IP SUBNET MASK EQUIVALENTS
---------------------------------------------
CIDR = .....................: /27
Netmask = ..................: 255.255.255.224
Netmask (hex) = ............: 0xffffffe0
Wildcard Bits = ............: 0.0.0.31
Usable IP Addresses = ......: 30
myhost> whatmask 0.0.0.31
---------------------------------------------
TCP/IP SUBNET MASK EQUIVALENTS
---------------------------------------------
CIDR = .....................: /27
Netmask = ..................: 255.255.255.224
Netmask (hex) = ............: 0xffffffe0
Wildcard Bits = ............: 0.0.0.31
Usable IP Addresses = ......: 30
myhost> whatmask 192.168.165.23/19
------------------------------------------------
TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.165.23
CIDR = ........................: /19
Netmask = .....................: 255.255.224.0
Netmask (hex) = ...............: 0xffffe000
Wildcard Bits = ...............: 0.0.31.255
------------------------------------------------
Network Address = .............: 192.168.160.0
Broadcast Address = ...........: 192.168.191.255
Usable IP Addresses = .........: 8,190
First Usable IP Address = .....: 192.168.160.1
Last Usable IP Address = ......: 192.168.191.254
myhost> whatmask 192.168.0.13/255.255.255.0
------------------------------------------------
TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.0.13
CIDR = ........................: /24
Netmask = .....................: 255.255.255.0
Netmask (hex) = ...............: 0xffffff00
Wildcard Bits = ...............: 0.0.0.255
------------------------------------------------
Network Address = .............: 192.168.0.0
Broadcast Address = ...........: 192.168.0.255
Usable IP Addresses = .........: 254
First Usable IP Address = .....: 192.168.0.1
Last Usable IP Address = ......: 192.168.0.254
myhost> whatmask 192.168.0.113/0xffffffe0
------------------------------------------------
TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.0.113
CIDR = ........................: /27
Netmask = .....................: 255.255.255.224
Netmask (hex) = ...............: 0xffffffe0
Wildcard Bits = ...............: 0.0.0.31
------------------------------------------------
Network Address = .............: 192.168.0.96
Broadcast Address = ...........: 192.168.0.127
Usable IP Addresses = .........: 30
First Usable IP Address = .....: 192.168.0.97
Last Usable IP Address = ......: 192.168.0.126
myhost> whatmask 192.168.0.169/0.0.0.127
------------------------------------------------
TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.0.169
CIDR = ........................: /25
Netmask = .....................: 255.255.255.128
Netmask (hex) = ...............: 0xffffff80
Wildcard Bits = ...............: 0.0.0.127
------------------------------------------------
Network Address = .............: 192.168.0.128
Broadcast Address = ...........: 192.168.0.255
Usable IP Addresses = .........: 126
First Usable IP Address = .....: 192.168.0.129
Last Usable IP Address = ......: 192.168.0.254
ate. no crumbs. π₯π
π BUGS π
Report bugs to <software@laffeycomputer.com>. found a bug? tell them, don't suffer in silence bestie. π«Ά
π CONTRIBUTORS π
- Original code:
- Joe Laffey
<software@laffeycomputer.com>
- Joe Laffey
- Assistance with Manpage and Packaging:
- David Wirch
<kuma@linuxboxen.org>
- David Wirch
Many thanks to the beta testers and users who sent in valuable feedback! y'all are the real ones, fr fr. π
β UPDATES β
- Official Whatmask website:
and that's the whole page, bestie! go convert some netmasks, you've got this. π
this lil page came to you from LAFFEY Computer Imaging, dated Nov 14, 2003, for Whatmask(1) β yeah she's vintage, she's timeless, she's a classic, and she still slays. β¨ππ
π¦ where this page comes from
- fedora 43: whatmask 1.2-38.fc43 Β· GPL-2.0-or-later
- fedora 44: whatmask 1.2-38.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms