The question
A PC has the address 192.168.1.100/26. Which subnet is it in, and which addresses share that subnet? Every subnetting question, on the exam or at work, comes down to this. The method below answers it in five steps.
The five steps
- Find the interesting octet. Write the mask. The interesting octet is the one that is neither 255 nor 0: that is where the network part ends.
- Work out the block size. 256 minus the mask value in that octet. Subnets start at every multiple of the block size: 0, block, 2 × block, and so on.
- Find the network address. Take the largest multiple of the block size that is not bigger than the address's value in that octet. Octets before it stay the same; octets after it become 0.
- Find the broadcast address. One less than the next multiple. Octets after it become 255.
- Usable range and hosts. From network + 1 to broadcast − 1. Hosts = 2host bits − 2.
The method on 192.168.1.100/26
| Step | Working |
|---|---|
| 1. Find the interesting octet | /26 = 255.255.255.192. The 4th octet is neither 255 nor 0: its mask value is 192. |
| 2. Block size | 256 − 192 = 64. In the 4th octet, subnets start at 0, 64, 128, 192. |
| 3. Network | 100 falls in the block that starts at 64. Network: 192.168.1.64 |
| 4. Broadcast | The next block starts at 128, so this one ends at 127. Broadcast: 192.168.1.127 |
| 5. Usable range and hosts | 192.168.1.65 to 192.168.1.126: 26 − 2 = 62 hosts |
So the PC is in 192.168.1.64/26. Any device from .65 to .126 is on the same subnet and can be reached directly; anything else goes through the default gateway.
Why the block size works
The block size is the value of the last network bit. In a /26 that bit is worth 64, so the network part of the 4th octet can only change in steps of 64. Look at the bits of 100:
Setting every host bit to 0 gives the network address; setting every host bit to 1 gives the broadcast address. The block size method is a shortcut for exactly that, without writing out the binary.
💡 In simple terms: think of a street where houses are grouped into blocks of 64. House 100 is in the block that starts at 64 and ends at 127.
Try it first
Work these out on paper, then open the answer to check each step.
1. 10.10.10.200/26
Show the worked answer
| Step | Working |
|---|---|
| 1. Find the interesting octet | /26 = 255.255.255.192. The 4th octet is neither 255 nor 0: its mask value is 192. |
| 2. Block size | 256 − 192 = 64. In the 4th octet, subnets start at 0, 64, 128, 192. |
| 3. Network | 200 falls in the block that starts at 192. Network: 10.10.10.192 |
| 4. Broadcast | The next block starts at 256, so this one ends at 255. Broadcast: 10.10.10.255 |
| 5. Usable range and hosts | 10.10.10.193 to 10.10.10.254: 26 − 2 = 62 hosts |
2. 192.168.7.37/28
Show the worked answer
| Step | Working |
|---|---|
| 1. Find the interesting octet | /28 = 255.255.255.240. The 4th octet is neither 255 nor 0: its mask value is 240. |
| 2. Block size | 256 − 240 = 16. In the 4th octet, subnets start at …, 16, 32, 48, 64, …. |
| 3. Network | 37 falls in the block that starts at 32. Network: 192.168.7.32 |
| 4. Broadcast | The next block starts at 48, so this one ends at 47. Broadcast: 192.168.7.47 |
| 5. Usable range and hosts | 192.168.7.33 to 192.168.7.46: 24 − 2 = 14 hosts |
3. 172.16.9.130/25
Show the worked answer
| Step | Working |
|---|---|
| 1. Find the interesting octet | /25 = 255.255.255.128. The 4th octet is neither 255 nor 0: its mask value is 128. |
| 2. Block size | 256 − 128 = 128. In the 4th octet, subnets start at 0, 128. |
| 3. Network | 130 falls in the block that starts at 128. Network: 172.16.9.128 |
| 4. Broadcast | The next block starts at 256, so this one ends at 255. Broadcast: 172.16.9.255 |
| 5. Usable range and hosts | 172.16.9.129 to 172.16.9.254: 27 − 2 = 126 hosts |
Common slips
- Working in the wrong octet. For /17 to /23 the interesting octet is the 3rd, not the 4th. Harder examples covers this.
- Rounding up instead of down. The network is the multiple at or below the address, not above it.
- Forgetting the −2. 2h counts every address; usable hosts is two fewer.
Check yourself
For 192.168.1.100/26, what is the block size?
A host is 10.1.1.70 with mask 255.255.255.192. What is its network address?
What is the broadcast address of 192.168.7.37/28?
Practise
Use the method on a few dozen questions in the subnetting practice drill. It shows a worked answer after each one, so you can compare your steps.
Learn more: Worked Examples: /24, /25, /26Subnet Calculator