A structured lesson workspace with readable content, hands-on examples, and a clean path to completion.
A user complains they can reach 10.5.1.0/24 but not 10.5.2.0/24 — same /16 network, different /24 subnets, and only one works. The router has routes for both. How can one work and the other fail? The answer is longest prefix match, and this is exactly the scenario that exposes it.
Longest prefix match is the router's final tiebreaker. After AD, after metric — if two routes still tie (same source, same distance), the router picks the one with the longest subnet mask. Longer mask = more specific route = wins.
The /24 is more specific than the /16, /8, or /0. Even though all four match, the router prefers the most specific match. That's longest prefix match — more precision wins, regardless of AD, metric, or any other factor.
| Route A | Route B | Destination | Winner |
|---|---|---|---|
| 10.0.0.0/8 | 10.5.0.0/16 | 10.5.2.10 | 10.5.0.0/16 |
| 10.5.0.0/16 | 10.5.2.0/24 | 10.5.2.10 | 10.5.2.0/24 |
| 0.0.0.0/0 | 10.0.0.0/8 | 192.168.1.1 | 0.0.0.0/0 |
| 10.5.2.0/24 | 10.5.2.128/25 | 10.5.2.200 | 10.5.2.128/25 |
| 10.5.0.0/16 | 10.5.2.0/24 | 10.5.3.10 | 10.5.0.0/16 |
Longest prefix match beats AD every time. Even if the /24 has AD 200 and the /8 has AD 1, the /24 still wins for destinations inside it. AD only breaks ties between routes to the exact same prefix.
Longest prefix match is the reason summarization works. You can advertise 10.0.0.0/8 while keeping specific /24s for internal routing — packets to specific subnets go to the specific route, everything else uses the summary. Understanding this rule turns 'the routing table has 5,000 entries' from intimidating to readable.
Finish the lesson once you have worked through the material. This awards ★ 35 XP.
Select each vulnerable line, then classify the finding.
Findings
Review target: 8 lines · 2 expected findings