Understanding CIDR Notation: A Network Engineer's Guide
Classless Inter-Domain Routing (CIDR) is the fundamental addressing scheme used across the modern internet and cloud computing platforms (AWS, GCP, Azure). Understanding how to read, calculate, and segment CIDR blocks is a critical skill for network engineers, DevOps professionals, and system administrators.
The Death of Classful Routing
Historically, IP addresses were divided into strict classes (Class A, B, and C). A Class A network supported 16 million hosts, while a Class C network supported only 254. This rigid structure led to massive inefficiencies; an organization needing 300 IP addresses had to request a Class B block, wasting over 65,000 addresses.
CIDR was introduced in 1993 to replace classful networks, allowing for flexible allocation of IP addresses through variable-length subnet masking (VLSM).
Deconstructing CIDR Notation
A CIDR address consists of an IP address followed by a slash and a number (e.g., 192.168.1.0/24). The number after the slash is the prefix length, which dictates how many bits of the 32-bit IPv4 address are used for the network routing prefix. The remaining bits are used for host addresses.
- /32: Points to a single specific host address (0 host bits).
- /24: Represents a standard local network segment, leaving 8 bits for hosts (256 addresses).
- /16: A large corporate network block, leaving 16 bits for hosts (65,536 addresses).
Calculating Subnets and Usable IPs
To calculate the number of total addresses in a CIDR block, you use the formula: 2^(32 - prefix length). For a /24 network, this is 2^(32 - 24) = 2^8 = 256.
However, not all addresses are usable by hosts. In any given subnet, the first address is reserved for the Network ID, and the last address is reserved for the Broadcast Address. Therefore, the formula for usable host IP addresses is (2^(32 - prefix length)) - 2.
Cloud VPCs and CIDR Segmentation
In modern cloud architecture, you typically define a large overarching CIDR block for your Virtual Private Cloud (VPC), such as 10.0.0.0/16. You must then segment this block into smaller subnets across different Availability Zones.
For example, you might create a public subnet for load balancers (10.0.1.0/24) and private subnets for application servers (10.0.2.0/24) and databases (10.0.3.0/24). Calculating these non-overlapping boundaries manually is error-prone, which is why network engineers rely on CIDR calculators.
Calculate subnets, usable IP ranges, and broadcast addresses instantly with our advanced network calculator.
Launch Tool