Questions? Call 1.800.716.8955

PASS the CCNA: Complete Study Guide

Subnetting Drills (100 Problems)

This appendix is a workout, not a lesson. Chapters 6 through 9 taught the methods; here you build speed. The 100 problems are grouped by type and mixed in difficulty, covering every octet from /8 to /32, VLSM, summarization, wildcard masks and a set of IPv6 notation drills. Work them with only pencil and paper, as you will in the exam. A reasonable target is 15–20 seconds for a network/broadcast problem and under a minute for VLSM and summarization problems. Every answer in the key at the end was generated and verified programmatically with Python's ipaddress module.

Tip

Before you start each session, write the two reference rows from memory: place values 128 64 32 16 8 4 2 1 and mask values 128 192 224 240 248 252 254 255. Time yourself on each section and re-do the ones you miss a week later.

Table B-1 Quick reference: prefix, mask and block size in the interesting octet /8 = 255.0.0.0

Smallest h with 2^h − 2 ≥ hosts; smallest s with 2^s ≥ subnets VLSM: sort largest first, allocate on block boundaries

Write the differing octet in binary, count common bits

wildcard = 255.255.255.255 − mask (block size − 1)

Figure B-1 Which method to use for each type of drill.

Table B-2 Progress tracker: record your score and time for each attempt

  • Section Problems Target time Attempt 1 Attempt 2 Attempt 3
  • B.1 Network, broadcast, range 1–30 10 min
  • B.2 Hosts to prefix 31–40 2 min
  • B.3 Subnets to prefix 41–50 3 min
  • B.4 VLSM 51–58 8 min
  • B.5 Summarization 59–70 8 min
  • B.6 Wildcard masks 71–80 3 min
  • B.7 Same subnet, valid host 81–90 4 min
  • B.8 IPv6 91–100 5 min
  • B.1 Network, Broadcast and Host Range (1–30)

For each address, find the network ID, broadcast address, first and last usable host, and the number of usable hosts. The table is laid out as a worksheet: fill in the blanks, then check the key.

Example. 172.16.59.200/20: the interesting octet is the third (mask 240), block 16; 48 ≤ 59 < 64, so the network is 172.16.48.0 and the broadcast 172.16.63.255. Usable 172.16.48.1– 172.16.63.254, 2

12 − 2 = 4,094 hosts.

Table B-3 Problems 1–30 (worksheet)

Give the longest prefix (smallest subnet) that supports at least the stated number of usable hosts, and the mask.

Example. 200 hosts: 2

7 − 2 = 126 is too small, 28 − 2 = 254 fits, so h = 8 and the prefix is /24 (255.255.255.0).

Table B-4 Problems 31–40

  • 31. 500 hosts 32. 126 hosts 33. 12 hosts 34. 5 hosts 35. 127 hosts
  • 36. 1000 hosts 37. 100 hosts 38. 58 hosts 39. 30 hosts 40. 31 hosts B.3 Subnets Required to Prefix (41–50)

Give the prefix that provides at least the stated number of equal subnets while leaving the most hosts in each, and the resulting number of usable hosts per subnet.

  • Example. 172.16.0.0/16 needing 20 subnets: 2
  • 5 = 32 ≥ 20, so borrow 5 bits: /21
  • (255.255.248.0), 2

11 − 2 = 2,046 hosts per subnet.

  • 41. 10.0.0.0/8: 50 subnets
  • 42. 172.16.0.0/16: 8 subnets
  • 43. 192.168.10.0/24: 5 subnets
  • 44. 172.20.0.0/16: 300 subnets
  • 45. 10.0.0.0/8: 2000 subnets
  • 46. 192.168.1.0/24: 12 subnets
  • 47. 172.31.0.0/16: 60 subnets
  • 48. 10.100.0.0/16: 30 subnets
  • 49. 192.168.50.0/24: 3 subnets
  • 50. 10.0.0.0/8: 100 subnets

B.4 VLSM Allocation (51–58)

Allocate each block largest-first, starting at the beginning of the block, and give the subnet assigned to each segment. (Equal-sized segments are allocated in the order listed.) Example. 192.168.10.0/24 with A = 100, B = 50, C = 20 and D = 2 hosts gives A /25, B /26, C /27 and D /30, allocated back to back as Figure B-2 shows.

  • A: 192.168.10.0/25 B: 192.168.10.128/26 C
  • C: 192.168.10.192/27 · D: 192.168.10.224/30 · free .228–.255
  • .0 .128 .192 .224 .256

