Skip to Calculator
/24
Subnet Calculator
Subnetting & CIDR•6 min read•October 8, 2026

CIDR Subnetting Guide: From /0 to /32 Prefix Explained

Master Classless Inter-Domain Routing (CIDR). Learn how subnet masks divide networks into host and network bits with visual bitwise formulas.

IP
By Network Engineering Team

1. Introduction to Classless Inter-Domain Routing (CIDR)

Before Classless Inter-Domain Routing (CIDR) was introduced in RFC 1519 in 1993, IPv4 address space was allocated using rigid classes (Class A, Class B, and Class C). A Class A network provided 16,777,214 host addresses, while a Class B network provided 65,534 hosts. Organizations that required 500 addresses had no choice but to request a Class B block, resulting in massive address waste.

CIDR replaced this inefficient scheme by introducing variable-length subnet masking (VLSM). With CIDR, the boundary between the network prefix and the host identifier can be placed at any bit position from /0 to /32.

2. Understanding CIDR Notation (/24, /26, /30)

The forward slash followed by a number (e.g. /24) denotes the prefix length: the exact number of contiguous high-order bits set to 1 in the 32-bit subnet mask.

3. The Bitwise Logic of Subnetting

Every IPv4 calculation is executed through bitwise Boolean algebra:

IP Address:    192.168.1.130  ->  11000000.10101000.00000001.10000010
Subnet Mask:   255.255.255.192 -> 11111111.11111111.11111111.11000000
----------------------------------------------------------------------
Bitwise AND:   192.168.1.128  ->  11000000.10101000.00000001.10000000 (Network ID)

The broadcast address is calculated by performing a bitwise OR between the IP address and the inverted mask (wildcard mask):

Network ID:    192.168.1.128  ->  11000000.10101000.00000001.10000000
Wildcard Mask: 0.0.0.63       ->  00000000.00000000.00000000.00111111
----------------------------------------------------------------------
Bitwise OR:    192.168.1.191  ->  11000000.10101000.00000001.10111111 (Broadcast)

4. Practical Tips for Network Engineers

  1. Memorize the Powers of 2: 128, 64, 32, 16, 8, 4, 2, 1. Subnet increments always align with these block sizes.
  2. Plan for 30% Growth: When sizing cloud VPC subnets or on-prem VLANs, always allocate at least 30-50% more host addresses than current capacity requires.
  3. Account for Cloud Reservations: AWS and Azure reserve 5 IP addresses per subnet (Network ID, VPC router, DNS server, future use, and Broadcast). A /28 in AWS yields 11 usable IPs, not 14.
Tags:#IPv4#CIDR#Subnet Mask#Networking Basics

⚡Ready to calculate subnets?

Use our interactive IPv4/IPv6 Subnet Calculator with live 32-bit register analysis, CIDR charts, and VPC carvers.

Open Subnet Calculator →

Related Engineering Guides