RouteDuck

IP addressing

Wildcard Mask Calculator

Convert between a prefix length, a subnet mask and a wildcard mask. Below that, enter any address and wildcard to see exactly what an access list entry would match.

Convert a mask

Prefix length
/24
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Wildcard in binary
00000000.00000000.00000000.11111111
Addresses matched
256

See what an address and wildcard match

Ones mark the bits that are ignored.

This wildcard is not contiguous, so it does not describe one subnet. It is valid in an access list and matches the 128 addresses that fit the pattern below.

Address in binary
11000000.10101000.00000001.00000000
Wildcard in binary
00000000.00000000.00000000.11111110
Match patternx is ignored
11000000.10101000.00000001.xxxxxxx0
Addresses matched
128
Access list entry
permit ip 192.168.1.0 0.0.0.254 any
First 32 matching addresses
192.168.1.0
192.168.1.2
192.168.1.4
192.168.1.6
192.168.1.8
192.168.1.10
192.168.1.12
192.168.1.14
192.168.1.16
192.168.1.18
192.168.1.20
192.168.1.22
192.168.1.24
192.168.1.26
192.168.1.28
192.168.1.30
192.168.1.32
192.168.1.34
192.168.1.36
192.168.1.38
192.168.1.40
192.168.1.42
192.168.1.44
192.168.1.46
192.168.1.48
192.168.1.50
192.168.1.52
192.168.1.54
192.168.1.56
192.168.1.58
192.168.1.60
192.168.1.62

What a wildcard mask is

A wildcard mask marks which bits of an address may vary. A zero bit must match and a one bit is ignored. For a whole subnet it is the subnet mask inverted, so 255.255.255.0 becomes 0.0.0.255. To work one out by hand, subtract each octet of the subnet mask from 255.

Wildcards that are not contiguous

In an access list the ones in a wildcard mask do not have to sit together. 0.0.0.254 ignores every bit of the last octet except the lowest, so with 192.168.1.0 it matches the even addresses and with 192.168.1.1 the odd ones. The second tool on this page shows the bit pattern and the matching addresses for any pair.

Related tools