Figure B-2 VLSM example: 192.168.10.0/24 allocated largest first, drawn to scale.

  • 51. 192.168.1.0/24: A = 60 hosts, B = 25 hosts, C = 10 hosts, D = 2 hosts
  • 52. 10.1.0.0/23: A = 200 hosts, B = 100 hosts, C = 50 hosts, D = 2 hosts
  • 53. 172.16.8.0/22: A = 500 hosts, B = 200 hosts, C = 2 hosts, D = 2 hosts
  • 54. 192.168.100.0/24: A = 100 hosts, B = 50 hosts, C = 20 hosts, D = 2 hosts
  • 55. 10.50.4.0/22: A = 300 hosts, B = 120 hosts, C = 60 hosts, D = 12 hosts
  • 56. 172.20.32.0/24: A = 70 hosts, B = 30 hosts, C = 14 hosts, D = 6 hosts
  • 57. 10.9.0.0/24: A = 20 hosts, B = 20 hosts, C = 10 hosts, D = 2 hosts
  • 58. 192.168.200.0/25: A = 50 hosts, B = 20 hosts, C = 10 hosts, D = 2 hosts B.5 Route Summarization (59–70)

Give the smallest single summary route that includes all the listed networks. If it is not exact, note the exact set of prefixes.

Example. 10.4.8.0/24 through 10.4.11.0/24: the third octets 8–11 share their first six bits (Figure B-3), so the summary is 10.4.8.0/22, and it is exact because the four networks fill the /22 completely.

  • 10.4.8.0 10.4.00001000.00000000
  • 10.4.9.0 10.4.00001001.00000000
  • 10.4.10.0 10.4.00001010.00000000
  • 10.4.11.0 10.4.00001011.00000000
  • Summary: 10.4.8.0/22 (16 + 6 common bits)

Figure B-3 Summarization example: the first 22 bits match; the last two bits of the third octet vary.

  • 59. 172.16.0.0/24, 172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24
  • 60. 10.1.16.0/24 through 10.1.23.0/24
  • 61. 192.168.32.0/24, 192.168.33.0/24, 192.168.34.0/24, 192.168.35.0/24
  • 62. 172.20.100.0/24, 172.20.101.0/24, 172.20.102.0/24, 172.20.103.0/24
  • 63. 10.10.64.0/24 through 10.10.71.0/24
  • 64. 192.168.1.64/27, 192.168.1.96/27
  • 65. 10.0.4.0/24, 10.0.5.0/24, 10.0.6.0/24, 10.0.7.0/24
  • 66. 172.30.5.0/24, 172.30.6.0/24, 172.30.7.0/24, 172.30.8.0/24
  • 67. 10.32.0.0/16 through 10.47.0.0/16
  • 68. 192.168.10.0/24, 192.168.11.0/24, 192.168.12.0/24, 192.168.13.0/24
  • 69. 10.2.0.0/23, 10.2.2.0/23, 10.2.4.0/23, 10.2.6.0/23
  • 70. 172.18.16.0/22, 172.18.20.0/22, 172.18.24.0/22, 172.18.28.0/22 B.6 Wildcard Masks (71–80)

Give the wildcard mask, or the network address and wildcard an ACL would use to match exactly the range. Example. Mask 255.255.248.0 (/21): 255 − 248 = 7, wildcard 0.0.7.255.

  • 71. Wildcard for mask 255.255.255.224
  • 72. Wildcard for mask 255.255.240.0
  • 73. Wildcard for mask 255.255.255.252
  • 74. Wildcard for mask 255.248.0.0
  • 75. Wildcard for mask 255.255.254.0
  • 76. ACL network + wildcard matching

10.1.64.0 – 10.1.127.255

  • 77. ACL network + wildcard matching

192.168.5.32 – 192.168.5.47

  • 78. ACL network + wildcard matching

172.16.0.0 – 172.31.255.255

  • 79. ACL network + wildcard matching

10.20.30.0 – 10.20.30.255

  • 80. ACL network + wildcard matching

192.168.10.0 – 192.168.11.255

B.7 Same Subnet and Valid Host (81–90)

