JN0-106 Networking Fundamentals Practice Question
A router receives a packet with destination IP 10.1.1.100. The routing table contains two entries: a static route to 10.1.1.0/24 via 192.168.1.1, and an OSPF route to 10.1.1.0/25 via 192.168.2.1. Which route will the router use?
⚠ Common exam trap
Watch out — candidates often assume OSPF routes are always preferred over static routes due to administrative distance, but Junos (and all routers) prioritize the longest prefix match first, so a more specific static route would win over a less specific OSPF route.
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 OSPF route to 10.1.1.0/25
The router will use the OSPF route to 10.1.1.0/25 because it has a longer prefix length (/25) than the static route (/24). Juniper Junos uses the most specific (longest) prefix match in the routing table, regardless of administrative distance or protocol preference. The destination IP 10.1.1.100 falls within the 10.1.1.0/25 range (10.1.1.0–10.1.1.127), so the /25 route is more specific and thus preferred.
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 router drops the packet due to a routing conflict
Why it's wrong here
The router never drops the packet merely because there is more than one matching route. Overlapping routes are normal, and the forwarding decision is deterministic: the router selects the route with the longest prefix length (the most specific match) and then the lowest administrative distance if the prefix lengths are equal. A routing conflict would imply an error condition, such as an ambiguous next hop, which does not occur here because the two routes have different prefix lengths and the /25 is clearly the best match.
- ✓
The OSPF route to 10.1.1.0/25
Why this is correct
The destination address 10.1.1.100 falls inside both the 10.1.1.0/24 and 10.1.1.0/25 networks, but the forwarding decision is based on longest prefix match. Since /25 (255.255.255.128) is more specific than /24 (255.255.255.0), the OSPF route to 10.1.1.0/25 is the selected best route. This holds regardless of the administrative distance ranking of the two protocols because prefix length is evaluated before administrative distance.
- ✗
The static route to 10.1.1.0/24
Why it's wrong here
The static route to 10.1.1.0/24 has a prefix length of 24, which covers the entire 10.1.1.0–10.1.1.255 range and therefore also matches 10.1.1.100. However, it is a less specific match than the OSPF /25 route. Junos (and all IP routers) use the longest prefix match first, so the /24 route is never installed as the active forwarding entry for this destination. It may remain in the routing table as a backup or alternate route, but it is not used for this packet.
- ✗
Both routes are used for load balancing
Why it's wrong here
Load balancing in Junos occurs only among equal-cost paths to the exact same destination prefix, meaning the same prefix length and the same administrative distance. Here the two routes have different prefix lengths (/24 vs /25), so they do not form equal-cost paths. The router will never use both routes in parallel for forwarding a single packet; longest-prefix match determines the single Active route, and the other route is merely a fallback if the active route disappears.
Visual reference
Quick reference
Routing Protocol Comparison
| Protocol | Metric | Max Hops | Algorithm | Type |
|---|---|---|---|---|
| RIP v2 | Hop count | 15 | Bellman-Ford | Distance vector |
| OSPF | Cost (bandwidth) | Unlimited | Dijkstra (SPF) | Link state |
| EIGRP | Composite metric | Unlimited | DUAL | Hybrid |
| IS-IS | Cost | Unlimited | Dijkstra | Link state |
| BGP | Policy / attributes | Unlimited | Path vector | Path vector |
RIP's 15-hop limit makes it unsuitable for large networks. OSPF and EIGRP dominate modern enterprise deployments.
Go deeper
Related to this question
About these practice questions
One of 156 original JN0-106 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 JN0-106 practice question is part of Courseiva's free Juniper Networks 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 JN0-106 exam.