Skip to main content
KalkuNet

Wildcard Mask Calculator — For Cisco ACLs and OSPF

Compute exact inverse wildcard masks from netmasks or CIDR for OSPF & ACL rules.

Runs in your browserNetwork · Subnetting, CIDR & Network Maths
InputWildcardPrefixMatching addressesACL / OSPF example
192.168.1.0/240.0.0.255/24256access-list 10 permit 192.168.1.0 0.0.0.255
10.0.0.0 0.0.255.2550.0.255.255/1665,536access-list 10 permit 10.0.0.0 0.0.255.255
255.255.255.1920.0.0.63/2664network <ip> 0.0.0.63 area 0
172.16.0.0 0.0.255.0non-contiguous wildcard: valid in Cisco ACLs, but has no /prefix equivalent0.0.255.0—256access-list 10 permit 172.16.0.0 0.0.255.0

When to use the OSPF & Cisco ACL Wildcard Mask Converter

  • From CIDR, mask or an address pair

    Write 192.168.1.0/24, 255.255.255.192 or an address followed by a wildcard. You get the wildcard, its prefix equivalent, the number of matching addresses and a sample config line.

  • Non-contiguous wildcards

    Cisco ACLs accept wildcards such as 0.0.255.0 that match only the third octet. Such wildcards are recognised and explained, not treated as errors. Contiguous ones such as 0.0.0.255 are shown with their /24 equivalent.

  • Ready sample lines

    Every result comes with a sample access-list or OSPF network line with the right address and wildcard, cutting typos during configuration. For a bare mask without an address, the sample uses the OSPF network command.

  • How many addresses match

    The number of covered addresses comes from the 1 bits of the wildcard, so you can see whether a rule is too broad before applying it. A wildcard of 0.0.255.0, for example, matches 256 addresses spread across the third octet.

Frequently asked questions

How is a wildcard calculated?

Subtract each subnet-mask octet from 255. For 255.255.255.192 the wildcard is 0.0.0.63. For /20 it is 0.0.15.255.

Where are wildcards used?

In Cisco IOS standard and extended ACLs, OSPF and EIGRP network commands, and some Juniper and Huawei devices.

What do host and any mean in ACLs?

host 10.0.0.1 equals wildcard 0.0.0.0, and any equals 0.0.0.0 255.255.255.255.

Do all devices support non-contiguous wildcards?

No. Cisco IOS ACLs support them, but OSPF network commands and many firewalls only accept contiguous wildcards.

Is my data sent to a server?

No. Everything is computed in your browser, so internal addresses and ACL rules stay private.

Learn more