taap.digitalnetwork engineering toolkit

What is the wildcard mask for a /28?

Answer
0.0.0.15 wildcard for /28 (255.255.255.240)

A /28 has the subnet mask 255.255.255.240. Subtract it from 255.255.255.255 and you get the wildcard 0.0.0.15: the last 4 bits are "don't care", so it matches 16 consecutive addresses.

wildcard · adjust the values

The calculation

255.255.255.255 − 255.255.255.240 = 0.0.0.15

A /28 block is typically a 14-host block, often a DMZ or a small public allocation. With the network 10.0.0.0, the wildcard 0.0.0.15 matches 10.0.0.0 through 10.0.0.15.

Using it in Cisco IOS

! standard ACL
access-list 10 permit 10.0.0.0 0.0.0.15

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

! OSPF
router ospf 1
 network 10.0.0.0 0.0.0.15 area 0

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

Nearby prefixes

PrefixSubnet maskWildcardAddresses
/26255.255.255.1920.0.0.6364
/27255.255.255.2240.0.0.3132
/28255.255.255.2400.0.0.1516
/29255.255.255.2480.0.0.78
/30255.255.255.2520.0.0.34

More questions like this

Frequently asked questions

How many addresses does 0.0.0.15 match?

16. The wildcard has 4 one-bits, and 24 = 16.

Is 0.0.0.15 the same as 255.255.255.240?

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