Skip to main content
IP

Wildcard Mask Calculator

Calculate wildcard masks from subnet masks

Advertisement
Advertisement

What is a Wildcard Mask Calculator?

A Wildcard Mask Calculator converts subnet masks to wildcard masks, which are used in Cisco ACLs and OSPF configurations. Wildcard masks are the inverse of subnet masks. Enter 255.255.255.0 and you get 0.0.0.255 plus the CIDR length and dotted binaries for both values, with non-contiguous input flagged as Invalid mask.

How to Use This Tool

  1. Enter the subnet mask, Type a dotted mask like 255.255.255.0 in the Subnet Mask field.
  2. Click Calculate, Wildcard mask, CIDR length and both binaries appear instantly; Reset restores 255.255.255.0.
  3. Copy the Wildcard Mask row, Paste it straight into Cisco ACLs or OSPF network statements.

Understanding the Results

Wildcard Mask is 255 minus each octet (255.255.255.0 becomes 0.0.0.255). CIDR shows the /length for contiguous masks and Invalid mask for non-contiguous input. Mask (Binary) and Wildcard (Binary) display both values as dotted 8-bit groups so you can verify they are exact bitwise inverses.

Tips & Best Practices

• A /24 access-list entry looks like permit 192.168.1.0 0.0.0.255; an OSPF statement looks like network 192.168.1.0 0.0.0.255 area 0.

• If CIDR reports Invalid mask, the mask is non-contiguous (for example 255.0.255.0) and has no slash equivalent, fix the mask.

To check network and broadcast addresses for a particular IP, use the IPv4 Subnet Calculator. To convert a CIDR prefix to a subnet mask, use the CIDR Calculator.

Frequently Asked Questions

Wildcard masks appear in Cisco ACLs and OSPF network statements to say which bits to ignore: 0 means must match, 1 means ignore. To match all of 192.168.1.0/24 you write permit 192.168.1.0 0.0.0.255, or network 192.168.1.0 0.0.0.255 area 0.

Subtract each mask octet from 255: 255.255.255.0 becomes 0.0.0.255. Common pairs are /30 to 0.0.0.3, /16 to 0.0.255.255 and /8 to 0.255.255.255.

The mask is non-contiguous (for example 255.0.255.0) so no slash length describes it. Re-enter a mask of consecutive 1s followed by consecutive 0s.

Yes, the wildcard is the bitwise NOT of the mask, which the two binary rows confirm bit for bit. That inverse relationship is why 255.255.255.0 and 0.0.0.255 always pair.

Advertisement

Sized this for your site?

Free engineers turn these numbers into a working design, topology, hardware and quote included.