Routelearn.net
Course menu

Course 2: IP Subnetting and VLSMLesson 1.5 (5 of 8 in this course)10 of 98 in the CCNA series

Harder examples: /20 and /27

The same five steps, in the two places people slip: a mask that ends in the 3rd octet, and small blocks in the 4th.

Intermediate · 8 min read · Before this: Worked examples: /24, /25, /26

After this lesson, you can subnet a /20 by working in the 3rd octet, and subnet a /27 without mixing up neighbouring blocks.

Why /20 feels harder

With prefixes from /17 to /23, the network part ends in the 3rd octet. The whole 4th octet is host bits. The method doesn't change, but you must do the block-size step in the 3rd octet, then fill the 4th octet with 0 (network) or 255 (broadcast).

Each octet: address bits above, mask bits below.Network: 20 bitsHost: 12 bits
/20: 4 network bits in the 3rd octet (mask 240), and all 8 bits of the 4th octet are host bits.

Example 1: /20, a campus building

A campus gives each building a /20. A wireless controller logs a client at 172.16.45.10/20. Which building block is it in, and what is its broadcast address?

Show the worked answer
Worked answer for 172.16.45.10/20
StepWorking
1. Find the interesting octet/20 = 255.255.240.0. The 3rd octet is neither 255 nor 0: its mask value is 240.
2. Block size256 − 240 = 16. In the 3rd octet, subnets start at …, 16, 32, 48, 64, ….
3. Network45 falls in the block that starts at 32. The 4th octet becomes 0. Network: 172.16.32.0
4. BroadcastThe next block starts at 48, so this one ends at 47. The 4th octet becomes 255. Broadcast: 172.16.47.255
5. Usable range and hosts172.16.32.1 to 172.16.47.254: 212 − 2 = 4,094 hosts

The trap: answering 172.16.45.0. That treats the address as a /24. With a /20, the 3rd octet moves in steps of 16, so 45 belongs to the block 32–47.

Example 2: /20, another block

A firewall rule allows 10.20.128.0/20. A server at 10.20.130.5 is blocked. Is the server inside the allowed range?

Show the worked answer
Worked answer for 10.20.130.5/20
StepWorking
1. Find the interesting octet/20 = 255.255.240.0. The 3rd octet is neither 255 nor 0: its mask value is 240.
2. Block size256 − 240 = 16. In the 3rd octet, subnets start at …, 112, 128, 144, 160, ….
3. Network130 falls in the block that starts at 128. The 4th octet becomes 0. Network: 10.20.128.0
4. BroadcastThe next block starts at 144, so this one ends at 143. The 4th octet becomes 255. Broadcast: 10.20.143.255
5. Usable range and hosts10.20.128.1 to 10.20.143.254: 212 − 2 = 4,094 hosts

Yes: 130 is in the block 128–143, so the server is inside 10.20.128.0/20. The rule is not the cause; look elsewhere (for example the rule's order, or the return path).

Example 3: /27, servers

A server VLAN uses /27s. A new server is set to 192.168.10.75/27. Which subnet is it in, and which addresses can its gateway use?

Show the worked answer
Worked answer for 192.168.10.75/27
StepWorking
1. Find the interesting octet/27 = 255.255.255.224. The 4th octet is neither 255 nor 0: its mask value is 224.
2. Block size256 − 224 = 32. In the 4th octet, subnets start at 0, 32, 64, 96, 128, 160, 192, 224.
3. Network75 falls in the block that starts at 64. Network: 192.168.10.64
4. BroadcastThe next block starts at 96, so this one ends at 95. Broadcast: 192.168.10.95
5. Usable range and hosts192.168.10.65 to 192.168.10.94: 25 − 2 = 30 hosts

The gateway must be one of .65 to .94. A gateway of .62, for example, is in the previous block (.32–.63) and would not work.

Example 4: /27, the top block

10.0.0.250/27: which subnet, and what is special about it?

Show the worked answer
Worked answer for 10.0.0.250/27
StepWorking
1. Find the interesting octet/27 = 255.255.255.224. The 4th octet is neither 255 nor 0: its mask value is 224.
2. Block size256 − 224 = 32. In the 4th octet, subnets start at 0, 32, 64, 96, 128, 160, 192, 224.
3. Network250 falls in the block that starts at 224. Network: 10.0.0.224
4. BroadcastThe next block starts at 256, so this one ends at 255. Broadcast: 10.0.0.255
5. Usable range and hosts10.0.0.225 to 10.0.0.254: 25 − 2 = 30 hosts

It is the last /27 in the octet, so its broadcast is .255. The next block would start at 256, which doesn't exist in this octet.

Traps to watch for

  • /20 answered as /24. If the mask has a 3rd octet below 255, the 4th octet is all host bits.
  • Broadcast ending in .255 for the wrong reason. In a /20 the broadcast ends in .255, but the 3rd octet is the end of the block (47 in Example 1), not the address's own 3rd octet.
  • Counting /20 hosts as 24 − 2. The host bits are 32 − 20 = 12, across two octets: 212 − 2 = 4,094.

Check yourself

Predict · scenario 1

What is the network address of 172.16.45.10/20?

Predict · scenario 2

What is the broadcast address of 10.20.130.5/20?

Predict · scenario 3

Two servers are 192.168.10.62/27 and 192.168.10.65/27. Are they in the same subnet?

Predict · scenario 4

How many usable hosts does a /20 have?

Practise

The subnetting practice drill on Medium (/16 to /30) mixes 3rd- and 4th-octet questions like these.

Learn more: Network, Broadcast and Usable Hosts