Course contents

Chapter 2: IP Subnetting and VLSMLesson 6 of 8

Network, broadcast and usable hosts

Four practical questions built on the method: is it usable, is it local, how big must it be, and how many fit.

Intermediate · 8 min read · Before this: Harder examples: /20 and /27

1. Can this address be given to a device?

Find the subnet with the five steps. If the address is the network address (all host bits 0) or the broadcast address (all host bits 1), it can't be assigned. Anything between them can.

Diagram
1. Can this address be given to a device?
1. Can this address be given to a device?
AddressSubnetVerdict
192.168.1.127/25192.168.1.0/25Broadcast: not usable
192.168.1.128/25192.168.1.128/25Network: not usable
172.16.32.0/20172.16.32.0/20Network: not usable
172.16.33.0/20172.16.32.0/20Usable: a host address that ends in .0
172.16.40.255/20172.16.32.0/20Usable: a host address that ends in .255
Read each row across: the left box names the item, the others describe it.

Don't judge by the last octet. In subnets larger than a /24, addresses ending in .0 or .255 can be ordinary hosts. Only the whole address tells you.

2. Are two hosts on the same subnet?

Work out the network address of each, using the mask of the host doing the sending. Same network address: the host sends directly (ARP for the destination). Different: it sends to its default gateway.

Try: 10.1.1.20/28 sends to 10.1.1.33. Direct, or via the gateway?

Show the worked answer
Worked answer for 10.1.1.20/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 0, 16, 32, 48, ….
3. Network20 falls in the block that starts at 16. Network: 10.1.1.16
4. BroadcastThe next block starts at 32, so this one ends at 31. Broadcast: 10.1.1.31
5. Usable range and hosts10.1.1.17 to 10.1.1.30: 24 − 2 = 14 hosts

The sender's subnet ends at .31, so 10.1.1.33 is in another subnet (10.1.1.32/28). The PC sends the frame to its default gateway.

Because each host uses its own mask for this test, a host with the wrong mask can reach some neighbours directly and fail to reach others. When only part of a subnet answers, compare the masks on both ends before looking anywhere else.

Learn more: Different-Subnet Communication

3. Which prefix fits N hosts?

Find the smallest number of host bits h where 2h − 2 is at least N. The prefix is 32 − h.

Hosts neededHost bitsUsablePrefix
222/30
20530/27
62662/26
637126/25
2008254/24
5009510/23

Note the jump from 62 to 63: a /26 holds exactly 62 hosts, so one more device means doubling to a /25. In a real design, count the gateway (it uses an address too) and leave room to grow.

4. How many subnets fit in a block?

Subtract the prefixes and raise 2 to that power. A /24 holds 227 − 24 = 8 subnets of /27. A /16 holds 224 − 16 = 256 subnets of /24. A /22 holds 230 − 22 = 256 point-to-point /30s.

Point-to-point links and single hosts: /30, /31 and /32

Diagram
Point-to-point links and single hosts: /30, /31 and /32
Point-to-point links and single hosts: /30, /31 and /32
PrefixAddressesUsableUse
/3042Router-to-router link: network, two routers, broadcast
/3122Point-to-point link with no network or broadcast address (RFC 3021)
/3211A loopback interface or a route to one host
Read each row across: the left box names the item, the others describe it.

Test yourself on usable and reserved addresses

Predict · scenario 1

A technician wants to give a printer 192.168.1.127 with mask 255.255.255.128. Will it work?

Predict · scenario 2

Can 172.16.33.0/20 be assigned to a host?

Predict · scenario 3

A VLAN needs 120 hosts now and 150 within a year. Which is the smallest prefix that fits the growth?

Predict · scenario 4

How many /30 links can you make from 10.0.0.0/24?

Drilling the four questions

In the subnetting practice drill, tick Prefix for N hosts and Usable hosts to drill sizing, and Network address and Broadcast address for the first two questions.

Learn more: VLSM for a Real Office