Wildcard Mask Calculator
Simple conversion between subnet masks and wildcard masks
What is a Wildcard Mask?
A wildcard mask is the inverse of a subnet mask. While subnet masks use 1s to indicate network bits and 0s for host bits, wildcard masks use 0s for network bits and 1s for host bits. They're commonly used in Cisco ACLs and OSPF configurations. For example, subnet mask 255.255.255.0 becomes wildcard mask 0.0.0.255.
Visual Representation
Understanding Wildcard Masks
What is a wildcard mask?
Inverse of subnet mask: A wildcard mask is the bitwise inverse of a subnet mask. Where the subnet mask has 1s, the wildcard mask has 0s, and vice versa.
Example: Subnet mask 255.255.255.0 becomes wildcard mask 0.0.0.255
Usage: Commonly used in Cisco ACLs, OSPF area configurations, and route filtering.
How to calculate wildcard masks?
Simple formula: 255.255.255.255 - Subnet Mask = Wildcard Mask
Example calculations:
- 255.255.255.0 → 0.0.0.255
- 255.255.254.0 → 0.0.1.255
- 255.255.240.0 → 0.0.15.255
Common wildcard masks
Frequently used patterns:
- /24: 0.0.0.255 (256 addresses)
- /16: 0.0.255.255 (65,536 addresses)
- /8: 0.255.255.255 (16.7M addresses)
- Host: 0.0.0.0 (single address)
Cisco ACL examples
Access list syntax:
access-list 10 permit 192.168.1.0 0.0.0.255access-list 10 deny 10.0.0.0 0.255.255.255access-list 10 permit any= 0.0.0.0 255.255.255.255