taap.digitalnetwork engineering toolkit

What is the wildcard mask for a /23?

Answer
0.0.1.255 wildcard for /23 (255.255.254.0)

A /23 has the subnet mask 255.255.254.0. Subtract it from 255.255.255.255 and you get the wildcard 0.0.1.255: the last 9 bits are "don't care", so it matches 512 consecutive addresses.

wildcard · adjust the values
Telecom pole with many wires against the sky
Telecom pole with many wires against the sky. Photo: T / Unsplash

The calculation

255.255.255.255 − 255.255.254.0 = 0.0.1.255

A /23 block is typically two contiguous /24s, for example a VLAN that outgrew 254 hosts. With the network 10.0.0.0, the wildcard 0.0.1.255 matches 10.0.0.0 through 10.0.1.255.

Using it in Cisco IOS

! standard ACL
access-list 10 permit 10.0.0.0 0.0.1.255

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

! OSPF
router ospf 1
 network 10.0.0.0 0.0.1.255 area 0

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

Nearby prefixes

PrefixSubnet maskWildcardAddresses
/21255.255.248.00.0.7.2552,048
/22255.255.252.00.0.3.2551,024
/23255.255.254.00.0.1.255512
/24255.255.255.00.0.0.255256
/25255.255.255.1280.0.0.127128

Step by step

  1. /23 mask: 255.255.254.0.
  2. In octet 3, the mask is 254 = 11111110 in binary.
  3. Flipping the bits: 11111110 → 00000001 = 1.
  4. Final wildcard: 0.0.1.255, leaving the 9 host bits free.

Blocks matched from 10.0.0.0

BlockFirst addressLast address
110.0.0.010.0.1.255
210.0.2.010.0.3.255
310.0.4.010.0.5.255

In practice

A permit 10.0.0.0 0.0.1.255 line covers 10.0.0.0 to 10.0.1.255. The next block starts at 10.0.2.0: if the range you need goes past that, use a larger wildcard or a second line. To cover twice as much, use the /22 wildcard (0.0.3.255); for half, the /24 wildcard (0.0.0.255).

To try other values, open the Wildcard mask calculator with these numbers already filled in.

More questions like this

Frequently asked questions

How many addresses does 0.0.1.255 match?

512. The wildcard has 9 one-bits, and 29 = 512.

Is 0.0.1.255 the same as 255.255.254.0?

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