Subnetting for CCNA: the block-size method, with worked answers
To subnet fast, find the interesting octet, work out the block size as 256 minus the mask value in that octet, and then locate the block your address sits in. The block start is the network address, the next block minus one is the broadcast, and everything between is usable. Practise until any address takes under a minute.
Subnetting is the one skill in CCNA that you cannot fake and cannot cram. The good news is that it is also the one that improves fastest with short daily drills.
Why it matters
Subnetting sits inside the largest v2.0 domain, network infrastructure and connectivity, which carries 25 per cent of the exam. If you cannot subnet an address without a calculator, add hours before doing anything else. By the end of your plan you should be able to subnet any address in under a minute.
The three facts you need
- Host bits. A /26 leaves 6 host bits, because 32 minus 26 is 6.
- Hosts in a subnet. 2 to the power of the host bits, minus 2 for the network and broadcast addresses.
- Block size. In the octet where the mask changes, block size is 256 minus the mask value in that octet.
Common block sizes in the last octet:
| Prefix | Mask (last octet) | Block size | Usable hosts |
|---|---|---|---|
| /25 | 128 | 128 | 126 |
| /26 | 192 | 64 | 62 |
| /27 | 224 | 32 | 30 |
| /28 | 240 | 16 | 14 |
| /29 | 248 | 8 | 6 |
| /30 | 252 | 4 | 2 |
The method in four steps
- Find the interesting octet, the one where the mask is neither 0 nor 255.
- Compute the block size.
- Count up in blocks until you find the block that holds your address.
- The block start is the network address. The next block start minus one is the broadcast. The addresses between them are usable.
Worked example 1: how many hosts?
How many usable hosts does 192.168.10.0/26 provide?
A /26 leaves 6 host bits. Two to the power of 6 is 64 addresses, minus the network and broadcast addresses, gives 62.
Worked example 2: the gateway
A host has 10.1.1.70/27. The gateway uses the first usable address in the subnet. What is it?
A /27 has blocks of 32. The blocks run 0, 32, 64, 96. The host sits in the block from 64 to 95. The network is 10.1.1.64, the broadcast is 10.1.1.95, and the first usable address is 10.1.1.65.
Worked example 3: a wider mask
What are the network and broadcast addresses for 172.16.45.200/21?
A /21 means the third octet is the interesting one. The mask value there is 248, so the block size is 256 minus 248, which is 8. Count in eights: 40, 48. The value 45 falls in the block from 40 to 47. The network is 172.16.40.0 and the broadcast is 172.16.47.255. Usable addresses run from 172.16.40.1 to 172.16.47.254.
Worked example 4: splitting a network
You need at least 20 hosts per subnet from 192.168.1.0/24. Which prefix?
Twenty hosts need 5 host bits, because 2 to the 5 is 32 and 32 minus 2 is 30. So use /27 (32 minus 5 host bits). That gives eight subnets of 32 addresses, starting at .0, .32, .64 and so on, with 30 usable hosts each.
A daily drill
Five minutes a day beats an hour a week. Write a random address and prefix on a card, solve it without a calculator and check against a subnet tool. Track your time. Aim for a minute, then thirty seconds.
When you miss a question, say which step failed: wrong host-bit count, wrong block size or wrong block. Most errors come from the second.
IPv6 comes along too
v2.0 adds IPv6 addressing and prefix troubleshooting (topic 1.4), including modified EUI-64, in the same domain. Treat IPv4 subnetting as the warm-up, and leave time in Stage C for IPv6 drills.
Start tonight with five addresses on paper.
Questions readers ask
Do I need to subnet without a calculator for CCNA?
What is the quickest way to learn subnetting?
How is a usable host range different from the network range?
This article is independent and is not endorsed by Cisco. Facts change: confirm them on the official page before you act.