What is a CIDR Converter?
A CIDR Converter allows network administrators to effortlessly switch between Classless Inter-Domain Routing (CIDR) slash notation and standard dotted-decimal Subnet Masks.
In modern network engineering, the legacy concept of strict Class A, B, and C networks has been replaced by CIDR (e.g., `/24`). The CIDR number simply represents the exact number of contiguous `1` bits in the 32-bit subnet mask, reading from left to right. Understanding how to fluidly convert `/20` into `255.255.240.0` is essential when configuring different vendor hardware interfaces, as some OS platforms require slash notation while others demand the full mask string.
Furthermore, this calculator generates the Wildcard Mask, which is the mathematically inverted version of the Subnet Mask.
Example Usage: Writing an ACL
Scenario: Allowing Traffic from a /19 VLAN
You are configuring a Cisco router and need to write a standard Access Control List (ACL) to permit traffic originating from your `10.50.32.0/19` subnet. Cisco IOS ACLs require Wildcard Masks.
- 1. Input /19 into the CIDR Converter
- 2. Verify standard mask: 255.255.224.0
- 3. Copy generated Wildcard Mask: 0.0.31.255
- Final Command:
access-list 10 permit 10.50.32.0 0.0.31.255
Frequently Asked Questions
Why is it called a Wildcard Mask?
A wildcard mask indicates which parts of an IP address must be an exact match, and which parts can be ignored ("wildcards"). A `0` in the wildcard mask means "this bit must match exactly", while a `1` means "this bit can be anything". That is why it is the exact binary inverse of a subnet mask.
What happens if a subnet mask is non-contiguous?
Valid IPv4 subnet masks MUST be contiguous strings of `1`s followed by `0`s (e.g., `11111111.00000000.00000000.00000000` or `255.0.0.0`). A mask like `255.0.255.0` is technically invalid in modern networking and our calculator will reject it, as it cannot be mathematically converted into a CIDR prefix.