JN0-106 User Interfaces Practice Question
You are a junior network engineer at a company that uses Juniper MX routers. You are troubleshooting a connectivity issue on a branch router. The branch router has two upstream links to the corporate network: ge-0/0/0 (10.1.1.1/30, connected to core router A) and ge-0/0/1 (10.1.1.5/30, connected to core router B). The branch router runs OSPF and has a default route learned from both upstream routers. The routing table shows two equal-cost default routes via both next hops. However, traffic from the branch to the corporate network is experiencing intermittent high latency and some packet loss. You suspect that asymmetric routing is causing issues because the return traffic is not following the same path. You want to influence the router to prefer one upstream link for all traffic to the corporate network. You have decided to adjust the OSPF metric on the branch router to make the link to core router A more preferred. You are in configuration mode on the branch router. Which single configuration change will accomplish this goal?
⚠ Common exam trap
Watch out — candidates often confuse the 'metric' configuration under the OSPF protocol hierarchy with the 'cost' parameter under interfaces, or mistakenly think that making an interface passive or adjusting loopback metrics will influence OSPF path selection.
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
✓
set protocols ospf area 0 interface ge-0/0/1 metric 200
Setting the OSPF metric on interface ge-0/0/1 to a higher value (200) increases the cost of that link, making the default route via ge-0/0/0 (which retains the default OSPF metric of 1 on a Gigabit Ethernet interface) more preferred. This influences the branch router to use the lower-cost path through core router A for all traffic to the corporate network, resolving asymmetric routing issues.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
set interfaces ge-0/0/1 unit 0 family inet cost 200
Why it's wrong here
The `cost` parameter is not a valid interface-level statement under `family inet` in JUNOS; OSPF interface cost or metric is configured under the `protocols ospf` hierarchy, typically as `metric`. This command would be rejected by the CLI because the leaf `cost` does not exist at that level, so it has no effect on OSPF path selection. Even if it were accepted, OSPF reads its interface metric from the OSPF configuration, not from the interface family settings, so this change would not influence the preference between ge-0/0/0 and ge-0/0/1.
- ✗
set protocols ospf area 0 interface ge-0/0/1 passive
Why it's wrong here
Configuring `ge-0/0/1` as a passive OSPF interface stops the device from sending or processing OSPF Hello packets on that link, which prevents the formation of an OSPF adjacency with the neighbor attached to that interface. Without an adjacency, the remote router will not learn the routes through ge-0/0/1, and OSPF will not advertise transit transit traffic over that link, potentially causing a blackhole or loss of connectivity if the path should remain usable. Passive mode is useful for advertising directly connected networks like loopbacks or stub segments without exchanging routing information, but it is the wrong tool here because the goal is to alter path preference while keeping the neighbor relationship intact.
- ✓
set protocols ospf area 0 interface ge-0/0/1 metric 200
Why this is correct
This is the correct configuration because in JUNOS, OSPF interface metric is explicitly set with the `metric` statement under `protocols ospf` for the specific interface. By assigning a metric of 200 to ge-0/0/1, the router's OSPF cost calculation makes that interface significantly more expensive than ge-0/0/0 (which retains the default metric, typically 10 for Ethernet), thereby forcing transit traffic to prefer ge-0/0/0. This effectively shifts traffic away from ge-0/0/1 while still allowing the OSPF adjacency to remain established, so the link stays available for redundancy or less-preferred use.
- ✗
set interfaces lo0 unit 0 family inet address 10.0.0.1/32 metric 100
Why it's wrong here
The `metric` statement is not valid under `family inet` at the interface hierarchy level; JUNOS does not allow setting an OSPF metric on the loopback interface that way, and the command would be rejected. More importantly, the loopback address `10.0.0.1/32` is a host route that OSPF advertises as a stub network, and its OSPF metric is derived from the OSPF interface metric configured for the loopback in OSPF, not from any generic interface metric. Altering a loopback metric would only affect how other routers see the loopback itself, not how transit traffic is routed through ge-0/0/1, so it cannot solve the intended path-selection problem.
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.