How IP Subnetting Actually Works
An IP address like 192.168.1.10 looks like a single piece of information, but every address on a network is really two pieces glued together: which network it belongs to, and which specific device it identifies on that network. Subnetting is the process of deciding exactly where that split happens, and a subnet mask is the tool that encodes the decision.
An IP address is 32 bits, not four numbers
Underneath the familiar dotted notation, an IPv4 address is just 32 bits, written as four 8-bit octets for human readability. 192.168.1.10 is really 11000000.10101000.00000001.00001010 in binary. A subnet mask is also 32 bits, and it works like a stencil: every bit set to 1 in the mask marks that same bit position in the address as part of the network, and every bit set to 0 marks it as part of the host, the specific device.
A mask of 255.255.255.0 is 11111111.11111111.11111111.00000000 in binary, 24 ones followed by 8 zeros. Applied to 192.168.1.10, the first 24 bits (192.168.1) describe the network, and the last 8 bits (10) describe the specific device on it. That's exactly what CIDR notation's slash number means: 192.168.1.10/24 is shorthand for "this address, with a 24-bit network portion," instead of spelling out the full mask separately.
Why CIDR replaced fixed address classes
Before 1993, IP addresses were split into rigid classes: Class A networks fixed the network portion at 8 bits (room for over 16 million devices per network), Class B fixed it at 16 bits (65,534 devices), and Class C fixed it at 24 bits (only 254 devices). An organization that needed 1,000 addresses had no clean fit: a Class C network was too small, and a Class B network wasted over 64,000 addresses it would never use. Multiplied across the whole internet, this rigidity burned through the limited pool of IPv4 addresses far faster than actual usage justified.
Classless Inter-Domain Routing, introduced in RFC 1519 in September 1993, threw out the fixed classes entirely and let the network portion be any length from 0 to 32 bits, sized to whatever a network actually needed rather than the nearest oversized class. The same idea also let many small allocations get combined into one larger routing entry, easing pressure on the routing tables every router on the internet has to maintain. CIDR is the reason "/24" and "/26" are everyday terms instead of "Class C."
A full worked example: splitting a /24 into /26 subnets
Take 192.168.1.0/24, a standard 254-usable-address network, and split it into four smaller /26 subnets instead. Moving from /24 to /26 borrows 2 extra bits for the network portion, leaving 6 bits for hosts, so each subnet holds 26, 64 total addresses. The IP Subnet Calculator works out every detail for the first of those four subnets directly:
| Field | Value |
|---|---|
| Subnet mask | 255.255.255.192 |
| Network address | 192.168.1.0 |
| Broadcast address | 192.168.1.63 |
| Usable host range | 192.168.1.1 to 192.168.1.62 |
| Usable hosts | 62 |
The other three /26 subnets carved from the same /24 continue in 64-address blocks: 192.168.1.64/26, 192.168.1.128/26, and 192.168.1.192/26, each with its own network address, broadcast address, and 62 usable hosts in between.
Why home and office networks all reuse the same address ranges
Almost every home router hands out addresses starting with 192.168, and it's not a coincidence: RFC 1918 sets aside three specific ranges, 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16, as private address space that's never routed across the public internet. Every home network, office network, and internal corporate network can reuse these exact same ranges internally without any conflict, since a router at the edge of each network translates between the private addresses inside and a single public address (or small pool of them) facing the internet, a process called network address translation. This is also the direct answer to why IPv4 hasn't fully run out of addresses despite only having about 4.3 billion of them total: the vast majority of individual devices in the world, phones, laptops, smart TVs, are never assigned a public address at all, they share one through their network's router.
Why the first and last address in every subnet are off limits
Out of 64 total addresses in a /26, only 62 are actually usable, and this pattern holds for every subnet size except two special cases. The very first address in a subnet is reserved as the network address, an identifier for the subnet itself, not a device on it. The very last address is reserved as the broadcast address, a special destination that every device on the subnet listens to at once. Neither one can be assigned to an individual device, which is why usable hosts is always 2 fewer than the subnet's total address count.
The two exceptions matter mainly for specialized use: a /31 (2 total addresses) skips both reservations and uses both addresses as a point-to-point link between exactly two devices, and a /32 (1 total address) identifies a single specific address with no network or broadcast concept at all. Forgetting the reserved addresses is one of the most common subnetting mistakes, assuming a /24 fits 256 devices when it actually fits 254 is an easy, and costly, off-by-one error when planning how many devices a network can actually hold.