Lesson 3 of 7
Network, Broadcast and Host Ranges
Give any address and prefix and you can find its subnet in four steps. This is the question you will be asked most, in exams and on the job.
Training is free for members. We are checking whether you are signed in; if you are not, we will take you to sign in and bring you straight back here. Nothing happening? Register or sign in with a code we email you.
The Block Size Method
- Find the interesting octet: the one where the prefix boundary falls. /18 falls in the third octet, /27 in the fourth.
- Work out the block size: 256 minus the mask value in that octet. /18 has 192 in the third octet, so blocks of 64.
- Find the block the address sits in: the largest multiple of the block size that is not more than the address's value in that octet. That is the network address; every octet after it is 0.
- The broadcast is one less than the next block. The usable hosts are everything in between.
Worked Example: 172.18.77.20/18
- /18 falls in the third octet, where the mask is 192, so the block size is 64.
- The third octet of the address is 77. Multiples of 64 are 0, 64, 128, 192, and 64 is the largest not above 77.
- Network address:
172.18.64.0. - The next block starts at 172.18.128.0, so the broadcast is
172.18.127.255. -
Usable hosts:
172.18.64.1to172.18.127.254, 16,382 of them.
Worked Example: 10.53.10.77/27
- /27 falls in the fourth octet, mask 224, so blocks of 32.
- 77 sits between 64 and 96, so the network is
10.53.10.64. -
The broadcast is
10.53.10.95and the usable hosts run from10.53.10.65to10.53.10.94.
Two Exceptions to Know
A /31 has no network or broadcast address: RFC 3021 lets both addresses be used on a
point to point link. A /32 is a single address, used for loopbacks and host routes. Lesson
seven comes back to both.
Practice
5 questions, new each time. Every answer is worked out by the same library as our subnet calculator, so if one looks wrong, check your working first and then tell us.