Subnetting Workbook B — Design
Companion to Subnetting with CIDR — Part 2 (Module 4). Workbook A drilled the mechanics of a single subnet; here you run the process in reverse — from "how many hosts do we need?" to a complete, non-overlapping addressing plan. This is the arithmetic of real network design, and it feeds the course capstone.
The sizing method
- Hosts needed → host bits. Find the smallest h where 2^h − 2 ≥ hosts needed. (The −2 pays for the network ID and broadcast.) Exception, worth knowing: the −2 applies to ordinary broadcast subnets like the ones designed here. On a point-to-point link between exactly two routers, RFC 3021 allows a
/31whose two addresses are both usable (no broadcast is needed when there is only one other end); the traditional/30does the same job with 2 of its 4 addresses spent. A/32is a single host route, not a subnet. - Host bits → prefix. Prefix = 32 − h.
- Allocate largest subnet first, packing from the start of your block. A subnet must start on a multiple of its own size — largest-first keeps every start aligned automatically and leaves no wasted gaps.
- Verify: no two subnets overlap, everything fits inside the parent block, and there is room left for growth.
Handy sizes: /30 → 2 hosts · /29 → 6 · /28 → 14 · /27 → 30 · /26 → 62 · /25 → 126 · /24 → 254 · /23 → 510 · /22 → 1,022. Remember the department's router (gateway) consumes one usable address — count it among the hosts.
Worked design — 10.20.0.0/22 for five departments
Requirements: A = 200 hosts, B = 120, C = 60, D = 25, E = 10. The parent block 10.20.0.0/22 spans 10.20.0.0 – 10.20.3.255 (1,024 addresses).
Size each department (smallest h with 2^h − 2 ≥ need):
- A: 200 → h = 8 (254) → /24 · B: 120 → h = 7 (126) → /25
- C: 60 → h = 6 (62) → /26 · D: 25 → h = 5 (30) → /27
- E: 10 → h = 4 (14) → /28
Allocate largest-first from 10.20.0.0:
| Dept | Need | Subnet | Mask | Usable hosts | Broadcast | Capacity |
|---|---|---|---|---|---|---|
| A | 200 | 10.20.0.0/24 | 255.255.255.0 | 10.20.0.1 – 10.20.0.254 | 10.20.0.255 | 254 |
| B | 120 | 10.20.1.0/25 | 255.255.255.128 | 10.20.1.1 – 10.20.1.126 | 10.20.1.127 | 126 |
| C | 60 | 10.20.1.128/26 | 255.255.255.192 | 10.20.1.129 – 10.20.1.190 | 10.20.1.191 | 62 |
| D | 25 | 10.20.1.192/27 | 255.255.255.224 | 10.20.1.193 – 10.20.1.222 | 10.20.1.223 | 30 |
| E | 10 | 10.20.1.224/28 | 255.255.255.240 | 10.20.1.225 – 10.20.1.238 | 10.20.1.239 | 14 |
Each subnet begins exactly where the previous one ended — no gaps, no overlaps — and each start is a clean multiple of its block size. Free for growth: 10.20.1.240 – 10.20.3.255 (one /28 plus all of 10.20.2.0/23 — 528 addresses, over half the parent block).
Design exercises
- What is the smallest prefix (longest /n) that fits 50 hosts, and how many usable addresses does it give?
- Pick the right prefix for each requirement: (a) a 2-host router-to-router link, (b) 20 hosts, (c) 500 hosts, (d) 1,000 hosts.
- Split 192.168.8.0/24 into four equal subnets. List each subnet's network ID, broadcast, and host capacity.
- From 172.16.40.0/23, allocate largest-first for three groups: 250, 100, and 40 hosts. Show the allocation table and what remains free.
- A branch office owns 192.168.64.0/26. It needs three VLANs: 25 hosts, 10 hosts, and a 2-host router link. Does everything fit? Produce the allocation.
- Overlap detection. A junior admin proposes, inside 10.50.0.0/16 — Sales 10.50.16.0/20 · Engineering 10.50.24.0/21 · Guest 10.50.32.0/20 · Servers 10.50.30.0/24. Find every overlap and propose a corrected plan that keeps all four sizes.
- Growth planning. You hold 172.20.0.0/23 and need four subnets of up to 100 hosts each today; each is expected to double within three years. Show why the obvious plan fails after the doubling and what you should request instead.
- Full design. Plan 192.168.0.0/23 for: wired staff 180, Wi-Fi 120, VoIP phones 60, servers 20, management 10, plus two 2-host router links. Allocate largest-first; show the table and the leftover space.
Answer key
1. 50 hosts → 2^5 − 2 = 30 is too small, 2^6 − 2 = 62 fits → /26, 62 usable addresses.
2. (a) /30 (2 usable) · (b) /27 (30; a /28's 14 is too small) · (c) /23 (510; a /24's 254 is too small) · (d) /22 (1,022).
3. Four equal parts = borrow 2 bits → /26, block 64:
| Subnet | Broadcast | Capacity |
|---|---|---|
| 192.168.8.0/26 | 192.168.8.63 | 62 |
| 192.168.8.64/26 | 192.168.8.127 | 62 |
| 192.168.8.128/26 | 192.168.8.191 | 62 |
| 192.168.8.192/26 | 192.168.8.255 | 62 |
4. Sizing: 250 → /24 · 100 → /25 · 40 → /26. Parent 172.16.40.0/23 spans 172.16.40.0 – 172.16.41.255:
| Need | Subnet | Usable hosts | Broadcast | Capacity |
|---|---|---|---|---|
| 250 | 172.16.40.0/24 | 172.16.40.1 – 172.16.40.254 | 172.16.40.255 | 254 |
| 100 | 172.16.41.0/25 | 172.16.41.1 – 172.16.41.126 | 172.16.41.127 | 126 |
| 40 | 172.16.41.128/26 | 172.16.41.129 – 172.16.41.190 | 172.16.41.191 | 62 |
Free: 172.16.41.192/26 (62 usable addresses).
5. Sizing: 25 → /27 (32 addresses) · 10 → /28 (16) · 2 → /30 (4). Total 32 + 16 + 4 = 52 ≤ 64 → it fits:
| Need | Subnet | Usable hosts | Broadcast |
|---|---|---|---|
| 25 | 192.168.64.0/27 | 192.168.64.1 – 192.168.64.30 | 192.168.64.31 |
| 10 | 192.168.64.32/28 | 192.168.64.33 – 192.168.64.46 | 192.168.64.47 |
| 2 | 192.168.64.48/30 | 192.168.64.49 – 192.168.64.50 | 192.168.64.51 |
Free: 192.168.64.52 – 192.168.64.63 (12 addresses — one /30 at .52 plus one /29 at .56).
6. Write each block's range first — overlaps become obvious:
- Sales 10.50.16.0/20 → 10.50.16.0 – 10.50.31.255
- Engineering 10.50.24.0/21 → 10.50.24.0 – 10.50.31.255 → entirely inside Sales (overlap 1)
- Guest 10.50.32.0/20 → 10.50.32.0 – 10.50.47.255 → clean against Sales
- Servers 10.50.30.0/24 → 10.50.30.0 – 10.50.30.255 → **inside Sales and inside Engineering** (overlaps 2 and 3)
One corrected plan (same sizes, packed cleanly):
| Dept | Subnet | Range |
|---|---|---|
| Sales | 10.50.16.0/20 | 10.50.16.0 – 10.50.31.255 |
| Guest | 10.50.32.0/20 | 10.50.32.0 – 10.50.47.255 |
| Engineering | 10.50.48.0/21 | 10.50.48.0 – 10.50.55.255 |
| Servers | 10.50.56.0/24 | 10.50.56.0 – 10.50.56.255 |
7. Today: 100 hosts → /25 (126). Four /25s = 4 × 128 = 512 addresses — the entire /23 with zero spare: already a red flag. After doubling: 200 hosts > 126 → every subnet outgrows its /25. 200 needs /24 (254), and four /24s = 1,024 addresses = a /22. Request 172.20.0.0/22 and allocate 172.20.0.0/24, 172.20.1.0/24, 172.20.2.0/24, 172.20.3.0/24. Design lesson: size for the network you will have, not the one you have today.
8. Sizing: 180 → /24 · 120 → /25 · 60 → /26 · 20 → /27 · 10 → /28 · 2 → /30 (twice). Largest-first from 192.168.0.0:
| Segment | Need | Subnet | Usable hosts | Broadcast | Capacity |
|---|---|---|---|---|---|
| Wired staff | 180 | 192.168.0.0/24 | 192.168.0.1 – 192.168.0.254 | 192.168.0.255 | 254 |
| Wi-Fi | 120 | 192.168.1.0/25 | 192.168.1.1 – 192.168.1.126 | 192.168.1.127 | 126 |
| VoIP | 60 | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 | 62 |
| Servers | 20 | 192.168.1.192/27 | 192.168.1.193 – 192.168.1.222 | 192.168.1.223 | 30 |
| Management | 10 | 192.168.1.224/28 | 192.168.1.225 – 192.168.1.238 | 192.168.1.239 | 14 |
| Link 1 | 2 | 192.168.1.240/30 | 192.168.1.241 – 192.168.1.242 | 192.168.1.243 | 2 |
| Link 2 | 2 | 192.168.1.244/30 | 192.168.1.245 – 192.168.1.246 | 192.168.1.247 | 2 |
Allocated: 256 + 128 + 64 + 32 + 16 + 4 + 4 = 504 of 512. Leftover: 192.168.1.248/29 (8 addresses, 6 usable) — thin growth room; flag it.
Network Essentials · Module 4 · Turning Point Academy — backbone: Al-Doori, Network Essentials, Ch. 6.