A structured lesson workspace with readable content, hands-on examples, and a clean path to completion.
The subnet mask is the address's other half. Without it, `192.168.10.100` says nothing about where the network ends and the host begins. With it, that single 32-bit pattern tells you the entire subnet's boundaries. Learn to read it and you've unlocked subnetting.
A subnet mask is a run of 1s followed by a run of 0s. The 1s mark the network portion; the 0s mark the host portion. That's it. Everything else about subnetting is arithmetic on top of this one rule.
IP: 192.168.10.100 → 11000000.10101000.00001010.01100100Mask: 255.255.255.0 → 11111111.11111111.11111111.00000000└──── network ────┘ └─ host ─┘Network address (AND):11000000.10101000.00001010.0110010011111111.11111111.11111111.00000000────────────────────────────────────11000000.10101000.00001010.00000000 → 192.168.10.0
The AND operation is what a host actually does. Take IP, take mask, AND them, and the result is the network address. Everything in the host bits determines which specific host on that network you're talking about.
Writing `255.255.255.0` gets old fast. CIDR writes it as the number of leading 1s: `/24`. Same mask, four fewer keystrokes.
| CIDR | Dotted mask | Addresses | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (RFC 3021, P2P only) |
| /32 | 255.255.255.255 | 1 | 1 (host route) |
The "minus two" rule — usable hosts = total addresses − 2 — comes from reserving the all-zeros host portion (network address) and all-ones host portion (broadcast). /31 is the exception: RFC 3021 allows both addresses as usable on point-to-point links.
Given `192.168.10.150/26`, here's the quick read: /26 means 26 network bits, 6 host bits. 6 host bits = 2^6 = 64 addresses. The subnet increments by 64 in the last octet: 0, 64, 128, 192.
Binary AND is truth, but too slow for 60-second exam questions. Use magic number: 256 - interesting mask octet = block size. /26 mask 192 -> 256-192=64. Subnets step by 64: .0, .64, .128, .192. /28 mask 240 -> block 16: .0, .16, .32, .48. Find which block your IP sits in — that's your subnet, broadcast is one before next block.
The mask/prefix is not optional — it's half the address. Two hosts with the same IP and different masks are on different networks. That's why misconfigured masks cause some hosts on a subnet to reach each other and others not, seemingly at random.
You now read masks and CIDR fluently. Next lesson builds the binary muscle you need to do these calculations fast in your head.
Finish the lesson once you have worked through the material. This awards ★ 40 XP.