IPv4

30 Subnetting Practice Questions with Answers and Explanations

G Gurpreet Singh August 28, 2026 5 min read
A sample subnetting question asking which subnet contains 192.168.1.100/26, with the block size working shown, beside a speed benchmark table from learning pace to exam ready under 30 seconds

Subnetting is a skill you build by repetition, not by reading. Work through these with pen and paper before checking the answers. If the method is still new, read subnetting explained first and keep the cheat sheet open.

Benchmark Yourself

LevelTime per questionReady for
Learning2–3 minutes, with the chartUnderstanding the method
Competent45–60 seconds, no chartReal network design
Exam readyUnder 30 seconds, in your headCCNA and similar

The exam constraint is real: CCNA gives you roughly 60–90 seconds per question overall, and subnetting questions are not the only ones. If a subnetting question takes you two minutes, it costs you elsewhere.

Section 1 — Masks and Host Counts

Q1. How many usable hosts does a /27 provide?
Q2. What is the subnet mask for /21 in dotted decimal?
Q3. Convert 255.255.255.248 to CIDR notation.
Q4. How many subnets do you get borrowing 4 bits from a /24?
Q5. What is the block size of a /29?
Q6. Which prefix do you need for exactly 500 hosts?

Answers 1–6

1. 30. A /27 leaves 5 host bits: 2⁵ − 2 = 30.

2. 255.255.248.0. /21 is 8 + 8 + 5 bits; 5 bits set in the third octet = 248.

3. /29. 248 = 11111000 = 5 bits, so 8 + 8 + 8 + 5 = 29.

4. 16. 2⁴ = 16 subnets, each a /28 with 14 usable hosts.

5. 8. Mask is 255.255.255.248, so 256 − 248 = 8.

6. /23, giving 510 usable. A /24 gives only 254 — always round up.

Section 2 — Find the Subnet

Q7. Which subnet does 192.168.1.100/26 belong to?
Q8. What is the broadcast address of 10.5.3.77/28?
Q9. What is the first usable host in the subnet containing 172.16.9.200/27?
Q10. What is the last usable host of 192.168.4.0/22?
Q11. Which subnet contains 10.0.5.130/25?
Q12. Is 192.168.1.63/26 a usable host address?

Answers 7–12

7. 192.168.1.64/26. Block size 64; blocks are 0, 64, 128, 192. 100 falls in the 64 block. Range .65–.126, broadcast .127.

8. 10.5.3.79. Block size 16; blocks 64, 80. 77 is in the 64 block, so broadcast = 80 − 1 = 79.

9. 172.16.9.193. Block size 32; 200 falls in the 192 block, so the first host is .193.

10. 192.168.7.254. Block size 4 in the third octet; the subnet spans 192.168.4.0 – 192.168.7.255, so broadcast is .7.255 and the last host is .7.254.

11. 10.0.5.128/25. Block size 128; blocks 0 and 128. 130 is in the 128 block, range .129–.254.

12. No. With block size 64, .63 is the broadcast address of the 192.168.1.0/26 subnet. Assigning it to a host will not work.

Section 3 — Design

Q13. You have 192.168.1.0/24 and need 6 subnets of at least 25 hosts. Which prefix?
Q14. You have 10.0.0.0/16 and need 200 subnets. What is the smallest prefix that works, and how many hosts does each get?
Q15. How many /30 links fit inside a /24?
Q16. A branch needs 120 hosts now and may double. Which prefix?
Q17. Split 172.20.8.0/22 into /24s. List them.
Q18. Why can’t 192.168.1.100/26 be a valid network address?

Answers 13–18

13. /27. It gives 8 subnets of 30 hosts — enough for 6 subnets of 25. A /26 gives only 4 subnets; a /28 gives 14 hosts, too few.

14. /24. Borrowing 8 bits gives 256 subnets of 254 hosts each. A /23 gives only 128 subnets.

15. 64. A /24 has 256 addresses; each /30 consumes 4.

16. /24, giving 254. A /25 gives 126 — enough now but not after doubling.

17. 172.20.8.0/24, 172.20.9.0/24, 172.20.10.0/24, 172.20.11.0/24. A /22 spans four /24s.

18. Block size is 64, so valid network addresses are .0, .64, .128 and .192 only. A subnet must start on a multiple of its block size, and 100 is not.

Section 4 — Troubleshooting

Q19. Host A is 192.168.1.100/25, host B is 192.168.1.200/25. Same subnet?
Q20. Host A is 10.1.1.5/24 with gateway 10.1.2.1. Will it reach the internet?
Q21. A host is configured 192.168.5.0/24. What happens?
Q22. Host A is 172.16.1.10/24 and host B is 172.16.1.20/25. Can they communicate?
Q23. Do 192.168.1.0/25 and 192.168.1.0/26 overlap?
Q24. A device shows 169.254.8.21. What does that mean?

