1Whatmask(1)                         Network                        Whatmask(1)
2
3
4

NAME

6       whatmask - Subnet mask notation conversion tool.
7

SYNTAX

9       whatmask <netmask or ip/netmask>
10       see the Examples section below
11

DESCRIPTION

13       Whatmask is a small C program that will help you with network settings.
14
15       Whatmask  can  work in two modes.  The first mode is to invoke Whatmask
16       with only a subnet mask as the argument. In  this  mode  Whatmask  will
17       echo  back  the subnet mask in four formats, plus the number of useable
18       addresses in the range.
19
20       Netmask Notations supported:
21        Name                  Example
22
23        CIDR                         /24
24        Netmask            255.255.255.0
25        Netmask (hex)         0xffffff00
26        Wilcard Bits           0.0.0.255
27
28       The above notations are all identical.  CIDR notation  commonly  has  a
29       "/" in front of the number (representing the number of bits).  Whatmask
30       can accept these notations with or without a slash.  This  notation  is
31       used more and more recently. A lot of popular routers and software sup‐
32       port this notation.
33
34       Netmask notation is pretty much the standard old-school  way  of  doing
35       it. It is supported by most systems (Un*x, Win, Mac, etc.).
36
37       Netmask  (Hex)  is  the hexadecimal representation of the netmask. Many
38       implementations of ifconfig use this notation
39
40       Wilcard Bits are similar to the netmask, but they are the  logical  not
41       of  the  netmask.  This notation is used by a number of popular routers
42       (and nobody knows why...).
43
44       To use Whatmask in the first mode simply type "whatmask <notation>" The
45       notation  can be in any of the four formats and Whatmask will automagi‐
46       cally figure out what it is and display all four notations.
47
48       To use Whatmask in its second mode execute Whatmask with any ip address
49       within  the  subnet,  followed by a slash ('/'), followed by the subnet
50       mask   in   any   format.   (e.g.   192.168.0.23/255.255.255.224,    or
51       192.168.0.23/27) Put no spaces in the argument.
52
53       Whatmask will echo back the following:
54
55
56       -  The  netmask in the following formats: CIDR, Netmask, Netmask (Hex),
57       Wildcard Bits
58
59       - The Network Address
60
61       - The Broadcast Address
62
63       - The number of Usable IP Addresses
64
65       - The First Usable IP Address
66
67       - The Last Usable IP Address
68
69              (Whatmask assumes that the  Broadcast  address  is  the  highest
70              address in the subnet. This is the most common configuration.)
71

OPTIONS

73       <no options> see above and below for usage.
74

EXAMPLES