Decide whether two hosts share a subnet, or whether an address can be assigned to a host. Example. 192.168.1.95/27 is the broadcast of 192.168.1.64/27 (block 32: 64 ≤ 95 < 96), so it is not a valid host.

  • 81. Same subnet? 10.1.1.62/26 and

10.1.1.65/26

  • 82. Same subnet? 172.16.40.1/21 and

172.16.47.254/21

  • 83. Same subnet? 192.168.3.129/25 and

192.168.3.127/25

  • 84. Same subnet? 10.200.0.1/12 and

10.207.255.1/12

  • 85. Same subnet? 172.25.9.200/29 and

172.25.9.206/29

  • 86. Valid host? 172.16.31.255/19
  • 87. Valid host? 10.10.10.0/23
  • 88. Valid host? 192.168.4.127/26
  • 89. Valid host? 10.0.255.255/15
  • 90. Valid host? 192.168.77.80/28

B.8 IPv6 Notation and EUI-64 (91–100)

Shorten using the standard rules (drop leading zeros in each hextet; replace the longest run of all-zero hextets with :: once, the leftmost if tied; use lowercase). Expand to all 32 hex digits. For EUI-64, split the MAC address, insert FFFE in the middle and invert the seventh (universal/local) bit of the first byte. See Chapter 9 and Figure B-4.

  • MAC 00:50:56 ab:cd:ef
  • Split + FFFE 00:50:56 ff:fe ab:cd:ef
  • Flip bit 7 00 = 0000 0000 → 0000 0010 = 02

Address 2001:db8:1:0:0250:56ff:feab:cdef = 2001:db8:1:0:250:56ff:feab:cdef

Figure B-4 EUI-64 example: MAC 00:50:56:ab:cd:ef in 2001:db8:1::/64.

  • 91. Shorten: 2001:0db8:0000:0000:0000:0000:0000:0001
  • 92. Shorten: 2001:0db8:00a0:0000:0000:0b00:0000:0010
  • 93. Shorten: fe80:0000:0000:0000:0210:00ff:fe00:0abc
  • 94. Shorten: 2001:0db8:0000:0001:0000:0000:0000:0000
  • 95. Expand fully: 2001:db8::1:0:0:1
  • 96. Expand fully: fe80::c
  • 97. Expand fully: 2001:db8:acad::a:0:20
  • 98. EUI-64 address for MAC 00:1a:2b:3c:4d:5e in 2001:db8:acad:10::/64
  • 99. EUI-64 address for MAC a4:83:e7:12:34:56 in 2001:db8:1:1::/64
  • 100. EUI-64 address for MAC 02:00:5e:10:00:01 in fe80::/64

B.9 Answer Key

Network answers are given as network ID · broadcast (bc) · usable range · usable hosts.

Table B-5 Answers 1–30: Network, broadcast and host range

# Answer

1 203.112.189.28 · bc 203.112.189.31 · 203.112.189.29–203.112.189.30 · 2 hosts (given address is the broadcast)

octet 4, block 4: 28 ≤ 31 < 32

2 100.142.192.0 · bc 100.142.223.255 · 100.142.192.1–100.142.223.254 · 8,190 hosts octet 3, block 32: 192 ≤ 198 < 224

3 44.142.0.0 · bc 44.143.255.255 · 44.142.0.1–44.143.255.254 · 131,070 hosts octet 2, block 2: 142 ≤ 143 < 144

4 10.0.0.0 · bc 10.255.255.255 · 10.0.0.1–10.255.255.254 · 16,777,214 hosts boundary on octet edge (255.0.0.0)

5 44.220.60.0 · bc 44.220.63.255 · 44.220.60.1–44.220.63.254 · 1,022 hosts octet 3, block 4: 60 ≤ 60 < 64

6 192.168.182.148/32: single host address

7 150.191.8.0 · bc 150.191.15.255 · 150.191.8.1–150.191.15.254 · 2,046 hosts octet 3, block 8: 8 ≤ 15 < 16

8 10.162.156.128 · bc 10.162.156.255 · 10.162.156.129–10.162.156.254 · 126 hosts octet 4, block 128: 128 ≤ 171 < 256

9 203.226.192.0 · bc 203.226.255.255 · 203.226.192.1–203.226.255.254 · 16,382 hosts octet 3, block 64: 192 ≤ 240 < 256

