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.
Actually, scratch that — 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.
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 Tool