Routelearn.net
Course menu

Course 2: IP Subnetting and VLSMLesson 1.4 (4 of 8 in this course)9 of 98 in the CCNA series

Worked examples: /24, /25 and /26

The step-by-step method applied to the three prefixes you will meet most often, each in a real situation.

Intermediate · 8 min read · Before this: A step-by-step method

After this lesson, you can subnet any /24, /25 or /26 address in your head and list every subnet a /24 splits into.

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
Worked answer for 10.1.5.77/24
StepWorking
1. Write the mask/24 = 255.255.255.0. The mask ends exactly after the 3rd octet.
2. NetworkKeep the first 3 octets, set the rest to 0: 10.1.5.0.
3. BroadcastKeep the first 3 octets, set the rest to 255: 10.1.5.255.
4. Usable range10.1.5.1 to 10.1.5.254
5. Usable hosts8 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
Worked answer for 172.16.20.200/25
StepWorking
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 size256 − 128 = 128. In the 4th octet, subnets start at 0, 128.
3. Network200 falls in the block that starts at 128. Network: 172.16.20.128
4. BroadcastThe next block starts at 256, so this one ends at 255. Broadcast: 172.16.20.255
5. Usable range and hosts172.16.20.129 to 172.16.20.254: 27 − 2 = 126 hosts

Borrowing one bit from a /24 gives 21 = 2 subnets:

SubnetNetworkUsable rangeBroadcast
1172.16.20.0/25172.16.20.1 – 172.16.20.126172.16.20.127
2172.16.20.128/25172.16.20.129 – 172.16.20.254172.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
Worked answer for 192.168.50.130/26
StepWorking
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 size256 − 192 = 64. In the 4th octet, subnets start at 0, 64, 128, 192.
3. Network130 falls in the block that starts at 128. Network: 192.168.50.128
4. BroadcastThe next block starts at 192, so this one ends at 191. Broadcast: 192.168.50.191
5. Usable range and hosts192.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:

SubnetNetworkUsable rangeBroadcast
1192.168.50.0/26192.168.50.1 – 192.168.50.62192.168.50.63
2192.168.50.64/26192.168.50.65 – 192.168.50.126192.168.50.127
3192.168.50.128/26192.168.50.129 – 192.168.50.190192.168.50.191
4192.168.50.192/26192.168.50.193 – 192.168.50.254192.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
Worked answer for 192.168.50.20/26
StepWorking
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 size256 − 192 = 64. In the 4th octet, subnets start at 0, 64, 128, 192.
3. Network20 falls in the block that starts at 0. Network: 192.168.50.0
4. BroadcastThe next block starts at 64, so this one ends at 63. Broadcast: 192.168.50.63
5. Usable range and hosts192.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
Worked answer for 10.200.3.127/25
StepWorking
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 size256 − 128 = 128. In the 4th octet, subnets start at 0, 128.
3. Network127 falls in the block that starts at 0. Network: 10.200.3.0
4. BroadcastThe next block starts at 128, so this one ends at 127. Broadcast: 10.200.3.127
5. Usable range and hosts10.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

Predict · scenario 1

192.168.50.0/24 is split into /26s. How many subnets do you get, and how many usable hosts in each?

Predict · scenario 2

Which address is usable in 172.16.20.128/25?

Predict · scenario 3

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