10 203.104.161.192 · bc 203.104.161.223 · 203.104.161.193–203.104.161.222 · 30 hosts octet 4, block 32: 192 ≤ 217 < 224

11 10.30.220.128 · bc 10.30.220.191 · 10.30.220.129–10.30.220.190 · 62 hosts octet 4, block 64: 128 ≤ 149 < 192

12 150.128.0.0 · bc 150.191.255.255 · 150.128.0.1–150.191.255.254 · 4,194,302 hosts octet 2, block 64: 128 ≤ 154 < 192

13 192.168.172.0 · bc 192.168.175.255 · 192.168.172.1–192.168.175.254 · 1,022 hosts octet 3, block 4: 172 ≤ 174 < 176

14 198.183.217.140/31: 198.183.217.140 and 198.183.217.141 both usable (point-to-point) 15 100.96.0.0 · bc 100.127.255.255 · 100.96.0.1–100.127.255.254 · 2,097,150 hosts octet 2, block 32: 96 ≤ 110 < 128

16 203.251.76.96 · bc 203.251.76.99 · 203.251.76.97–203.251.76.98 · 2 hosts (given address is the broadcast)

octet 4, block 4: 96 ≤ 99 < 100

17 172.29.96.0 · bc 172.29.127.255 · 172.29.96.1–172.29.127.254 · 8,190 hosts octet 3, block 32: 96 ≤ 111 < 128

18 192.168.15.96 · bc 192.168.15.127 · 192.168.15.97–192.168.15.126 · 30 hosts octet 4, block 32: 96 ≤ 113 < 128

19 44.25.115.16 · bc 44.25.115.31 · 44.25.115.17–44.25.115.30 · 14 hosts octet 4, block 16: 16 ≤ 29 < 32

20 198.65.24.0 · bc 198.65.25.255 · 198.65.24.1–198.65.25.254 · 510 hosts octet 3, block 2: 24 ≤ 25 < 26

21 203.240.0.0 · bc 203.255.255.255 · 203.240.0.1–203.255.255.254 · 1,048,574 hosts octet 2, block 16: 240 ≤ 249 < 256

22 44.140.60.168 · bc 44.140.60.175 · 44.140.60.169–44.140.60.174 · 6 hosts octet 4, block 8: 168 ≤ 173 < 176

23 10.172.0.0 · bc 10.175.255.255 · 10.172.0.1–10.175.255.254 · 262,142 hosts octet 2, block 4: 172 ≤ 172 < 176

24 192.168.60.0 · bc 192.168.60.255 · 192.168.60.1–192.168.60.254 · 254 hosts boundary on octet edge (255.255.255.0)

25 172.19.0.0 · bc 172.19.255.255 · 172.19.0.1–172.19.255.254 · 65,534 hosts boundary on octet edge (255.255.0.0)

26 44.133.144.0 · bc 44.133.159.255 · 44.133.144.1–44.133.159.254 · 4,094 hosts octet 3, block 16: 144 ≤ 154 < 160

27 198.196.128.0 · bc 198.196.255.255 · 198.196.128.1–198.196.255.254 · 32,766 hosts octet 3, block 128: 128 ≤ 234 < 256

28 203.169.208.56 · bc 203.169.208.63 · 203.169.208.57–203.169.208.62 · 6 hosts octet 4, block 8: 56 ≤ 57 < 64

29 150.0.0.0 · bc 150.127.255.255 · 150.0.0.1–150.127.255.254 · 8,388,606 hosts octet 2, block 128: 0 ≤ 28 < 128

30 100.176.0.0 · bc 100.183.255.255 · 100.176.0.1–100.183.255.254 · 524,286 hosts octet 2, block 8: 176 ≤ 179 < 184

Table B-6 Answers 31–40: Hosts required

  • # Answer
  • 31 /23 (255.255.254.0), 510 usable
  • 32 /25 (255.255.255.128), 126 usable
  • 33 /28 (255.255.255.240), 14 usable
  • 34 /29 (255.255.255.248), 6 usable
  • 35 /24 (255.255.255.0), 254 usable
  • 36 /22 (255.255.252.0), 1,022 usable
  • 37 /25 (255.255.255.128), 126 usable
  • 38 /26 (255.255.255.192), 62 usable
  • 39 /27 (255.255.255.224), 30 usable
  • 40 /26 (255.255.255.192), 62 usable

Table B-7 Answers 41–50: Subnets required

