Each example gives a situation and an address. Try it before opening the worked answer: the point is to practise the steps, not to read them.
Example 1: /24, a typical user VLAN
A help-desk ticket says a user's PC is 10.1.5.77/24. Which subnet is it in, and how many devices can that subnet hold?
Show the worked answer
| Step | Working |
|---|---|
| 1. Write the mask | /24 = 255.255.255.0. The mask ends exactly after the 3rd octet. |
| 2. Network | Keep the first 3 octets, set the rest to 0: 10.1.5.0. |
| 3. Broadcast | Keep the first 3 octets, set the rest to 255: 10.1.5.255. |
| 4. Usable range | 10.1.5.1 to 10.1.5.254 |
| 5. Usable hosts | 8 host bits: 28 − 2 = 254 |
A /24 ends exactly on an octet boundary, so no block size is needed: the first three octets are the network, the 4th numbers the hosts.
Example 2: /25, splitting a /24 in half
An office splits 172.16.20.0/24 into two /25s: one for staff, one for phones. A phone has 172.16.20.200/25. Which half is it in?
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 | 200 falls in the block that starts at 128. Network: 172.16.20.128 |
| 4. Broadcast | The next block starts at 256, so this one ends at 255. Broadcast: 172.16.20.255 |
| 5. Usable range and hosts | 172.16.20.129 to 172.16.20.254: 27 − 2 = 126 hosts |
Borrowing one bit from a /24 gives 21 = 2 subnets:
| Subnet | Network | Usable range | Broadcast |
|---|---|---|---|
| 1 | 172.16.20.0/25 | 172.16.20.1 – 172.16.20.126 | 172.16.20.127 |
| 2 | 172.16.20.128/25 | 172.16.20.129 – 172.16.20.254 | 172.16.20.255 |
Example 3: /26, four floors
A building has four floors and splits 192.168.50.0/24 into four /26s, one per floor. A printer is at 192.168.50.130/26. Which floor's subnet is it in?
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 | 130 falls in the block that starts at 128. Network: 192.168.50.128 |
| 4. Broadcast | The next block starts at 192, so this one ends at 191. Broadcast: 192.168.50.191 |
| 5. Usable range and hosts | 192.168.50.129 to 192.168.50.190: 26 − 2 = 62 hosts |
It is the third /26, so the third floor in this plan.
Borrowing two bits gives 22 = 4 subnets of 64 addresses:
| Subnet | Network | Usable range | Broadcast |
|---|---|---|---|
| 1 | 192.168.50.0/26 | 192.168.50.1 – 192.168.50.62 | 192.168.50.63 |
| 2 | 192.168.50.64/26 | 192.168.50.65 – 192.168.50.126 | 192.168.50.127 |
| 3 | 192.168.50.128/26 | 192.168.50.129 – 192.168.50.190 | 192.168.50.191 |
| 4 | 192.168.50.192/26 | 192.168.50.193 – 192.168.50.254 | 192.168.50.255 |
💡 Pattern: each bit you borrow doubles the number of subnets and halves their size. /24 → one subnet of 256; /25 → two of 128; /26 → four of 64.
Your turn
1. A laptop has 192.168.50.20/26. Is it on the same subnet as the printer in Example 3?
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 | 20 falls in the block that starts at 0. Network: 192.168.50.0 |
| 4. Broadcast | The next block starts at 64, so this one ends at 63. Broadcast: 192.168.50.63 |
| 5. Usable range and hosts | 192.168.50.1 to 192.168.50.62: 26 − 2 = 62 hosts |
No. The laptop is in 192.168.50.0/26 and the printer in 192.168.50.128/26, so the laptop reaches the printer through its default gateway.
2. 10.200.3.127/25: what kind of address is it?
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 | 127 falls in the block that starts at 0. Network: 10.200.3.0 |
| 4. Broadcast | The next block starts at 128, so this one ends at 127. Broadcast: 10.200.3.127 |
| 5. Usable range and hosts | 10.200.3.1 to 10.200.3.126: 27 − 2 = 126 hosts |
10.200.3.127 is the broadcast address of 10.200.3.0/25, so it can't be given to a device.
Check yourself
192.168.50.0/24 is split into /26s. How many subnets do you get, and how many usable hosts in each?
Which address is usable in 172.16.20.128/25?
A PC is 192.168.50.100/26 and its gateway is 192.168.50.65. Is the gateway in the PC's subnet?
Practise
Do the subnetting practice drill on Easy (/24 to /30, last octet only) until each answer takes under a minute, then move on to the harder examples.
Learn more: Harder Examples: /20 and /27