Subnetcalculator
Networking

CIDR Notation Explained: Complete Guide to IP Address Subnetting

SubnetCalculator Team
#cidr#subnetting#ip-addressing#networking#subnet-mask#network-administration#tcp-ip

Those numbers after IP addresses like 192.168.1.0/24 are CIDR notation — a compact way to express both a network address and its size in a single string. If you work with networks, cloud infrastructure, or DevOps, understanding CIDR is non-negotiable.

Why CIDR Matters

In the early 1990s, the internet was scaling faster than its addressing model could handle. Routing tables were growing unmanageably large, and the classful allocation system (Class A, B, C) was wasting enormous blocks of IP space. CIDR (Classless Inter-Domain Routing), introduced in 1993, solved both problems by:

Without CIDR, the global routing table would have collapsed under its own weight years ago.

What Is CIDR Notation?

CIDR notation combines an IP address with a prefix length: IP address/prefix length

Take 192.168.1.0/24:

Think of it like a postal address: the network part identifies the street, the host part identifies the house number.

CIDR Notation Visualized: Network and Host Portions

CIDR Notation Diagram showing the breakdown of 192.168.1.0/24 with network and host portions

Watch: CIDR Notation Explained Visually

The Math Behind CIDR Notation

Every IPv4 address has exactly 32 bits. With a /24 network:

/24 is shorthand for the subnet mask 255.255.255.0. In binary:

11111111.11111111.11111111.00000000

The 1s represent the network portion; the 0s represent the host portion. The prefix length tells you exactly where the boundary sits.

CIDR Calculation Example: Breaking Down a /24 Network

For 192.168.1.0/24:

This range is the foundation of most home and small office networks.

Common CIDR Blocks and Their Sizes

Pro tip: Use our subnet calculator to instantly calculate any CIDR block and see the full breakdown.

CIDR PrefixAvailable HostsExample NetworkCommon Usage
/816,777,21410.0.0.0/8Large enterprise networks
/1665,534172.16.0.0/16Mid-size organizations
/24254192.168.1.0/24Small offices, home networks
/30210.0.0.0/30Point-to-point router links

Key pattern: A larger prefix number means a smaller network. /28 is much smaller than /16 — more network bits means fewer host bits. This catches many people out at first.

Binary Representation of CIDR Notation

Here’s how 192.168.1.0/24 looks at the binary level:

IP ComponentBinary RepresentationDecimalPurpose
First Octet11000000192Network
Second Octet10101000168Network
Third Octet000000011Network
Fourth Octet000000000Host

The first 24 bits (3 complete octets) are fixed for the network. The last 8 bits are available for host addresses within that network.

Subnetting: Dividing a /24 into Four /26 Networks

Starting from 192.168.1.0/24, you can divide it into four equal /26 subnets — useful for separating departments or security zones:

SubnetCIDR BlockUsable IP RangeUsable Hosts
1192.168.1.0/26192.168.1.1 – 192.168.1.6262
2192.168.1.64/26192.168.1.65 – 192.168.1.12662
3192.168.1.128/26192.168.1.129 – 192.168.1.19062
4192.168.1.192/26192.168.1.193 – 192.168.1.25462

Each /26 provides 62 usable addresses and network-level isolation between segments — a common pattern for department or VLAN separation.

Common Mistakes to Avoid

Assigning the network address to a device The first address in a subnet (e.g., 192.168.1.0 in a /24) identifies the network itself. It cannot be assigned to any host.

Assigning the broadcast address to a device The last address (e.g., 192.168.1.255 in a /24) is reserved for broadcast traffic. Assigning it to a device causes routing issues.

Counting total vs. usable addresses A /24 has 256 total addresses, but only 254 are usable. Always subtract 2 for the network and broadcast addresses.

Assuming larger prefix = larger network A /30 is far smaller than a /24. More prefix bits = fewer host bits = smaller network.

Where You’ll Use CIDR in Practice

Key Takeaways

  1. Format is IP/prefix — the prefix tells you where the network boundary sits
  2. Larger prefix number = smaller network — /28 is smaller than /16
  3. Always subtract 2 from the host count — network and broadcast addresses are reserved
  4. AWS subtracts 5 — account for cloud provider reservations when sizing VPC subnets
  5. Start practicing with /24 — 254 usable addresses, clean octet boundary, widely used

Practice Questions

Test your understanding before moving on:

Q1: What is the usable IP address range for 10.50.0.0/16?
A: 10.50.0.1 to 10.50.255.254 — 65,534 usable addresses.

Q2: How many /24 subnets can you create from a /22 network?
A: 4 subnets (2^(24−22) = 4).

Q3: Can you assign 172.16.5.255 to a device in 172.16.5.0/24?
A: No — that’s the broadcast address.

Use our subnet calculator to verify these and try your own. For more advanced scenarios, see our subnet calculation hacks for network engineers or the AWS VPC subnetting guide.

← Back to Blog