# Answer

41 Borrow 6 bits: /14 (255.252.0.0), 64 subnets of 262,142 hosts 42 Borrow 3 bits: /19 (255.255.224.0), 8 subnets of 8,190 hosts 43 Borrow 3 bits: /27 (255.255.255.224), 8 subnets of 30 hosts 44 Borrow 9 bits: /25 (255.255.255.128), 512 subnets of 126 hosts 45 Borrow 11 bits: /19 (255.255.224.0), 2,048 subnets of 8,190 hosts 46 Borrow 4 bits: /28 (255.255.255.240), 16 subnets of 14 hosts 47 Borrow 6 bits: /22 (255.255.252.0), 64 subnets of 1,022 hosts 48 Borrow 5 bits: /21 (255.255.248.0), 32 subnets of 2,046 hosts 49 Borrow 2 bits: /26 (255.255.255.192), 4 subnets of 62 hosts 50 Borrow 7 bits: /15 (255.254.0.0), 128 subnets of 131,070 hosts

Table B-8 Answers 51–58: VLSM

# Answer

51 A 192.168.1.0/26; B 192.168.1.64/27; C 192.168.1.96/28; D 192.168.1.112/30 52 A 10.1.0.0/24; B 10.1.1.0/25; C 10.1.1.128/26; D 10.1.1.192/30 53 A 172.16.8.0/23; B 172.16.10.0/24; C 172.16.11.0/30; D 172.16.11.4/30 54 A 192.168.100.0/25; B 192.168.100.128/26; C 192.168.100.192/27; D 192.168.100.224/30 55 A 10.50.4.0/23; B 10.50.6.0/25; C 10.50.6.128/26; D 10.50.6.192/28 56 A 172.20.32.0/25; B 172.20.32.128/27; C 172.20.32.160/28; D 172.20.32.176/29 57 A 10.9.0.0/27; B 10.9.0.32/27; C 10.9.0.64/28; D 10.9.0.80/30 58 A 192.168.200.0/26; B 192.168.200.64/27; C 192.168.200.96/28; D 192.168.200.112/30

Table B-9 Answers 59–70: Summarization

  • # Answer
  • 59 172.16.0.0/22 (255.255.252.0), exact
  • 60 10.1.16.0/21 (255.255.248.0), exact
  • 61 192.168.32.0/22 (255.255.252.0), exact
  • 62 172.20.100.0/22 (255.255.252.0), exact
  • 63 10.10.64.0/21 (255.255.248.0), exact
  • 64 192.168.1.64/26 (255.255.255.192), exact
  • 65 10.0.4.0/22 (255.255.252.0), exact

66 172.30.0.0/20 (255.255.240.0), inclusive; exact = 172.30.5.0/24, 172.30.6.0/23, 172.30.8.0/24 67 10.32.0.0/12 (255.240.0.0), exact

68 192.168.8.0/21 (255.255.248.0), inclusive; exact = 192.168.10.0/23, 192.168.12.0/23 69 10.2.0.0/21 (255.255.248.0), exact

70 172.18.16.0/20 (255.255.240.0), exact

Table B-10 Answers 71–80: Wildcard masks

Table B-11 Answers 81–90: Same subnet and valid host

  • # Answer
  • 81 No: 10.1.1.0/26 / 10.1.1.64/26
  • 82 Yes: 172.16.40.0/21 / 172.16.40.0/21
  • 83 No: 192.168.3.128/25 / 192.168.3.0/25
  • 84 Yes: 10.192.0.0/12 / 10.192.0.0/12
  • 85 Yes: 172.25.9.200/29 / 172.25.9.200/29
  • 86 No: broadcast of 172.16.0.0/19
  • 87 No: network ID of 10.10.10.0/23
  • 88 No: broadcast of 192.168.4.64/26
  • 89 Yes: host in 10.0.0.0/15
  • 90 No: network ID of 192.168.77.80/28

Table B-12 Answers 91–100: IPv6

98 2001:db8:acad:10:21a:2bff:fe3c:4d5e (7th bit of 00 flipped, FFFE inserted) 99 2001:db8:1:1:a683:e7ff:fe12:3456 (7th bit of a4 flipped, FFFE inserted) 100 fe80::5eff:fe10:1 (7th bit of 02 flipped, FFFE inserted)

Use ← → to move between sections