Usable Hosts
Lesson 21 of 46 in Coddy's IP Addressing and Subnetting course.
Since the network and broadcast addresses are reserved, the number of machines a subnet can actually hold is 2host bits - 2.
A /26 has 6 host bits: 64 total, 62 usable. A /29 has 3: 8 total, 6 usable. The classic /24 has 8: 256 total, 254 usable.
The minus two hurts most in tiny subnets: a /30 spends half its four addresses on overhead. That is why point-to-point links are the only place you normally see one.
Challenge
BeginnerPrint the number of usable host addresses in a /26, a /29, and a /24, one per line, in that order.
Expected output:
62
6
254Try it yourself
All lessons in IP Addressing and Subnetting
10Capstone - The Office
The Floor PlanSizing Each TeamCarving the BlockThe Router's ViewRecap - Ship the PlanPractice on your own: Terminal playground