Subnets and CIDR Notation: A Plain English Explainer
You see an IP address written as 192.168.1.0/24 and wonder what the /24 means. Or you need to figure out how many hosts fit in a /22 block. Subnetting is one of those topics that looks like pure maths until someone explains the logic, and then it's just logic.
What a Subnet Is
A subnet is a logical division of an IP network. Instead of one large network where every device can talk to every other device directly, you split it into smaller segments. Devices in the same subnet communicate directly. Devices in different subnets communicate through a router. This improves performance, simplifies management, and contains broadcast traffic.
The subnet mask determines which part of an IP address identifies the network and which part identifies the individual host. In 192.168.1.0/24, the /24 means the first 24 bits are the network portion. In dotted decimal, /24 is 255.255.255.0 — the 255 octets mask the network bits.
CIDR Notation: What the Slash Number Means
CIDR stands for Classless Inter-Domain Routing. The number after the slash — the prefix length — tells you how many bits are network bits. In a /24, 24 bits are network, 8 are host. 8 host bits means 2^8 = 256 possible addresses. Two are reserved (network address and broadcast), leaving 254 usable hosts.
A /16 has 16 network bits and 16 host bits — 65,536 addresses, 65,534 usable. A /30 has 30 network bits and 2 host bits — 4 addresses, 2 usable. /30 blocks are used for point-to-point links where you only need two host addresses.
Why This Matters Outside the Textbook
Firewall rules use CIDR notation — '10.0.0.0/8' means all addresses from 10.0.0.0 to 10.255.255.255. Cloud VPCs are defined in CIDR blocks. Route tables use prefixes. Security groups use CIDR for source/destination specifications. You can't work with network infrastructure at any serious level without reading CIDR notation on sight.
Still — the more practical skill is quick mental calculation. Is 10.10.5.50 in the 10.10.4.0/22 block? A /22 covers 4 /24 blocks: 10.10.4.0, 10.10.5.0, 10.10.6.0, 10.10.7.0. Yes, 10.10.5.50 is in there. That kind of fast checking comes with practice and it saves time constantly.
Subnetting in Cloud Environments
Cloud VPCs (Virtual Private Clouds) make subnetting decisions real for developers who've never touched traditional networking. AWS, GCP, and Azure all require you to define your VPC CIDR block upfront — and changing it later is painful. Getting the sizing wrong (too small: you run out of IPs; too large: wasted address space and complex routing) is a common early architecture mistake that costs time to fix.
A common starting point is a /16 for the VPC (65,536 IPs) divided into /24 subnets (256 IPs each) per availability zone and tier. One /24 for public-facing resources, one for application servers, one for databases — each zone, each tier. It sounds like overkill for a small application. In practice, subnets are free and the operational simplicity of clean network segmentation pays off quickly when you need to write security group rules or troubleshoot routing issues.
Look Up Network Information for Any IP
Run a full IP lookup to see network range, ASN, and routing information for any address.
IP Lookup ToolAbout Kunal Khatri
Kunal is a network security specialist and systems administrator with 8+ years of experience auditing secure connections and building network infrastructure.
Related Articles
Understanding CIDR and Subnetting: A Practical Guide
Confused by IP addresses followed by slashes like /24? Learn what CIDR notation means, how subnet masks work, and how to divide networks easily.
Network Latency: What It Is and How to Actually Reduce It
Latency is the delay in network communication. It's not the same as bandwidth, it can't be fully eliminated, and most advice for reducing it misses the real causes.
TTL (Time to Live) in Networking: A Real Explanation
TTL appears in both DNS records and IP packets, doing different but related jobs in each context. Understanding both uses makes network troubleshooting much easier.
MAC Address vs IP Address: What's the Difference
MAC addresses and IP addresses both identify devices on networks — but at different layers, for different purposes, with different implications for privacy and security.
