Right-Sizing
Lesson 33 of 46 in Coddy's IP Addressing and Subnetting course.
Network design starts with one question per team: what is the smallest subnet that fits N machines? Find the smallest number of host bits where 2h - 2 is at least N, then the prefix is 32 - h.
For 50 hosts: 5 bits give 30 (too small), 6 bits give 62 (fits), so a /26. For 200 hosts: 7 bits give 126, 8 give 254, so a /24.
Always leave the minus two in the math. Forgetting it is how someone orders a /26 for exactly 63 machines and discovers the last one has no address.
Challenge
EasyPrint the smallest prefix (with slash) that fits each requirement, one per line, in this order:
- 50 hosts
- 200 hosts
- 2 hosts
Expected output:
/26
/24
/30Try it yourself
All lessons in IP Addressing and Subnetting
10Capstone - The Office
The Floor PlanSizing Each TeamCarving the BlockThe Router's ViewRecap - Ship the Plan8Planning Networks
Right-SizingVLSM Step by StepAllocation OrderChecking for OverlapRecap - Plan a NetworkPractice on your own: Terminal playground