Answers 19–24

19. No. Block size 128, so blocks are 0 and 128. Host A is in 192.168.1.0/25, host B in 192.168.1.128/25. They need a router.

20. No. With a /24, the host’s network is 10.1.1.0 and 10.1.2.1 is outside it. A gateway must be inside the host’s own subnet.

21. It will not communicate. 192.168.5.0 is the network address of a /24, not a usable host address.

22. Asymmetrically, which is worse than not at all. A’s /24 puts B in its own subnet, so A ARPs for B directly and succeeds. B’s /25 puts its subnet at 172.16.1.0–.127, which also contains A — so this specific pair works. Change A to .200 and it breaks in one direction only. Mismatched masks on one segment are a classic source of “some hosts work, some don’t”.

23. Yes. The /25 covers .0–.127 and the /26 covers .0–.63, which sits entirely inside it. Longest-prefix match means the /26 silently wins for .0–.63.

24. APIPA — DHCP failed and the host self-assigned. It has no gateway and no DNS, so it can only reach other APIPA hosts on the same segment.

Section 5 — VLSM

Q25. Using 192.168.20.0/24, allocate: 60 hosts, 28 hosts, 12 hosts, and two 2-host WAN links.
Q26. Why must you allocate the largest subnet first?
Q27. After assigning 192.168.1.0/26, where does the next subnet start?
Q28. Can you use VLSM with RIPv1?
Q29. Summarise 192.168.8.0/24, 192.168.9.0/24, 192.168.10.0/24 and 192.168.11.0/24 into one route.
Q30. You allocated a /30 at 192.168.1.0, then need a /27. Where must it start, and what is wasted?

Answers 25–30

25. Largest first:

NeedPrefixNetworkRange
60/26192.168.20.0.1 – .62
28/27192.168.20.64.65 – .94
12/28192.168.20.96.97 – .110
2/30192.168.20.112.113 – .114
2/30192.168.20.116.117 – .118

26. A subnet must start on a multiple of its block size. Allocating small blocks first fragments the space so a large block has no valid aligned start, even when enough addresses remain.

27. 192.168.1.64. The /26 spans .0–.63, so the next free address is .64.

28. No. RIPv1 is classful and does not carry the subnet mask in its updates. Use RIPv2, EIGRP or OSPF.

29. 192.168.8.0/22. Four consecutive /24s starting on a multiple of 4 combine into one /22.

30. The /27 has block size 32, so it must start at .32 — .0–.31 cannot hold it because the /30 already occupies .0–.3. Addresses .4–.31 (28 of them) are stranded. This is exactly why you allocate largest first.

Where People Lose Marks

  • Forgetting −2. A /28 has 16 addresses but 14 usable.
  • Rounding down. 65 hosts needs a /25, not a /26.
  • Ignoring the mask when asked whether two addresses are on the same subnet.
  • Assigning network or broadcast addresses to hosts.
  • Starting a subnet off-boundary — it must be a multiple of its block size.
  • Missing the WAN links in a design question. Every point-to-point link needs its own /30.

Check any answer against the subnet calculator. For unequal-sized subnets in one network, work through VLSM. If you are preparing for interviews as well as exams, our networking interview questions cover the wider syllabus.

Frequently Asked Questions

How fast should I be at subnetting for CCNA?

Under 30 seconds per question, without a chart. The exam does not give you time to derive each answer from binary, so the block-size method needs to be automatic.

Do I need to memorise the subnet chart?

Not the whole chart — just the bit values (128, 64, 32, 16, 8, 4, 2, 1) and the valid mask octets. Everything else derives from 256 minus the mask octet.

What is the fastest subnetting method?

The magic number method: block size = 256 − interesting mask octet, then count up in blocks. It avoids binary conversion entirely once you understand why it works.

Why is 192.168.1.63/26 not usable?

It is the broadcast address of 192.168.1.0/26, which spans .0 to .63. The first and last address of every subnet are reserved.

How many /30 subnets fit in a /24?

64. The /24 has 256 addresses and each /30 uses 4.

Can two hosts with different subnet masks communicate?

Sometimes, and unpredictably. Each host decides independently whether the destination is local, so a mask mismatch can produce one-way reachability — which is far harder to diagnose than a clean failure. Always match masks within a segment.

GU
Written by

Gurpreet Singh

Hey! I"m Gurpreet Singh and I Have 7+ Years of experience in the Network & Security Domain as well as the Cloud Infra Domain. I am Certified with Cisco ( CCNA ), CheckPoint ( CCSA ), 1xAWS, 3xAZURE, and 3xNSE. So I love to share my tech knowledge with you.

Leave a Reply

Your email address will not be published. Required fields are marked *