Subnetting from zero · Step 4 of 4
Count the hosts in a subnet
You can already split network from host and AND an address against its mask. Last move: turn those host bits into a headcount.
Question 1 of 3
In a /24, the mask uses 24 bits for the network — leaving 8 host bits. How many total addresses do those 8 host bits cover?
You said: 8 — one per host bit
Not quiteYou chose the bit count itself, but each bit doubles the options. h host bits give 2^h addresses, so 8 bits = 2^8 = 256 total addresses, not 8.
You said: 256 — that's 2^8
ExactlyExactly. Each host bit doubles the range, so 8 bits cover 2^8 = 256 addresses. That's every value the host part can take, from all-zeros to all-ones.
You said: 255 — the highest value a byte can hold
CloseClose, but you counted values, not the count. 8 bits run 0 through 255 — that's 256 distinct addresses, because you include 0. The formula is 2^8 = 256.
You said: I'm not sure
No worriesThe answer is 256. The rule: h host bits give 2^h addresses. With 8 host bits that's 2^8 = 256, counting from all-zeros up to all-ones.
Another way to see it
Think of the host bits as an odometer. With 8 wheels each showing 0 or 1, the odometer rolls through every combination from 00000000 to 11111111 — that's 2^8 = 256 settings, so 256 addresses.
256 addresses total — but two of them are reserved and can't go on a machine. That's the catch.
Question 2 of 3
Of those 256 addresses, two can't be assigned to a real machine. Which two are reserved?
You said: The network address (all host bits 0) and the broadcast address (all host bits 1)
ExactlyRight. The all-zeros host part names the subnet itself; the all-ones host part is the broadcast. Neither can belong to a single machine, so you subtract 2 from the total.
You said: The first and second usable addresses — they go to the router
Not quiteA router does take an address, but it's a normal usable one. The two that are reserved are the all-zeros host part (the network address) and the all-ones host part (broadcast).
You said: The lowest and highest values, but only because convention says so — you could use them
CloseIt is the lowest and highest, but it's not just convention. The all-zeros host part names the subnet itself and the all-ones host part is the broadcast — both have a job, so they can't be a host.
You said: I'm not sure
No worriesIt's the all-zeros host part (the network address, naming the subnet) and the all-ones host part (the broadcast address). Both are reserved, so you subtract 2 from the total.
So the full recipe is: 2^h total, minus 2 reserved. Now run it end to end.
Question 3 of 3
A /26 mask leaves 6 host bits. How many machines can actually be assigned addresses in that subnet?
You said: 62 — that's 2^6 minus 2
ExactlyExactly. 6 host bits give 2^6 = 64 total addresses; drop the network and broadcast and you get 64 - 2 = 62 usable hosts. That's the whole loop: host bits to powers of two to a headcount.
You said: 64 — that's 2^6
Not quite64 is the total address count, but two never go on a machine. Subtract the network and broadcast addresses: 64 - 2 = 62 usable hosts.
You said: 58 — 2^6 minus 2, then minus the 4 extra hosts the mask took
CloseYou subtract exactly 2, and nothing more. The mask already set the host part to 6 bits, so the count is 2^6 = 64 total, minus the network and broadcast = 62 usable hosts. No further subtraction.
You said: I'm not sure
No worriesIt's 62. Take the host bits to a power of two, then subtract 2: 2^6 = 64 total addresses, minus the network and broadcast addresses = 62 usable hosts.
The takeaway
h host bits give 2^h total addresses; subtract 2 (the network address and the broadcast address) for usable hosts. A /24 has 8 host bits: 256 total, 254 usable. Find the host bits and counting machines is just powers of two minus 2.
The pattern
You now have the full mechanical chain of subnetting in your hands: you can see an IPv4 address as 32 binary bits, lay a subnet mask over it to split network from host, bitwise-AND the two to find the network address, and count usable hosts as 2^h minus 2. That's the core loop every subnetting question is built on — VLSM, finding broadcast addresses, carving one network into many, and CIDR notation are all just repeated applications of these four moves. From here, hand off to the tutor to drill real scenarios: given an address and a mask, find the network, broadcast, and host range; design subnets to fit a required host count; and build the speed and pattern-recognition the CCNA and Network+ exams expect.
That's one thread. The real tutor doesn't stop here — it remembers what connected for you and keeps building the map, at your pace or against your deadline.
Or make it about your topic:
The real tutor would keep building this with you, step by step, and remember where you are.
Or make it about your topic:
No shame in this
Still fuzzy after two angles? That's the exact moment the real tutor is built for — it works out which step is tripping you, re-explains from a direction that fits how you think, and checks you've actually got it before moving on. This preview can't adapt to you. The tutor does.