CCNA practice test / CCNA Subnetting Practice Questions
CCNA Subnetting Practice Questions
10 original questions, each with an explanation for every option. On the 19 related questions in our full bank, CertAce users answer 51% correctly.
I failed my first CCNA attempt with 58%. Subnetting is mostly a speed problem: questions that take three minutes instead of one add up. On the exam, subnetting rarely shows up as a neat "calculate this" question. It hides inside routing tables, troubleshooting scenarios and VLSM designs, and if each one takes you three minutes, you run out of time on everything else.
Day to day as a network engineer I still use the same handful of skills these questions test: finding which subnet a host belongs to, spotting a gateway that sits in the wrong subnet, picking a mask that fits the number of hosts without wasting addresses, and reading a route to see where a packet will go. None of it needs a calculator once the block-size method is automatic.
So practise for speed, not just correctness. Work every question on paper first, then check the explanation for each option, including the wrong ones. Most wrong answers on the exam are built from predictable mistakes: an off-by-one broadcast, the wrong octet, or forgetting the minus two. Once you recognise those traps, you stop falling into them. Aim to get any single-subnet question done in under a minute, then move on to VLSM and summarization.
Adrian, network engineer and founder of CertAce.
How to work these questions
- Find the interesting octet: the one where the mask is not 255 or 0 (for /17-/24 it is the third octet, for /25-/32 the fourth).
- Compute the block size as 256 minus the mask value in that octet (for example, 255.255.255.224 gives 256 - 224 = 32).
- Find the network address: the largest multiple of the block size that is less than or equal to the host's value in the interesting octet; octets to the right become 0.
- Find the broadcast: next network minus one (network + block size - 1 in the interesting octet, 255 in every octet to the right).
- First usable is network + 1, last usable is broadcast - 1, and usable hosts = 2^h - 2, where h is the number of host bits (32 minus the prefix length).
- For VLSM, sort the requirements from largest to smallest and allocate each subnet on its own block boundary, starting right after the previous one ends.
Practice questions
Pick an answer to see right away whether it is correct and why every option is right or wrong.
-
Question 1 of 10Calculation
A host is configured with the address 172.16.45.200/21. Which subnet does it belong to?
- 172.16.45.0/21
- 172.16.32.0/21
- 172.16.44.0/21
- 172.16.40.0/21
Show the answer
Answer: D
Convert the prefix to a mask, find the interesting octet (third for /21) and the block size (256 - 248 = 8). The network is the largest multiple of the block size that does not exceed the host's value in that octet, with all octets to the right set to 0.
- A. This treats the mask as if it were a /24 boundary. With /21, the third octet is only partly network bits, so the network is the multiple of 8 below 45, not 45 itself.
- B. 172.16.32.0/21 covers 172.16.32.0-172.16.39.255; the third octet 45 is outside it. You would get this from a /20 mask, not /21.
- C. 44 is not a multiple of 8, so 172.16.44.0 is not a valid /21 network boundary.
- D. A /21 mask is 255.255.248.0, so the block size is 256 - 248 = 8 in the third octet. Multiples of 8: 32, 40, 48. 45 falls in 40-47, so the subnet is 172.16.40.0/21.
-
Question 2 of 10Calculation
What is the broadcast address of the subnet that contains host 10.20.30.77/27?
- 10.20.30.127
- 10.20.30.63
- 10.20.30.79
- 10.20.30.95
Show the answer
Answer: D
Find the block size (256 - 224 = 32), locate the subnet that contains the host (64-95), and the broadcast is the last address in that block: next network (96) minus 1.
- A. 10.20.30.127 is the broadcast for a /25 (block 128) or for the 96-127 /27 subnet, which does not contain .77.
- B. 10.20.30.63 is the broadcast of the previous /27 subnet (32-63); .77 is above it.
- C. 10.20.30.79 is the broadcast of the /28 subnet 64-79 (block 16), not of the /27.
- D. /27 = 255.255.255.224, block size 32 in the fourth octet. Subnets start at 0, 32, 64, 96. 77 falls in 64-95, so the broadcast is 10.20.30.95.
-
Question 3 of 10Calculation
You need a single subnet for 500 hosts and want to waste as few addresses as possible. Which subnet mask should you use?
- 255.255.252.0
- 255.255.255.0
- 255.255.254.0
- 255.255.255.128
Show the answer
Answer: C
Find the smallest h where 2^h - 2 is at least the host count, then the prefix is 32 - h. Memorise the powers of two up to 2^12 so this takes seconds.
- A. 255.255.252.0 (/22) gives 1022 usable hosts. It fits, but wastes over 500 addresses when a /23 is enough.
- B. 255.255.255.0 (/24) gives 2^8 - 2 = 254 usable hosts, fewer than 500.
- C. You need h host bits with 2^h - 2 >= 500. 2^9 - 2 = 510 works, 2^8 - 2 = 254 does not. 9 host bits = /23 = 255.255.254.0.
- D. 255.255.255.128 (/25) gives only 2^7 - 2 = 126 usable hosts.
-
Question 4 of 10Calculation
How many usable host addresses are available on the subnet 192.168.10.32 255.255.255.240?
- 14
- 16
- 15
- 30
Show the answer
Answer: A
Count the host bits (32 - prefix), compute 2^h for the block size, then subtract 2 for the network and broadcast addresses.
- A. 255.255.255.240 is a /28, leaving 4 host bits. 2^4 - 2 = 14 usable addresses (192.168.10.33 to 192.168.10.46).
- B. 16 is the total number of addresses in the block (2^4); it includes the network (.32) and broadcast (.47) addresses.
- C. 15 subtracts only one address. Both the network and the broadcast address are unusable, so you subtract 2.
- D. 30 is the usable count for a /27 (255.255.255.224), which has 5 host bits.
-
Question 5 of 10Calculation
What is the last usable host address in the subnet that contains 198.51.100.130/25?
- 198.51.100.255
- 198.51.100.254
- 198.51.100.253
- 198.51.100.126
Show the answer
Answer: B
Find the subnet the host is in, then its broadcast address. The last usable host is always the broadcast minus 1, and the first usable is the network plus 1.
- A. 198.51.100.255 is the broadcast address of the 128-255 subnet and cannot be assigned to a host.
- B. /25 = block size 128, so the subnets are .0-.127 and .128-.255. .130 is in .128-.255, the broadcast is .255, and the last usable host is .254.
- C. 198.51.100.253 is a valid host in the subnet, but it is not the last one; .254 comes after it.
- D. 198.51.100.126 is the last usable host of the other /25 (.0-.127), which does not contain .130.
-
Question 6 of 10Scenario
An engineer must split 192.168.50.0/24 using VLSM for four segments: Sales (100 hosts), Engineering (50 hosts), Management (20 hosts) and a point-to-point WAN link (2 hosts). Allocating from largest to smallest, starting at 192.168.50.0, with no wasted space between subnets, which subnet does Management receive?
- 192.168.50.160/27
- 192.168.50.192/27
- 192.168.50.192/28
- 192.168.50.200/27
Show the answer
Answer: B
For VLSM, size each segment with 2^h - 2 >= hosts, sort from largest to smallest, and place each subnet at the next address that is a multiple of its block size. Check that no range overlaps the previous one.
- A. 192.168.50.160/27 (.160-.191) overlaps Engineering's /26, which already uses .128-.191.
- B. Sales needs /25 (126 hosts): .0-.127. Engineering needs /26 (62 hosts): .128-.191. Management needs /27 (30 hosts) and starts at the next boundary: .192-.223. The WAN /30 then gets .224-.227.
- C. A /28 provides only 2^4 - 2 = 14 usable hosts, not enough for 20.
- D. 200 is not a multiple of 32, so 192.168.50.200 is not a valid /27 network address.
-
Question 7 of 10Scenario
A user reports that their PC cannot reach anything outside its own LAN. The PC is configured with IP address 10.1.4.130, mask 255.255.255.192 and default gateway 10.1.4.126. Other PCs on the same switch can ping each other. What is the cause?
- The gateway 10.1.4.126 is in 10.1.4.64/26, not in the PC's subnet 10.1.4.128/26.
- 10.1.4.130 is the broadcast address of its subnet and cannot be assigned to a host.
- A 255.255.255.192 mask allows only 30 usable hosts, so the PC's subnet is already full.
- 10.1.4.130 is the network address of its subnet and cannot be assigned to a host.
Show the answer
Answer: A
When a host can talk locally but not beyond, calculate the subnet of both the host and its gateway with the host's mask. If they land in different blocks, the gateway is unreachable at Layer 2 and the configuration must be corrected.
- A. 255.255.255.192 is /26, block size 64: subnets .0, .64, .128, .192. The PC (.130) is in .128-.191, but the gateway (.126) is in .64-.127. The PC treats the gateway as off-subnet and cannot ARP for it.
- B. The broadcast address of the PC's subnet is 10.1.4.191, not .130.
- C. A /26 has 6 host bits: 2^6 - 2 = 62 usable hosts. 30 is the count for a /27.
- D. The network address of the PC's subnet is 10.1.4.128, not .130.
-
Question 8 of 10Exhibit
Refer to the exhibit. R1 receives a packet destined for 172.16.11.200. Which interface does R1 use to forward it?
R1# show ip route connected 172.16.0.0/16 is variably subnetted, 6 subnets, 4 masks C 172.16.8.0/22 is directly connected, GigabitEthernet0/0 L 172.16.9.1/32 is directly connected, GigabitEthernet0/0 C 172.16.12.0/24 is directly connected, GigabitEthernet0/1 L 172.16.12.1/32 is directly connected, GigabitEthernet0/1 C 172.16.13.64/27 is directly connected, GigabitEthernet0/2 L 172.16.13.65/32 is directly connected, GigabitEthernet0/2- GigabitEthernet0/1
- GigabitEthernet0/2
- GigabitEthernet0/0
- None; R1 has no matching route and drops the packet.
Show the answer
Answer: C
For each route, compute its range from the prefix (network to network + block size - 1) and check whether the destination falls inside. If several routes match, the router uses the longest prefix.
- A. 172.16.12.0/24 covers only 172.16.12.0-172.16.12.255; the third octet of the destination is 11.
- B. 172.16.13.64/27 covers 172.16.13.64-172.16.13.95, which does not include 172.16.11.200.
- C. 172.16.8.0/22 has a block size of 4 in the third octet and covers 172.16.8.0-172.16.11.255. 172.16.11.200 falls inside that range, so it matches the connected route out Gi0/0.
- D. The /22 route does match. It is easy to miss if you read 172.16.8.0 as if it only covered the 8.x addresses.
-
Question 9 of 10Calculation
Which two addresses are valid, assignable host addresses in the subnet 172.20.96.0/19? (Choose two.)
- 172.20.128.1
- 172.20.96.0
- 172.20.127.254
- 172.20.127.255
- 172.20.112.0
Show the answer
Answer: C and E
Work out the full range first (network and broadcast), then test each option against it. With masks shorter than /24, addresses ending in .0 or .255 can be valid hosts; only the very first and very last addresses of the whole range are reserved.
- A. 172.20.128.1 belongs to the next /19 subnet, 172.20.128.0/19.
- B. 172.20.96.0 is the network address of the subnet, so it cannot be assigned to a host.
- C. 172.20.127.254 is the broadcast minus 1, which makes it the last usable host.
- D. 172.20.127.255 is the broadcast address (next network 172.20.128.0 minus 1).
- E. /19 = 255.255.224.0, block size 32 in the third octet, so the range is 172.20.96.0-172.20.127.255. 172.20.112.0 sits in the middle of that range; an address ending in .0 is a normal host here because it is not the first address of the subnet.
-
Question 10 of 10Calculation
A router has eight contiguous routes, 10.10.16.0/24 through 10.10.23.0/24. Which single summary route covers exactly these eight networks and nothing else?
- 10.10.16.0/21
- 10.10.16.0/22
- 10.10.20.0/21
- 10.10.16.0/20
Show the answer
Answer: A
Count the networks (must be a power of two for an exact summary), take log2 of that count and subtract it from the original prefix length. Then check that the first network is a multiple of the new block size; if it is not, no single exact summary exists.
- A. Eight /24s need 3 extra bits (2^3 = 8), so the summary is /24 - 3 = /21, block size 8 in the third octet. 16 is a multiple of 8, so 10.10.16.0/21 covers 16-23 exactly.
- B. 10.10.16.0/22 covers only 10.10.16.0-10.10.19.255 (four networks), leaving out 20-23.
- C. 20 is not a multiple of 8, so 10.10.20.0 is not a valid /21 boundary; the /21 that contains it is 10.10.16.0/21.
- D. 10.10.16.0/20 has a block size of 16 and covers 10.10.16.0-10.10.31.255, which includes eight networks the router does not have.
Want more like these? The full CertAce bank has timed exams, a review pool for the questions you miss and readiness per exam domain.
Start free trial3 days and 100 questions, no card needed.
Common mistakes
- Forgetting to subtract 2 for the network and broadcast addresses when counting usable hosts.
- Working in the wrong octet, for example applying a /21 block size to the fourth octet instead of the third.
- Calculating the broadcast as the next network address instead of the next network minus one.
- Allocating VLSM subnets smallest first, which leaves gaps and pushes larger subnets off their block boundaries.
- Choosing a mask that is too small because 2^h was compared to the host count without subtracting 2.
Questions people ask
Do I get a subnet calculator on the CCNA exam?
No. You work everything out yourself, and you are given a whiteboard or erasable notepad at the test centre. That is why a fast mental method based on block sizes is worth practising until it is automatic.
How many usable hosts are in a /31 or /32?
The 2^h - 2 rule does not apply to them. A /32 identifies a single host (you see it as the local route L in show ip route), and a /31 is used on point-to-point links where both addresses are usable, as defined in RFC 3021.
What is the difference between FLSM and VLSM?
With fixed-length subnet masking, every subnet of a network uses the same mask. With variable-length subnet masking, you use different masks for different subnets, so a two-host WAN link can get a /30 while a 100-user LAN gets a /25, and you waste far fewer addresses.
More CCNA topics
- CCNA OSPF Practice Questions: Single-Area OSPFv2
- CCNA VLANs and Trunking: Practice Questions
- CCNA ACL Practice Questions
- CCNA NAT, PAT and Port Forwarding Practice Questions
- CCNA Spanning Tree Protocol: Practice Questions
- CCNA IPv6 Practice Questions: Addressing, EUI-64, SLAAC and NDP
- CCNA EtherChannel: Practice Questions
- CCNA First-Hop Redundancy Practice Questions: HSRP, VRRP and GLBP
- CCNA Wireless Fundamentals Practice Questions
- CCNA Static Routing Practice Questions: ip route and the Routing Table
- CCNA IP Services Practice Questions
- CCNA Layer 2 Security Practice Questions
- CCNA Security Fundamentals Practice Questions (200-301)
- CCNA QoS Practice Questions (200-301)
- CCNA Automation and Programmability Practice Questions
- CCNA practice test: all domains
Questions written by CertAce. CertAce is not affiliated with or endorsed by Cisco Systems. CCNA and Cisco are trademarks of Cisco Systems, Inc.