About this interactive
Longest prefix match is the single rule that decides where every packet on the internet goes, and it is also the rule students most often think they understand after one pass. The lesson version is easy to nod along to: the most specific route wins. The exam version is not, because it requires two separate skills at once — deciding which entries actually contain the destination address, which is subnet arithmetic, and then ranking the ones that do by prefix length, which is the rule itself. A student who can recite the rule and cannot do the arithmetic will confidently pick a /24 that does not contain the address over a /16 that does. This set exists to force both halves, thirty times over. Every question is a real routing table and a real destination, and every distractor is an actual entry from that table rather than an invented one, so a wrong answer is always a specific misreading that can be named: you took a route that does not contain the address, or you took a route that does but is not the longest one. The pool is graded in scope rather than sequenced by difficulty — quiz-game samples at random, so there is no honest way to promise an escalating round, and pretending otherwise would just mean mislabelling the set. What the pool does instead is span the range: unambiguous tables, stacked overlapping prefixes, host routes at /32 sitting inside their own /24, default-route fallbacks, a table with no default route at all where the correct answer is that the packet is discarded, and equal-cost ties. Several tables appear twice with different destinations — 172.16.10.200 lands in the /25 and 172.16.10.50 does not, 192.168.100.70 lands in the /26 and 192.168.100.140 does not — which is the cheapest way to prove that the answer comes from the address and not from the shape of the table. The tie questions are the ones worth explaining, because they are where a quiz on this subject usually goes wrong. When two entries have the same prefix length, longest prefix match genuinely cannot pick between them; a question that presented two equal-cost /16 routes and marked one of them correct would be teaching a falsehood, and it would be unanswerable by a student who understood the material better than the author. So those four questions ask what actually happens rather than which route wins: the router installs both and load-balances across them. One of the four then shows an equal-cost pair at /16 losing outright to a single /24, because longest prefix match runs before metrics are ever compared and that ordering is the thing most often remembered backwards. Another shows two paths that tie on prefix length but differ on OSPF cost, where only the cheaper one is installed — equal-cost multi-path requires the cost to actually be equal, which the name says and students routinely skip. The arithmetic in every question was computed rather than estimated, and the correct answer of each generated question was derived from the table by running the longest prefix match rule over it rather than asserted by hand. Every question also carries a written explanation, shown to the student as soon as the answer is graded, so a miss names the route that actually won and the prefix length that decided it. None of the reasoning above depends on that display, though: the stems and the answer text are written to carry the teaching on their own. Run it after the module's Default Route and Longest Match lessons, and again after Routing Process; twelve of thirty means two consecutive rounds overlap without repeating, and the entries that got past you the first time come back.
About TechKnowSurge
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →