What is CIDR?
CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing Internet Protocol packets. It was introduced in 1993 to replace the previous addressing architecture of classful network design in the Internet. CIDR addresses include a network address and the routing prefix length, written in a format like 192.168.1.0/24.
The CIDR notation combines the network address with a suffix that indicates the number of bits used for the network portion. For example, in 192.168.1.0/24, the "/24" indicates that the first 24 bits are used to identify the network, leaving 8 bits for host addresses.
When to Use a CIDR Calculator
A CIDR calculator is an essential tool for network administrators and IT professionals in various scenarios:
- Network Planning: When designing or expanding a network infrastructure and needing to allocate IP address ranges efficiently.
- Subnet Configuration: When configuring routers, firewalls, or other network devices that require subnet mask information.
- Troubleshooting Network Issues: When diagnosing connectivity problems related to IP addressing or routing configuration.
How to Calculate CIDR Information
CIDR calculations involve several formulas to determine network properties:
Subnet Mask Calculation: Convert the CIDR prefix to a dotted-decimal subnet mask.
Network Address: Bitwise AND operation between IP address and subnet mask.
Broadcast Address: Bitwise OR operation between IP address and inverted subnet mask.
Total Available Hosts: 2(32-prefix) - 2
First Usable Host: Network address + 1
Last Usable Host: Broadcast address - 1
Wildcard Mask: Bitwise NOT of the subnet mask (255.255.255.255 - subnet mask)
Examples
Example 1: Basic CIDR Calculation
Calculate the network information for the CIDR notation 192.168.1.0/24.
Parameter | Value |
---|---|
IP Address | 192.168.1.0 |
CIDR Prefix | 24 |
Subnet Mask | 255.255.255.0 |
Network Address | 192.168.1.0 |
Broadcast Address | 192.168.1.255 |
First Usable Host | 192.168.1.1 |
Last Usable Host | 192.168.1.254 |
Total Hosts | 254 |
Wildcard Mask | 0.0.0.255 |
Example 2: Small Network Segment
Calculate the network information for the CIDR notation 10.0.0.0/28.
Parameter | Value |
---|---|
IP Address | 10.0.0.0 |
CIDR Prefix | 28 |
Subnet Mask | 255.255.255.240 |
Network Address | 10.0.0.0 |
Broadcast Address | 10.0.0.15 |
First Usable Host | 10.0.0.1 |
Last Usable Host | 10.0.0.14 |
Total Hosts | 14 |
Wildcard Mask | 0.0.0.15 |
Example 3: Large Enterprise Network
Calculate the network information for the CIDR notation 172.16.0.0/16.
Parameter | Value |
---|---|
IP Address | 172.16.0.0 |
CIDR Prefix | 16 |
Subnet Mask | 255.255.0.0 |
Network Address | 172.16.0.0 |
Broadcast Address | 172.16.255.255 |
First Usable Host | 172.16.0.1 |
Last Usable Host | 172.16.255.254 |
Total Hosts | 65,534 |
Wildcard Mask | 0.0.255.255 |
CIDR Prefix Reference Table
CIDR Prefix | Subnet Mask | Number of Networks | Hosts per Network |
---|---|---|---|
/32 | 255.255.255.255 | 232 | 1 |
/31 | 255.255.255.254 | 231 | 2* |
/30 | 255.255.255.252 | 230 | 2 |
/28 | 255.255.255.240 | 228 | 14 |
/24 | 255.255.255.0 | 224 | 254 |
/22 | 255.255.252.0 | 222 | 1,022 |
/20 | 255.255.240.0 | 220 | 4,094 |
/16 | 255.255.0.0 | 216 | 65,534 |
/8 | 255.0.0.0 | 28 | 16,777,214 |
* Note: In /31 networks, all addresses are usable per RFC 3021 for point-to-point links.
Related Calculators
Enhance your network planning with these additional tools:
- IPv4 Subnet Calculator - For detailed subnet planning
- Reverse Subnet Mask Calculator - Convert subnet masks to CIDR notation
- Network Throughput Calculator - Calculate network performance