CIDR to Netmask Converter
Convert a CIDR prefix length to a dotted-decimal netmask, or go the other way, and see the wildcard mask and address count.
How it works
netmask = 32 bits with the first n bits set; wildcard = NOT netmask
Sources
- RFC 4632 — CIDR Address Strategy (2006)
- RFC 950 — Internet Standard Subnetting Procedure (1985)
Questions
What is the difference between a netmask and a wildcard mask?
A netmask has 1s where the address must match the network and 0s for host bits. A wildcard mask inverts that, so 0 means "must match" and 1 means "any value".
Which prefixes have no usable hosts?
None are unusable, but the arithmetic changes: /30 and shorter reserve the network and broadcast addresses, /31 is a two-address point-to-point link, and /32 is a single address.