IPv4 Subnetting Quiz
Practice IPv4 subnetting from /0 to /32 with explained answers and repeatable rounds that let you retry only the questions you missed.Practice status
{{ summaryLine }}
{{ quizIssue }}
{{ quizSetupValidation }}
{{ progressStatusLine }}
Question {{ quizCursor + 1 }} of {{ questionCount }}
{{ currentQuestion.stem }}
{{ currentQuestion.accessible_clue }}
{{ currentResultRow.feedback }}
{{ currentResultRow.explanation }}
Source: {{ currentResultRow.source.reference }} · {{ currentResultRow.source.version }} · {{ currentResultRow.source.license }}
Answer recorded. Corrections will appear in the practice review.
Review what to practice next
{{ resultLead }}
{{ learningReviewTitle }}
{{ learningReviewLine }}
Missed answer review
-
{{ item.prompt }}
Your answer: {{ item.selected_answer_label }}
Correct answer: {{ item.correct_answer_label }}
{{ item.explanation }}
Source: {{ item.source.label }} · {{ item.source.version }} · {{ item.source.license }}
Concept performance
Which subnetting concepts need another pass? Counts describe only the questions in this round.
Loading topic-performance chart…
{{ quizChartExportStatus }}
Answer ledger
| Question ID | Prompt | Topic | Your answer | Correct answer | Outcome | Explanation | Source | Copy |
|---|---|---|---|---|---|---|---|---|
| {{ row.question_id }} | {{ row.prompt }} | {{ row.category_label }} | {{ row.selected_answer_label }} | {{ row.correct_answer_label }} | {{ row.outcome_label }} | {{ row.explanation }} | {{ row.source ? `${row.source.label} · ${row.source.version} · ${row.source.license}` : '—' }} |
{{ quizLedgerExportStatus }}
An IPv4 address does not identify its subnet on its own. The prefix or subnet mask supplies the boundary, which is why changing a mask can change where a device sends traffic without changing its address. Subnetting calculations connect the address written in a configuration to the block it belongs to.
Internet Protocol version 4 (IPv4) uses 32-bit addresses, usually written as four decimal numbers separated by dots. Each number is an octet, an eight-bit group with a value from 0 to 255. Classless Inter-Domain Routing (CIDR) notation adds a slash and a prefix length. In 192.168.10.10/24, the first 24 bits identify the network and the remaining eight bits distinguish addresses within that block. A subnet mask such as 255.255.255.0 expresses the same division in dotted-decimal form.
Subnetting divides a larger address block into smaller, aligned blocks. A longer prefix fixes more bits, so each additional prefix bit halves the total number of addresses in a block. This helps match an address plan to the number of interfaces it must support, but smaller blocks leave less room for growth. The total address count also differs from the number left after applying endpoint rules.
- Network address
- The lower boundary of a block, obtained by setting its host bits to zero. In an ordinary broadcast-capable subnet, it identifies the subnet rather than an individual host.
- Directed-broadcast address
- The address with all host bits set to one, used to address an ordinary subnet as a group. Calculating this address does not establish that a router will forward traffic to it.
- Host-address range
- The addresses between those two boundaries in conventional subnet arithmetic. Point-to-point links and single-address routes need different endpoint rules.
For example, 192.168.10.10 and 192.168.10.200 belong to the same block with a /24 prefix. With /25, they belong to different blocks, one covering last-octet values 0 to 127 and the other 128 to 255. Comparing only the first three decimal numbers therefore gives the wrong answer. On a normally configured host, the subnet mask helps determine whether a destination is directly connected or must be reached through a gateway.
The same reasoning matters when checking an interface configuration, reading a routing entry or estimating how many addresses a subnet can hold. Historical address classes do not override an explicitly stated prefix, and a boundary does not have to fall between octets. A /23, for example, leaves host bits in both the third and fourth octets.
Subtracting two addresses is not a universal rule. An RFC 3021 /31 point-to-point link uses both endpoints, while a /32 host route identifies one address. Even where endpoint subtraction applies, the result is arithmetic rather than permission to assign every address. Special-purpose reservations, existing allocations and the actual network configuration still matter.
How to Use This Tool:
Choose a subnetting skill and the prefix lengths you want to practice. The initial setup uses All concepts, Last-octet practice from /24 to /30, 10 questions and feedback after each answer. Questions supply the addresses, masks or prefixes to work from; you select an answer rather than enter an address for calculation.
- Choose a Concept and Prefix range. The six concepts cover prefix lengths, subnet masks, network boundaries, broadcast rules, address ranges and address counts. Besides last-octet practice, the ranges include cross-octet practice from /16 to /23, large blocks from /0 to /15, point-to-point links and host routes at /31 and /32, or all prefixes.
- Select Feedback. After each answer reveals the correction and calculation immediately. At the end records each choice without revealing correctness in the question view, then shows corrections in the completed review. Both modes use the same answer rules and scoring.
- Choose an available Question count. Rounds have at most 20 questions. The choices come from 2, 5, 10 and 20, with fewer choices for smaller selections. A single concept restricted to /31 and /32 offers two questions. Check the count again after changing the concept or range.
Under Advanced, Replay seed is optional and accepts up to 128 characters. Leaving it blank uses a fixed default round, not a newly randomized round. To reproduce questions and option order, keep the seed, concept, prefix range, count, feedback mode and question-bank version unchanged.
- Select Start practice, then choose one of the four answers for each question. Selecting an answer records and locks it for that attempt. Use Next question to advance; there is no separate answer-submission step. If starting is disabled, select an offered mode and count and keep the optional seed within its length limit.
- Select View results after answering the last question. All questions must be answered before the final review appears. Review any mistakes in Missed answer review and compare your reasoning with the explanations in the Answer ledger.
Interpreting Results:
Practice status reports answered questions while a round is in progress and correct answers out of the selected question count after completion. Reaching 100% progress means every question has an answer, not that every answer is correct. Perfect round means no answers were missed in that particular attempt.
Concept performance compares Correct and Missed answer counts for the concepts sampled in the round. It is not a proficiency rating, and untested concepts are not assessed. Short mixed rounds need not contain equal numbers of questions from every concept. A Review focus suggestion points to a concept with the most misses, rather than establishing your weakest skill across all subnetting tasks.
Use Retry missed for a new attempt containing only questions you answered incorrectly. It can be shorter than the normal setup choices and does not add points to the original attempt. Replay same seed repeats the challenge with answers cleared. Try a new seed uses another seed to select and order the round, but questions can recur. After a perfect round, there is no missed-only retry. Change setup clears the attempt so you can choose a different scope.
The bank contains 198 original fixed cases, with six concepts at each prefix length from /0 to /32. Address-based questions use one fixed example address for each prefix. Selection is without replacement within a round, but a new seed does not generate new addresses or guarantee balanced coverage. These are practice questions, not official examination questions or an exhaustive treatment of IPv4 allocation and routing. No pass mark, certification or guarantee of operational competence follows from the score. The quiz does not inspect a live network or validate routes or address allocations.
For a useful follow-up, recalculate a missed boundary or range before retrying it, then practice another prefix range rather than relying on recognition of familiar options. Use the Answer ledger to compare that calculation with the recorded correction.
Technical Details:
A CIDR block contains every address that shares a specified number of leading bits. The prefix determines the block size; the address determines which aligned block contains it. Finding the numerical boundaries and deciding how those endpoints may be used are separate calculations and rules.
Calculating an address block
For an address written as a.b.c.d/p, each octet is an integer from 0 to 255 and the prefix length p is an integer from 0 to 32. Treating the address as one unsigned integer I makes the calculation work across octet boundaries. The first octet has the greatest place value. I is an integer from 0 to 4,294,967,295, representing the unsigned 32-bit address. Prefix and host-bit lengths are measured in bits, T counts addresses, and L and U use the same integer address representation as I.
Let h be the number of host bits, T the total address count, and L and U the lower and upper numerical boundaries. Round the address down to a multiple of the block size to obtain the lower boundary. The upper boundary is one less than the start of the next block.
The floor brackets mean round down, not round to the nearest integer. Clearing every host bit gives the same lower boundary; setting every host bit to one gives the upper boundary. Address counts and boundaries are exact integers. The upper boundary is not automatically a directed-broadcast address for every prefix or link type.
Converting between prefixes and masks
A CIDR mask contains p consecutive one bits followed by zero bits. Every complete group of eight one bits becomes 255. If the prefix ends partway through an octet, use the corresponding row below and write zero in all following octets. Counting the one bits reverses the conversion.
| Leading one bits | Binary octet | Decimal value |
|---|---|---|
| 0 | 00000000 | 0 |
| 1 | 10000000 | 128 |
| 2 | 11000000 | 192 |
| 3 | 11100000 | 224 |
| 4 | 11110000 | 240 |
| 5 | 11111000 | 248 |
| 6 | 11111100 | 252 |
| 7 | 11111110 | 254 |
| 8 | 11111111 | 255 |
For /20, two full octets supply 16 network bits and four more one bits supply the remaining prefix bits. The mask is therefore 255.255.240.0. At the endpoints, /0 has mask 0.0.0.0 and /32 has mask 255.255.255.255. A pattern with a zero followed later by another one is not a contiguous CIDR mask.
Endpoint rules and address counts
The count below is the number retained under the question's stated convention, not a count of addresses available for deployment. Where both endpoints are excluded, the range starts one address after L and ends one address before U, inclusive.
| Prefix and convention | Retained addresses | Endpoint meaning |
|---|---|---|
| /0, numerical endpoint exclusion | 4,294,967,294 | Exclude the lowest and highest numerical values only. The upper value is the limited-broadcast address, not an Internet-wide directed broadcast. |
| /1 to /30, conventional subnet arithmetic | Exclude the network value and the all-ones host value used as the directed-broadcast answer under this convention. | |
| /31, RFC 3021 point-to-point link | 2 | Include both endpoints. Neither endpoint is a directed-broadcast address for this link. |
| /32, host route | 1 | The lower and upper boundaries are the same address. There is no separate subnet directed-broadcast address. |
For /0, the complete numerical interval is 0.0.0.0 through 255.255.255.255, containing 4,294,967,296 values. Removing its two endpoints leaves 0.0.0.1 through 255.255.255.254. That interval still includes special-purpose and reserved address space. The same allocation warning applies to large-block exercises generally.
The /31 rule specifically assumes an RFC 3021 point-to-point link, not an ordinary multi-device subnet. Both ends need suitable support for real deployment. Limited broadcast is distinct from directed broadcast, so the absence of a /31 directed-broadcast address does not abolish all IPv4 broadcast semantics.
Following a /26 calculation
For the question address 192.0.2.173/26, six host bits give 64 total addresses and the mask is 255.255.255.192. Because this boundary lies in the last octet, the first three octets stay unchanged. The last-octet calculation is:
The network boundary is 192.0.2.128, the directed-broadcast answer is 192.0.2.191, and the conventional range is 192.0.2.129 through 192.0.2.190. The address 192.0.2.255 is outside this /26 block. These documentation addresses illustrate arithmetic rather than a deployable allocation.
Score construction
Each question has one correct choice worth one point. An incorrect choice earns zero, with no weighting, partial credit or penalty. Let C be correct answers, A recorded answers and N questions selected for the current attempt. The score ranges from zero to N points; correct-answer percentage and progress use different numerators. All three counts are integers with 0 ≤ C ≤ A ≤ N and N greater than zero.
Unanswered questions remain in the selected total while an attempt is incomplete, but they are not counted as incorrect or included among missed items. Completion requires all N responses. The visible progress label rounds to the nearest whole percent, with half-percent ties upward. Calculated accuracy retains its unrounded ratio; the completed headline shows the exact correct count out of the selected total.
For example, seven correct answers in a completed ten-question round give 7/10 and 70% accuracy, while progress is 100%. A retry of its three missed questions has a new denominator of three. Answering all three correctly gives 3/3 for that retry, not 10/10 for the original round. There are no score bands or official pass thresholds.
Privacy Notes:
Answers are scored in your browser, but the page address can carry the attempt's setup, seed, recorded answers and current position. This includes partially completed attempts. Someone who receives that link can restore the choices included in it, not just the question selection.
Treat attempt links as shared answer records, not encrypted progress storage. They may enter browser history or be transmitted when opened or shared. Clearing the current attempt cannot remove previously saved or shared links. Browser scoring does not imply that the entire page works offline or that no information is transmitted. Progress is restored from the saved link, not an account-based history.
If Saved attempt unavailable appears, the saved link could not be restored, for example because it is malformed or incompatible with the current question bank. Start a new round from setup rather than treating the failed restoration as a score.
Worked Examples:
A range that crosses the third octet
In cross-octet practice, the question about 172.23.167.93/23 uses mask 255.255.254.0. The block begins at 172.23.166.0 and ends at 172.23.167.255, so the address-range answer is 172.23.166.1 through 172.23.167.254, containing 510 addresses after endpoint exclusion. Both 172.23.166.255 and 172.23.167.0 lie inside that interval. Excluding every address ending in .0 or .255 would therefore remove addresses that are not the boundaries of this /23.
Two endpoints without a directed broadcast
For 198.51.100.10/31 on an RFC 3021 point-to-point link, the two endpoints are 198.51.100.10 and 198.51.100.11. Choose both endpoints for the range, two addresses for the count, and No directed broadcast for this link for the broadcast question. The lower endpoint still marks the numerical block boundary, but it is also an endpoint address. Subtracting two or relabeling the upper endpoint as a broadcast would contradict the stated link convention.
One address in a host route
For 203.0.113.77/32, every bit is fixed. The range starts and ends at 203.0.113.77, and the count is one. In the broadcast question, choose A single-address host route, not a broadcast subnet. Matching lower and upper boundaries is expected here; it does not indicate an empty range, and neither endpoint subtraction nor adding a neighboring address is appropriate.
References:
- RFC 4632 — Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan, RFC Editor, August 2006.
- RFC 1122 — Requirements for Internet Hosts — Communication Layers, section 3.3.1.1, RFC Editor, October 1989.
- RFC 1812 — Requirements for IP Version 4 Routers, section 4.2.2.11, RFC Editor, June 1995.
- RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links, RFC Editor, December 2000.
- IPv4 Special-Purpose Address Space, Internet Assigned Numbers Authority, updated 9 October 2025.