Subnet and Wildcard mask table
The following table should help
in seeing a pattern between the number of bits used for the mask in a particular
octet, the subnet mask in decimal and the equivalent wildcard mask:
No. of Network Bits Set to 1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|---|---|
Subnet Mask Binary | 00000000 | 10000000 | 11000000 | 11100000 | 11110000 | 11111000 | 11111100 | 11111110 | 11111111 |
Subnet Mask Decimal | 0 | 128 | 192 | 224 | 240 | 248 | 252 | 254 | 255 |
Wildcard Mask Binary | 11111111 | 01111111 | 00111111 | 00011111 | 00001111 | 00000111 | 00000011 | 00000001 | 00000000 |
Wildcard Mask | 255 | 127 | 63 | 31 | 15 | 7 | 3 | 1 | 0 |
The binary for the wildcard
mask is the exact reverse, bit for bit, of the subnet mask. You then calculate
the decimal from the reversed binary bits to obtain the dotted decimal wildcard
mask.