Given 192.168.10.77/27, find the network address, broadcast address and host range.
A /27 has blocks of 32 addresses. 77 falls in the block starting at 64, so network is 192.168.10.64, broadcast is 192.168.10.95, and usable hosts are .65 to .94 (30 hosts).
Explain it simply
Cut the last octet (0 to 255) into equal blocks. The prefix tells you the block size. Find which block your address sits in; the first address of the block is the network and the last is the broadcast.
Example
/27 -> 5 host bits -> block size = 2^5 = 32
mask = 255.255.255.224 (256 - 32 = 224)
Blocks in last octet: 0, 32, 64, 96, 128, 160, 192, 224
77 lies between 64 and 96 -> block 64
Network 192.168.10.64
Broadcast 192.168.10.95 (96 - 1)
Hosts 192.168.10.65 to 192.168.10.94 (30 usable)Quick check with binary: 77 is 01001101. Keep the first three bits (010) and zero the rest: 01000000 = 64. Set the rest to ones: 01011111 = 95. Matches.
Another one: 172.16.45.200/20. The block size is in the third octet: 256 - 240 = 16. 45 lies in block 32 (32 to 47). Network 172.16.32.0, broadcast 172.16.47.255, and 2^12 - 2 = 4094 usable hosts.
What to say in the interview
"I find the block size from the prefix, locate which multiple of it the address falls under for the network address, subtract one from the next block start for broadcast, and everything between is host range. Here it is .64, .95, and .65 to .94."
Common mistakes
- Using 77 as the network address because it is the number given.