Worked example: 172.16.45.130/27
This is the method every answer in the trainer uses. It works for any prefix, not only the last octet.
- /27 is 27 ones: the mask is 255.255.255.224. The 4th octet is the interesting one.
- Block size = 256 − 224 = 32, so networks start at 0, 32, 64, 96, 128 …
- 130 ÷ 32 = 4 remainder 2, so the block starts at 4 × 32 = 128.
- Network 172.16.45.128, broadcast 128 + 32 − 1 = 172.16.45.159.
- Usable hosts 172.16.45.129 to 172.16.45.158: 30 addresses.
Common mistakes the trainer catches
- Off-by-one on the broadcast. The broadcast is the next network minus one: for a .128 block of 32 it is .159, not .160. This is the most common wrong answer in the trainer.
- Working in the wrong octet. For a /20 the block size (16) applies to the third octet. The fourth octet of the broadcast is always 255.
- Forgetting the 2 reserved addresses. A /26 has 64 addresses but only 62 usable hosts, so 63 hosts need a /25.
- VLSM in the wrong order. Placing a small subnet first can leave the big one misaligned or not fitting at all. Always go largest first.
- Using :: twice in IPv6. The double colon can appear only once, otherwise the address is ambiguous.
FAQ
Is this enough to pass the CCNA subnetting questions?
The CCNA level uses the same kinds of questions as the exam: find the network, broadcast and host range, convert masks, pick the right subnet and plan VLSM. Aim to answer them correctly in under a minute with timer mode on, then you are ready for that part of the exam.
Where are my scores saved?
In your browser's local storage on this device only. There is no account and nothing is sent to a server. Clearing your browser data or pressing 'Reset my stats' removes them.
How does 'Review my mistakes' work?
Every question you get wrong is saved by its exact numbers. Review mode asks those same questions again. A question leaves the list once you answer it correctly; if you miss it again it goes to the back of the queue.
Can I type a mask instead of a prefix?
Yes. Wherever a prefix is asked, /26, 26 and 255.255.255.192 are all accepted. Host counts can include commas, and IPv6 network answers can be written in any valid form, except in the shortening questions where the exact RFC 5952 form is the point.
What does a /31 question expect?
A /31 has no network or broadcast address (RFC 3021), so both addresses are usable on a point-to-point link. The Advanced level includes /31 questions; enter the lower address as the first host and the higher one as the last.