taap.digitalnetwork engineering toolkit

What is the wildcard mask for a /25?

Answer
0.0.0.127 wildcard for /25 (255.255.255.128)

A /25 has the subnet mask 255.255.255.128. Subtract it from 255.255.255.255 and you get the wildcard 0.0.0.127: the last 7 bits are "don't care", so it matches 128 consecutive addresses.

wildcard · adjust the values

The calculation

255.255.255.255 − 255.255.255.128 = 0.0.0.127

A /25 block is typically half of a /24, typical for a 100-user VLAN. With the network 10.0.0.0, the wildcard 0.0.0.127 matches 10.0.0.0 through 10.0.0.127.

Using it in Cisco IOS

! standard ACL
access-list 10 permit 10.0.0.0 0.0.0.127

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

! OSPF
router ospf 1
 network 10.0.0.0 0.0.0.127 area 0

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

Nearby prefixes

PrefixSubnet maskWildcardAddresses
/23255.255.254.00.0.1.255512
/24255.255.255.00.0.0.255256
/25255.255.255.1280.0.0.127128
/26255.255.255.1920.0.0.6364
/27255.255.255.2240.0.0.3132

More questions like this

Frequently asked questions

How many addresses does 0.0.0.127 match?

128. The wildcard has 7 one-bits, and 27 = 128.

Is 0.0.0.127 the same as 255.255.255.128?

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