Routelearn.net
Course menu

Course 2: IP Subnetting and VLSMLesson 1.3 (3 of 8 in this course)8 of 98 in the CCNA series

A step-by-step subnetting method

Five steps that answer every 'which subnet is this address in?' question, with no binary conversion.

Intermediate · 8 min read · Before this: Subnet masks and CIDR

After this lesson, you can find the network address, broadcast address, usable range and host count of any address, using the block size.

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

  1. 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.
  2. 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.
  3. 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.
  4. Find the broadcast address. One less than the next multiple. Octets after it become 255.
  5. Usable range and hosts. From network + 1 to broadcast − 1. Hosts = 2host bits − 2.

The method on 192.168.1.100/26

Worked answer for 192.168.1.100/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. Network100 falls in the block that starts at 64. Network: 192.168.1.64
4. BroadcastThe next block starts at 128, so this one ends at 127. Broadcast: 192.168.1.127
5. Usable range and hosts192.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:

Each octet: address bits above, mask bits below.Network: 26 bitsHost: 6 bits
100 = 01100100. The two network bits in the 4th octet are 01 (= 64). Set the host bits to 0 and you get 64, the network; set them to 1 and you get 127, the broadcast.

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
Worked answer for 10.10.10.200/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. Network200 falls in the block that starts at 192. Network: 10.10.10.192
4. BroadcastThe next block starts at 256, so this one ends at 255. Broadcast: 10.10.10.255
5. Usable range and hosts10.10.10.193 to 10.10.10.254: 26 − 2 = 62 hosts

2. 192.168.7.37/28

Show the worked answer
Worked answer for 192.168.7.37/28
StepWorking
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 size256 − 240 = 16. In the 4th octet, subnets start at …, 16, 32, 48, 64, ….
3. Network37 falls in the block that starts at 32. Network: 192.168.7.32
4. BroadcastThe next block starts at 48, so this one ends at 47. Broadcast: 192.168.7.47
5. Usable range and hosts192.168.7.33 to 192.168.7.46: 24 − 2 = 14 hosts

3. 172.16.9.130/25

Show the worked answer
Worked answer for 172.16.9.130/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. Network130 falls in the block that starts at 128. Network: 172.16.9.128
4. BroadcastThe next block starts at 256, so this one ends at 255. Broadcast: 172.16.9.255
5. Usable range and hosts172.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

Predict · scenario 1

For 192.168.1.100/26, what is the block size?

Predict · scenario 2

A host is 10.1.1.70 with mask 255.255.255.192. What is its network address?

Predict · scenario 3

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