How to Use the CIDR Calculator
- Input an IP address with a CIDR notation (e.g., 192.168.1.0/24).
- Click calculate.
- Review the generated IP ranges, masks, and host counts.
Formulas and Technical Logic
Classless Inter-Domain Routing (CIDR) replaces class-based IP routing. The suffix (e.g., /24) dictates the number of fixed network bits. The remaining bits (32 – suffix) dictate the number of host bits. Total IP addresses equal 2^(32 – suffix). Available host addresses equal 2^(32 – suffix) – 2.
Key Features
- Validates CIDR notation input.
- Calculates first and last usable IP addresses.
- Determines wildcard masks.
- Supports both IPv4 and IPv6 syntax parsing.
Reference Table: Wildcard Masks
| CIDR | Subnet Mask | Wildcard Mask |
|---|---|---|
| /22 | 255.255.252.0 | 0.0.3.255 |
| /23 | 255.255.254.0 | 0.0.1.255 |
| /24 | 255.255.255.0 | 0.0.0.255 |
| /25 | 255.255.255.128 | 0.0.0.127 |
| /26 | 255.255.255.192 | 0.0.0.63 |
| /27 | 255.255.255.224 | 0.0.0.31 |
| /28 | 255.255.255.240 | 0.0.0.15 |
Frequently Asked Questions
What is CIDR?
CIDR is a method for allocating IP addresses and routing IP packets efficiently without rigid classes.
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask. It is commonly used in access control lists (ACLs) and routing protocols.