Networking · Worked examples
IPv4 Subnetting Practice: Find the Network, Broadcast and Host Range
To solve an IPv4 subnetting question, find the address block containing the host. Its first address is the network address; its last is the broadcast address. For the ordinary LAN subnets below, the usable host range is everything between them. Start with 192.0.2.150/26: network .128, broadcast .191, usable hosts .129–.190.
These original exercises are for networking students and Network+ learners. They are not official exam questions. Write your answer before opening each solution; a calculator result alone will not show where your reasoning went wrong.
Four steps for a /26 subnet
An IPv4 address has 32 bits. A /26 prefix uses 26 for the network and leaves 6 for hosts: 26 = 64 addresses per block. The mask is 255.255.255.192.
- 1. Find the block size.
In the last octet, 256 − 192 = 64. The blocks start at 0, 64, 128 and 192.
- 2. Locate the host.
150 is between 128 and 191, so the network is 192.0.2.128/26. Do not round 150 to the nearest boundary; find the boundary at or below it.
- 3. Stop before the next block.
The next network starts at .192. One address earlier, 192.0.2.191, is this subnet’s broadcast address.
- 4. Remove the endpoints.
The usable range is 192.0.2.129–192.0.2.190: 64 − 2 = 62 addresses. A gateway normally uses one of these addresses too.
192.0.2.128StartNetwork address192.0.2.129–19062Usable addresses192.0.2.191EndBroadcast addressA small reference table
| Prefix | Mask | Addresses | Usable |
|---|---|---|---|
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
The “subtract two” rule is for conventional broadcast subnets. A /31 can use both addresses on a point-to-point link; a /32 identifies one address. Do not apply this table to IPv6.
Try three subnetting questions
1. Which block contains 198.51.100.77/27?
Find the network, broadcast and usable host range.
Show answer 1
Network: 198.51.100.64/27. Broadcast: 198.51.100.95. Usable: .65–.94. A /27 has 32 addresses. The boundaries are .0, .32, .64, .96 and so on; 77 lies in the .64–.95 block. There are 30 usable addresses.
2. Are 203.0.113.62/27 and 203.0.113.65/27 in the same subnet?
Show answer 2
No. .62 belongs to 203.0.113.32/27, whose broadcast is .63. Address .65 belongs to 203.0.113.64/27, whose broadcast is .95. Matching the first three octets is not enough: the prefix determines the boundary.
3. What changes for 172.16.35.10/20?
The mask is 255.255.240.0. Work in the third octet this time.
Show answer 3
Network: 172.16.32.0/20. Broadcast: 172.16.47.255. Usable: 172.16.32.1–172.16.47.254. The third-octet block size is 256 − 240 = 16. Value 35 is in the 32–47 block, and the entire fourth octet varies. Twelve host bits give 4,096 total addresses and 4,094 conventional usable addresses.
Use the mistake to choose your next step
- Right block, wrong host count: distinguish total addresses from usable addresses.
- Off by one: the next network starts after the broadcast, not at it.
- A /20 treated like a /27: find the octet where the mask changes before counting blocks.
- Correct guess: explain the boundary without looking at the choices, then change the host address and try again.
Keep a three-column note: “my answer / correct boundary / rule I missed”. For broader study planning, see current certification versions and practice sets.
Check the underlying rules
Cisco: IPv4 addressing, subnetting and special subnets · RFC 3021: /31 point-to-point links · CompTIA Network+ N10-009 objectives
The 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 examples use documentation address ranges. The /20 example uses private address space.
Also studying SQL in Korean? Read our SQLD CBT 공부법 for a worked review exercise.