taap.digitalnetwork engineering toolkit

What is the wildcard mask for a /18?

Answer
0.0.63.255 wildcard for /18 (255.255.192.0)

A /18 has the subnet mask 255.255.192.0. Subtract it from 255.255.255.255 and you get the wildcard 0.0.63.255: the last 14 bits are "don't care", so it matches 16,384 consecutive addresses.

wildcard · adjust the values

The calculation

255.255.255.255 − 255.255.192.0 = 0.0.63.255

A /18 block is typically a quarter of a /16, common when a site block is split into four functional zones. With the network 10.0.0.0, the wildcard 0.0.63.255 matches 10.0.0.0 through 10.0.63.255.

Using it in Cisco IOS

! standard ACL
access-list 10 permit 10.0.0.0 0.0.63.255

! named extended ACL
ip access-list extended FROM-SITE
 permit ip 10.0.0.0 0.0.63.255 any

! OSPF
router ospf 1
 network 10.0.0.0 0.0.63.255 area 0

Junos, Arista EOS, MikroTik and Linux use the prefix form instead: 10.0.0.0/18.

Nearby prefixes

PrefixSubnet maskWildcardAddresses
/16255.255.0.00.0.255.25565,536
/17255.255.128.00.0.127.25532,768
/18255.255.192.00.0.63.25516,384
/19255.255.224.00.0.31.2558,192
/20255.255.240.00.0.15.2554,096

More questions like this

Frequently asked questions

How many addresses does 0.0.63.255 match?

16,384. The wildcard has 14 one-bits, and 214 = 16,384.

Is 0.0.63.255 the same as 255.255.192.0?

No. 255.255.192.0 is the subnet mask; 0.0.63.255 is its bitwise inverse. Putting the subnet mask where IOS expects a wildcard matches the wrong addresses.