What Is CIDR?
CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing Internet Protocol packets. Introduced in 1993 as a replacement for the old class-based system (Class A, B, C), CIDR allows network engineers to define subnets of any size rather than being constrained to fixed 8-, 16-, or 24-bit boundaries. It is expressed as an IP address followed by a forward slash and the prefix length (number of bits in the network portion), for example: 192.168.0.0/16.
How Subnet Calculation Works
The prefix length (the number after the slash) tells you how many of the 32 bits in an IPv4 address are used to identify the network. The remaining bits identify individual hosts. A /24 prefix uses 24 bits for the network, leaving 8 bits for hosts — giving 2^8 = 256 total addresses. The first address is the network address (not assignable) and the last is the broadcast address (not assignable), leaving 254 usable host IPs. A /16 provides 65,534 usable hosts; a /32 is a single host address.
Common Use Cases
Network engineers use CIDR calculators when designing LAN subnets, configuring router ACLs, writing firewall rules, and planning IP address allocation to avoid overlaps. In cloud computing, platforms such as AWS, Google Cloud, and Azure require you to specify CIDR blocks when creating VPCs and subnets. For example, a VPC with 10.0.0.0/16 can be divided into /24 subnets (10.0.1.0/24, 10.0.2.0/24, etc.) and assigned to different availability zones for high availability.
Frequently Asked Questions
A. CIDR combines an IP address with a prefix length (e.g. 192.168.1.0/24) to define a network block. The prefix indicates how many bits identify the network versus the host.
A. 254. A /24 has 256 total addresses; subtract the network address and broadcast address to get 254 usable host IPs.
A. CIDR allows precise, non-overlapping IP ranges for VPCs and subnets. Security groups and NACLs also use CIDR to specify which IPs are allowed for inbound and outbound traffic.