CCNA IP Routing Practice Question
Which two statements accurately describe longest-prefix match in routing?
⚠ Common exam trap
A common exam trap is assuming that a default route or a route with a simpler prefix is preferred over a more specific route. Some candidates mistakenly believe that administrative distance or metric always takes precedence over prefix length. However, Cisco routers always apply longest-prefix match first, selecting the most specific route before considering administrative distance or metric. This misunderstanding can lead to incorrect answers when default routes or broader prefixes appear in the routing table alongside more specific routes.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The most specific matching route is preferred over broader matching routes.
Longest-prefix match means a router prefers the most specific route that matches the destination. In plain language, if several entries could apply to a packet, the router chooses the one that narrows the destination range most precisely. This is why a /25 can beat a /24, and a /24 can beat a /16, even if all three technically contain the same destination address. The common mistake is to assume the router always begins with protocol trust or metric. Those factors matter, but only after the router has determined which matching routes share the same prefix length.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The most specific matching route is preferred over broader matching routes.
Why this is correct
This is the definition of longest-prefix match: among all routes in the routing table that match a destination IP, the one with the longest prefix length (i.e., the most network bits) is chosen. For example, a /24 match beats a /16 match because it identifies a smaller, more exact network. This preference is fundamental to IP routing.
- ✗
A default route is preferred over a matching /24 because it is simpler.
Why it's wrong here
The default route (0.0.0.0/0) has the shortest possible prefix length and is only used when no other more specific route matches. A /24 route is far more specific and will always be preferred over the default route for destinations within that /24 subnet. Administrative simplicity does not override the longest-prefix match rule.
When this WOULD be correct
In a different question that asks about route selection based solely on simplicity and not specificity, option B could be correct if it states that a default route is chosen for its simplicity in a scenario where multiple routes exist but none match the destination exactly.
- ✓
Longest-prefix match is evaluated before choosing between broader and narrower matching routes.
Why this is correct
This emphasizes the order of operations: when multiple routes match a destination, the router first compares prefix lengths, not administrative distance or metric. The longest prefix (most specific) is selected before considering any broader routes. This ensures that a more specific route is always used if present, regardless of other attributes.
- ✗
Routers ignore subnet masks and choose only by administrative distance.
Why it's wrong here
Routers use the subnet mask (or prefix length) as the primary criterion in the longest-prefix match process, not administrative distance. Administrative distance is only considered when two routes to the same destination prefix have identical prefix lengths and come from different routing sources. Thus, this statement misrepresents the role of masks and AD.
When this WOULD be correct
In a question focused on routing protocols that only consider administrative distance for route selection, such as when comparing static routes to dynamic routes, this option could be correct if the context specifies that subnet masks are not evaluated.
- ✗
A /16 is always more specific than a /24.
Why it's wrong here
Actually, the opposite is true: a /24 has a longer prefix length (24 bits) compared to a /16, so it is more specific. A /16 covers a larger address range (65,536 addresses) while a /24 covers only 256 addresses, making the /24 narrower and thus more specific. Therefore, this statement is incorrect.
When this WOULD be correct
In a different scenario where the question asks about the relationship between subnet masks and routing preferences without specifying the context of longest-prefix matching, a question could state that a /16 is preferred for certain administrative tasks, making this statement correct in that context.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The 200-301 exam frequently reuses these exact scenarios with slightly different constraints.
✓The most specific matching route is preferred over broader matching routes.Correct answer▾
Why this is correct
This is the definition of longest-prefix match: among all routes in the routing table that match a destination IP, the one with the longest prefix length (i.e., the most network bits) is chosen. For example, a /24 match beats a /16 match because it identifies a smaller, more exact network. This preference is fundamental to IP routing.
✗A default route is preferred over a matching /24 because it is simpler.Wrong answer — click to see why▾
Why this is wrong here
A default route (0.0.0.0/0) is the least specific route and is only used when no other more specific route matches the destination. A /24 route is more specific and will always be preferred over a default route, regardless of simplicity.
★ When this WOULD be the correct answer
In a different question that asks about route selection based solely on simplicity and not specificity, option B could be correct if it states that a default route is chosen for its simplicity in a scenario where multiple routes exist but none match the destination exactly.
Why candidates choose this
Students may think that a default route is a catch-all and might be preferred for simplicity, but they forget that longest-prefix match prioritizes specificity over simplicity.
✗Routers ignore subnet masks and choose only by administrative distance.Wrong answer — click to see why▾
Why this is wrong here
Routers use the subnet mask (prefix length) to determine the most specific match. Administrative distance is only used to choose between routes from different routing sources when the prefix lengths are equal. Ignoring subnet masks would break longest-prefix match.
★ When this WOULD be the correct answer
In a question focused on routing protocols that only consider administrative distance for route selection, such as when comparing static routes to dynamic routes, this option could be correct if the context specifies that subnet masks are not evaluated.
Why candidates choose this
Test-takers may confuse the role of administrative distance with prefix length, thinking that AD is the primary factor in route selection, but it only applies after longest-prefix match.
✗A /16 is always more specific than a /24.Wrong answer — click to see why▾
Why this is wrong here
A /24 prefix (255.255.255.0) is more specific than a /16 prefix (255.255.0.0) because it has a longer subnet mask, meaning it matches a smaller range of addresses. A /16 is broader, not more specific.
★ When this WOULD be the correct answer
In a different scenario where the question asks about the relationship between subnet masks and routing preferences without specifying the context of longest-prefix matching, a question could state that a /16 is preferred for certain administrative tasks, making this statement correct in that context.
Why candidates choose this
Students might mistakenly think that a larger number (16 vs 24) indicates more specificity, but in prefix length, a larger number means a longer mask and thus more specificity.
Analysis generated from the official 200-301blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Visual reference
Quick reference
IPv4 Address Class Summary
| Class | First Octet Range | Default Mask | Networks | Hosts per Network |
|---|---|---|---|---|
| A | 1–126 | /8 (255.0.0.0) | 126 | 16,777,214 |
| B | 128–191 | /16 (255.255.0.0) | 16,384 | 65,534 |
| C | 192–223 | /24 (255.255.255.0) | 2,097,152 | 254 |
| D | 224–239 | N/A | Multicast groups | — |
| E | 240–255 | N/A | Reserved / experimental | — |
127.x.x.x is reserved for loopback. Modern networks use CIDR (classless) rather than classful addressing.
Go deeper
Related to this question
Learn chapter
OSPFv3 Single-Area Configuration for IPv6
Key term
Prefix length
A prefix length is the number of bits in a subnet mask that identifies the network portion of an IP address, written after a slash (e.g., /24).
Key term
CAN
A CAN (Controller Area Network) is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each other without a host computer.
About these practice questions
One of 1,389 original 200-301 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-301 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-301 exam.