Subnetting Workbook A — Mechanics
Companion to Subnetting with CIDR — Part 1 (Module 4). Every subnetting problem you will ever meet — in this course, in certifications, on the job — asks for some combination of the same seven things. This workbook drills all seven until they are automatic.
The 7 things every problem asks
- Network ID — the first address of the subnet (all host bits 0). Names the network; never assigned to a device.
- Broadcast address — the last address (all host bits 1). Reaches everyone in the subnet; never assigned either.
- First usable host — network ID + 1.
- Last usable host — broadcast − 1.
- Next network — where the following subnet starts (broadcast + 1).
- Host count — usable addresses = 2^(host bits) − 2 (minus network ID and broadcast).
- CIDR ↔ mask — translate /n into dotted decimal and back (/26 = 255.255.255.192).
The block-size shortcut answers 1–5 without touching binary. Find the interesting octet — the mask octet that is neither 255 nor 0. Then:
block size = 256 − interesting mask octet
Subnets start at multiples of the block size in that octet. Your network ID is the greatest multiple ≤ your address's value there; the broadcast is one less than the next multiple.
Worked examples
Example 1 — 192.168.10.77/24
/24 = 255.255.255.0 — the whole fourth octet is host bits (8 of them).
- Network ID: zero the host octet → 192.168.10.0
- Broadcast: host octet all 1s → 192.168.10.255
- First / last host: 192.168.10.1 / 192.168.10.254
- Next network: 192.168.11.0
- Hosts: 2^8 − 2 = 254
Example 2 — 172.16.5.200/26
/26 = 255.255.255.192; interesting octet = the fourth; block = 256 − 192 = 64. Multiples: 0, 64, 128, 192. Where does 200 fall? Between 192 and 255.
- Network ID: 172.16.5.192
- Broadcast: next multiple (256) minus 1 → 172.16.5.255
- First / last host: 172.16.5.193 / 172.16.5.254
- Next network: 192 + 64 = 256 → the octet rolls over → 172.16.6.0
- Hosts: 6 host bits → 2^6 − 2 = 62
Example 3 — 10.0.0.100/28
/28 = 255.255.255.240; block = 256 − 240 = 16. Multiples: 0, 16, 32, 48, 64, 80, 96, 112… 100 sits between 96 and 112.
- Network ID: 10.0.0.96
- Broadcast: 112 − 1 → 10.0.0.111
- First / last host: 10.0.0.97 / 10.0.0.110
- Next network: 10.0.0.112
- Hosts: 4 host bits → 2^4 − 2 = 14
Exercises
For each address, give all seven: mask (dotted decimal), network ID, broadcast, first host, last host, next network, host count. Prefixes run /24 → /30, easiest to hardest. Watch for the two classic traps hidden in the set: an address that is the broadcast, and a next-network that rolls into another octet.
- 192.168.1.50/24
- 192.168.4.130/25
- 192.168.7.60/25
- 10.1.1.90/26
- 172.16.30.20/26
- 192.168.100.200/26
- 10.0.5.37/27
- 172.16.8.100/27
- 192.168.50.223/27
- 10.20.30.40/28
- 192.168.2.100/28
- 172.31.4.250/28
- 10.10.10.10/29
- 192.168.77.100/29
- 172.16.99.62/29
- 10.200.14.66/30
- 192.168.0.21/30
- 172.20.5.129/30
- 192.168.31.158/26
- 10.99.255.245/28
Answer key
The arithmetic, shown for 1–5
1. 192.168.1.50/24 — mask 255.255.255.0; all 8 fourth-octet bits are host bits. Network 192.168.1.0; broadcast 192.168.1.255; hosts .1–.254; next network 192.168.2.0; 2^8 − 2 = 254 hosts.
2. 192.168.4.130/25 — mask 255.255.255.128; block 256 − 128 = 128; multiples 0, 128. 130 ≥ 128 → network 192.168.4.128; broadcast 128 + 128 − 1 = 255 → 192.168.4.255; hosts .129–.254; next network rolls over to 192.168.5.0; 2^7 − 2 = 126 hosts.
3. 192.168.7.60/25 — same block of 128, but 60 < 128 → network 192.168.7.0; broadcast 192.168.7.127; hosts .1–.126; next network 192.168.7.128; 126 hosts.
4. 10.1.1.90/26 — mask 255.255.255.192; block 256 − 192 = 64; multiples 0, 64, 128, 192. 90 falls in the 64 block → network 10.1.1.64; broadcast 128 − 1 = 127 → 10.1.1.127; hosts .65–.126; next network 10.1.1.128; 2^6 − 2 = 62 hosts.
5. 172.16.30.20/26 — block 64; 20 < 64 → network 172.16.30.0; broadcast 172.16.30.63; hosts .1–.62; next network 172.16.30.64; 62 hosts.
Full results, 1–20
Hosts column = usable hosts. First–last shortens the last octet only; every other octet matches the network ID unless written out.
| # | Mask | Network ID | First–last host | Broadcast | Next network | Hosts |
|---|---|---|---|---|---|---|
| 1 | 255.255.255.0 | 192.168.1.0 | .1–.254 | 192.168.1.255 | 192.168.2.0 | 254 |
| 2 | 255.255.255.128 | 192.168.4.128 | .129–.254 | 192.168.4.255 | 192.168.5.0 | 126 |
| 3 | 255.255.255.128 | 192.168.7.0 | .1–.126 | 192.168.7.127 | 192.168.7.128 | 126 |
| 4 | 255.255.255.192 | 10.1.1.64 | .65–.126 | 10.1.1.127 | 10.1.1.128 | 62 |
| 5 | 255.255.255.192 | 172.16.30.0 | .1–.62 | 172.16.30.63 | 172.16.30.64 | 62 |
| 6 | 255.255.255.192 | 192.168.100.192 | .193–.254 | 192.168.100.255 | 192.168.101.0 | 62 |
| 7 | 255.255.255.224 | 10.0.5.32 | .33–.62 | 10.0.5.63 | 10.0.5.64 | 30 |
| 8 | 255.255.255.224 | 172.16.8.96 | .97–.126 | 172.16.8.127 | 172.16.8.128 | 30 |
| 9 | 255.255.255.224 | 192.168.50.192 | .193–.222 | 192.168.50.223 | 192.168.50.224 | 30 |
| 10 | 255.255.255.240 | 10.20.30.32 | .33–.46 | 10.20.30.47 | 10.20.30.48 | 14 |
| 11 | 255.255.255.240 | 192.168.2.96 | .97–.110 | 192.168.2.111 | 192.168.2.112 | 14 |
| 12 | 255.255.255.240 | 172.31.4.240 | .241–.254 | 172.31.4.255 | 172.31.5.0 | 14 |
| 13 | 255.255.255.248 | 10.10.10.8 | .9–.14 | 10.10.10.15 | 10.10.10.16 | 6 |
| 14 | 255.255.255.248 | 192.168.77.96 | .97–.102 | 192.168.77.103 | 192.168.77.104 | 6 |
| 15 | 255.255.255.248 | 172.16.99.56 | .57–.62 | 172.16.99.63 | 172.16.99.64 | 6 |
| 16 | 255.255.255.252 | 10.200.14.64 | .65–.66 | 10.200.14.67 | 10.200.14.68 | 2 |
| 17 | 255.255.255.252 | 192.168.0.20 | .21–.22 | 192.168.0.23 | 192.168.0.24 | 2 |
| 18 | 255.255.255.252 | 172.20.5.128 | .129–.130 | 172.20.5.131 | 172.20.5.132 | 2 |
| 19 | 255.255.255.192 | 192.168.31.128 | .129–.190 | 192.168.31.191 | 192.168.31.192 | 62 |
| 20 | 255.255.255.240 | 10.99.255.240 | .241–.254 | 10.99.255.255 | 10.100.0.0 | 14 |
The traps: in #9 the given address 192.168.50.223 is the broadcast of its subnet — a device configured with it would silently misbehave. In #15 the given address is the last usable host (legal, but no room left). In #20 the next network rolls all the way to 10.100.0.0 — block arithmetic carries across octets exactly like ordinary addition.
Network Essentials · Module 4 · Turning Point Academy — backbone: Al-Doori, Network Essentials, Ch. 6.