Wildcard mask


A wildcard mask is a mask of bits that indicates which parts of an IP address are available for examination. In the Cisco IOS, they are used in several places, for example:
At a simplistic level a wildcard mask can be thought of as an inverted subnet mask. For example, a subnet mask of 255.255.255.0 inverts to a wildcard mask of 0.0.0.255.
A wild card mask is a matching rule. The rule for a wildcard mask is:
Any wildcard bit-pattern can be masked for examination. For example, a wildcard mask of 0.0.0.254 applied to IP address 10.10.10.2 will match even-numbered IP addresses 10.10.10.0, 10.10.10.2, 10.10.10.4, 10.10.10.6 etc. Same mask applied to 10.10.10.1 will match odd-numbered IP addresses 10.10.10.1, 10.10.10.3, 10.10.10.5 etc.
A network and wildcard mask combination of 1.1.1.1 0.0.0.0 would match an interface configured exactly with 1.1.1.1 only, and nothing else. This is really useful if you want to activate OSPF on a specific interface in a very clear and simple way.
If you insist on matching a range of networks, the network and wildcard mask combination of 1.1.0.0 0.0.255.255 would match any interface in the range of 1.1.0.0 to 1.1.255.255. Because of this, it's simpler and safer to stick to using wildcard masks of 0.0.0.0 and identify each OSPF interface individually, but once configured, they function exactly the same, therefore one way is not better than the other.
Wildcard masks are used in situations where subnet masks may not apply. For example, when two affected hosts fall in different subnets, the use of a wildcard mask will group them together.
List of Wildcard Mask

SlashNetmaskWildcard Mask
/32255.255.255.2550.0.0.0
/31255.255.255.2540.0.0.1
/30255.255.255.2520.0.0.3
/29255.255.255.2480.0.0.7
/28255.255.255.2400.0.0.15
/27255.255.255.2240.0.0.31
/26255.255.255.1920.0.0.63
/25255.255.255.1280.0.0.127
/24255.255.255.00.0.0.255
/23255.255.254.00.0.1.255
/22255.255.252.00.0.3.255
/21255.255.248.00.0.7.255
/20255.255.240.00.0.15.255
/19255.255.224.00.0.31.255
/18255.255.192.00.0.63.255
/17255.255.128.00.0.127.255
/16255.255.0.00.0.255.255
/15255.254.0.00.1.255.255
/14255.252.0.00.3.255.255
/13255.248.0.00.7.255.255
/12255.240.0.00.15.255.255
/11255.224.0.00.31.255.255
/10255.192.0.00.63.255.255
/9255.128.0.00.127.255.255
/8255.0.0.00.255.255.255
/7254.0.0.01.255.255.255
/6252.0.0.03.255.255.255
/5248.0.0.07.255.255.255
/4240.0.0.015.255.255.255
/3224.0.0.031.255.255.255
/2192.0.0.063.255.255.255
/1128.0.0.0127.255.255.255
/00.0.0.0255.255.255.255