[ ★ THE ONE TABLE TO MEMORIZE ]
Prefix   Mask (last octet)   Block   Usable hosts
/24      0     (255.255.255.0)   256    254
/25      128                     128    126
/26      192                      64     62
/27      224                      32     30
/28      240                      16     14
/29      248                       8      6
/30      252                       4      2

Q1 — Network & broadcast of 192.168.10.100/27

Find: the network address, broadcast address, and usable host range.

▶ SHOW ANSWER

Work: /27 = mask 255.255.255.224, block size 256 − 224 = 32. Step the fourth octet in 32s: .0, .32, .64, .96, .128. The host .100 lands in the .96 block (covers 96–127).

Answer: network 192.168.10.96, broadcast 192.168.10.127, usable .97 – .126 (30 hosts).

Q2 — Usable hosts in a /26

Find: how many usable host addresses a /26 provides.

▶ SHOW ANSWER

Work: host bits = 32 − 26 = 6, so 2^6 = 64 total addresses. Subtract 2 (network + broadcast).

Answer: 64 − 2 = 62 usable hosts.

Q3 — Subnet mask for a /29

Find: the /29 mask in dotted-decimal, and hosts per subnet.

▶ SHOW ANSWER

Work: /29 sets 29 bits, leaving 3 host bits. The fourth octet is 11111000 = 248. Block size 256 − 248 = 8, so 2^3 − 2 = 6 usable hosts.

Answer: 255.255.255.248, 6 usable hosts per subnet.

Q4 — Which subnet does 172.16.20.75/28 belong to?

Find: the subnet (network + broadcast) containing 172.16.20.75.

▶ SHOW ANSWER

Work: /28 = mask 255.255.255.240, block size 16. Step in 16s: .0, .16, .32, .48, .64, .80. The host .75 is in the .64 block (64–79).

Answer: network 172.16.20.64, broadcast 172.16.20.79, usable .65 – .78.

Q5 — First and last usable host in 192.168.1.192/26

Find: the first and last assignable host addresses.

▶ SHOW ANSWER

Work: /26 block size 64. The .192 block covers 192–255, so the broadcast is .255. First usable = network + 1, last usable = broadcast − 1.

Answer: first 192.168.1.193, last 192.168.1.254.

Q6 — Borrowing 3 bits from a /24

Find: how many subnets you get, and the new prefix.

▶ SHOW ANSWER

Work: subnets = 2^(borrowed bits) = 2^3 = 8. The prefix grows by 3: /24 → /27.

Answer: 8 subnets, each a /27 with 30 usable hosts.

Q7 — Pick a subnet for 50 hosts (VLSM sizing)

Find: the smallest subnet that holds at least 50 hosts.

▶ SHOW ANSWER

Work: need host bits h where 2^h − 2 ≥ 50. 2^5 − 2 = 30 (too small), 2^6 − 2 = 62 (fits). 6 host bits → prefix 32 − 6 = 26.

Answer: a /26 (62 usable hosts). This is the core move in VLSM — see what is VLSM.

Q8 — Convert /22 to a mask and count hosts

Find: the /22 mask in dotted-decimal and usable hosts.

▶ SHOW ANSWER

Work: 22 bits = 255.255.11111100.0 = 255.255.252.0. Host bits = 32 − 22 = 10, so 2^10 − 2 = 1022.

Answer: mask 255.255.252.0, 1022 usable hosts. (Note the subnetting happens in the third octet — block size 256 − 252 = 4 there.)

Q9 — Wildcard mask for 255.255.255.240

Find: the wildcard mask (for an ACL or OSPF statement).

▶ SHOW ANSWER

Work: a wildcard is the inverse of the mask — subtract each octet from 255. 255−255, 255−255, 255−255, 255−240.

Answer: 0.0.0.15. More on this in what is a wildcard mask.

Q10 — Are 192.168.5.130 and 192.168.5.160 in the same /26?

Find: whether both hosts share one /26 subnet.

▶ SHOW ANSWER

Work: /26 block size 64: subnets .0–.63, .64–.127, .128–.191, .192–.255. Both .130 and .160 fall in .128–.191.

Answer: yes — both are in network 192.168.5.128/26 (broadcast .191), so they can talk without a router.

Q11 — Usable hosts on a /30

Find: usable hosts, and why it's used for router links.

▶ SHOW ANSWER

Work: 2 host bits → 2^2 − 2 = 2.

Answer: 2 usable hosts — exactly the two ends of a point-to-point router link, which is why /30 is the classic WAN-link prefix.

Q12 — Magic-number method on 200.100.50.181/26

Find: the network and broadcast for this host.

▶ SHOW ANSWER

Work: /26 block size 64. Steps: .0, .64, .128, .192. Host .181 sits in the .128 block (128–191).

Answer: network 200.100.50.128, broadcast 200.100.50.191, usable .129 – .190.