76       Examples of how Whatmask works:
77
78            myhost> whatmask /26
79
80            ---------------------------------------------
81                    TCP/IP SUBNET MASK EQUIVALENTS
82            ---------------------------------------------
83            CIDR = .....................: /26
84            Netmask = ..................: 255.255.255.192
85            Netmask (hex) = ............: 0xffffffc0
86            Wildcard Bits = ............: 0.0.0.63
87            Usable IP Addresses = ......: 62
88
89            myhost> whatmask 255.255.192.0
90
91            ---------------------------------------------
92                    TCP/IP SUBNET MASK EQUIVALENTS
93            ---------------------------------------------
94            CIDR = .....................: /18
95            Netmask = ..................: 255.255.192.0
96            Netmask (hex) = ............: 0xffffc000
97            Wildcard Bits = ............: 0.0.63.255
98            Usable IP Addresses = ......: 16,382
99
100            myhost> whatmask 0xffffffe0
101
102            ---------------------------------------------
103                    TCP/IP SUBNET MASK EQUIVALENTS
104            ---------------------------------------------
105            CIDR = .....................: /27
106            Netmask = ..................: 255.255.255.224
107            Netmask (hex) = ............: 0xffffffe0
108            Wildcard Bits = ............: 0.0.0.31
109            Usable IP Addresses = ......: 30
110
111            myhost> whatmask 0.0.0.31
112
113            ---------------------------------------------
114                    TCP/IP SUBNET MASK EQUIVALENTS
115            ---------------------------------------------
116            CIDR = .....................: /27
117            Netmask = ..................: 255.255.255.224
118            Netmask (hex) = ............: 0xffffffe0
119            Wildcard Bits = ............: 0.0.0.31
120            Usable IP Addresses = ......: 30
121
122            myhost> whatmask 192.168.165.23/19
123
124            ------------------------------------------------
125                         TCP/IP NETWORK INFORMATION
126            ------------------------------------------------
127            IP Entered = ..................: 192.168.165.23
128            CIDR = ........................: /19
129            Netmask = .....................: 255.255.224.0
130            Netmask (hex) = ...............: 0xffffe000
131            Wildcard Bits = ...............: 0.0.31.255
132            ------------------------------------------------
133            Network Address = .............: 192.168.160.0
134            Broadcast Address = ...........: 192.168.191.255
135            Usable IP Addresses = .........: 8,190
136            First Usable IP Address = .....: 192.168.160.1
137            Last Usable IP Address = ......: 192.168.191.254
138
139            myhost> whatmask 192.168.0.13/255.255.255.0
140
141            ------------------------------------------------
142                         TCP/IP NETWORK INFORMATION
143            ------------------------------------------------
144            IP Entered = ..................: 192.168.0.13
145            CIDR = ........................: /24
146            Netmask = .....................: 255.255.255.0
147            Netmask (hex) = ...............: 0xffffff00
148            Wildcard Bits = ...............: 0.0.0.255
149            ------------------------------------------------
150            Network Address = .............: 192.168.0.0
151            Broadcast Address = ...........: 192.168.0.255
152            Usable IP Addresses = .........: 254
153            First Usable IP Address = .....: 192.168.0.1
154            Last Usable IP Address = ......: 192.168.0.254
155
156            myhost> whatmask 192.168.0.113/0xffffffe0
157
158            ------------------------------------------------
159                         TCP/IP NETWORK INFORMATION
160            ------------------------------------------------
161            IP Entered = ..................: 192.168.0.113
162            CIDR = ........................: /27
163            Netmask = .....................: 255.255.255.224
164            Netmask (hex) = ...............: 0xffffffe0
165            Wildcard Bits = ...............: 0.0.0.31
166            ------------------------------------------------
167            Network Address = .............: 192.168.0.96
168            Broadcast Address = ...........: 192.168.0.127
169            Usable IP Addresses = .........: 30
170            First Usable IP Address = .....: 192.168.0.97
171            Last Usable IP Address = ......: 192.168.0.126
172
173            myhost> whatmask 192.168.0.169/0.0.0.127
174
175            ------------------------------------------------
176                         TCP/IP NETWORK INFORMATION
177            ------------------------------------------------
178            IP Entered = ..................: 192.168.0.169
179            CIDR = ........................: /25
180            Netmask = .....................: 255.255.255.128
181            Netmask (hex) = ...............: 0xffffff80
182            Wildcard Bits = ...............: 0.0.0.127
183            ------------------------------------------------
184            Network Address = .............: 192.168.0.128
185            Broadcast Address = ...........: 192.168.0.255
186            Usable IP Addresses = .........: 126
187            First Usable IP Address = .....: 192.168.0.129
188            Last Usable IP Address = ......: 192.168.0.254
189
190

BUGS

192       Report bugs to <software@laffeycomputer.com>
193
194

CONTRIBUTORS

196       Original code:
197              Joe Laffey <software@laffeycomputer.com>
198
199       Assistance with Manpage and Packaging:
200              David Wirch <kuma@linuxboxen.org>
201
202       Many  thanks  to  the beta testers and users who sent in valuable feed‐
203       back!
204
205

UPDATES

207       Official Whatmask website:
208              http://www.laffeycomputer.com/whatmask.html
209
210
211
212
213LAFFEY Computer Imaging          Nov 14, 2003                      Whatmask(1)
Impressum