mediumMultiple Choice
CCNP Practice Question: Examine this OSPF configuration on router R4:…
Examine this OSPF configuration on router R4:
interface GigabitEthernet0/0 ip address 172.16.1.4 255.255.255.0 ip ospf 1 area 0 ip ospf cost 50
!
router ospf 1
router-id 4.4.4.4
network 172.16.0.0 0.0.255.255 area 0
What is the OSPF cost of the GigabitEthernet0/0 interface?
⚠ Common exam trap
Cisco often tests the precedence of the `ip ospf cost` command over the default cost calculation, trapping candidates who assume the default cost for GigabitEthernet (1) or who incorrectly calculate the cost using the reference bandwidth formula without considering the explicit configuration.
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
✓
50
The OSPF cost of an interface is determined by the `ip ospf cost` command, which explicitly overrides the default cost calculation based on reference bandwidth. Since R4's GigabitEthernet0/0 interface has `ip ospf cost 50` configured under it, the cost is set to 50 regardless of the interface bandwidth or reference bandwidth settings.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
50
Why this is correct
The OSPF cost on this interface is explicitly configured to 50 using the 'ip ospf cost' command. This manual assignment takes absolute precedence over any automatically derived cost, so the router uses exactly 50 when computing the SPF metric for routes learned via this interface. Because the configured value is 50, it is the correct answer.
- ✗
1 (default for GigabitEthernet)
Why it's wrong here
A GigabitEthernet interface's default OSPF cost is computed as reference-bandwidth (100 Mbps) divided by interface bandwidth (1000 Mbps), giving 0.1 which rounds to 1. However, this default only applies when no explicit cost is configured. Since 'ip ospf cost 50' overrides the default, 1 is not the actual cost in this scenario.
- ✗
100 (derived from reference bandwidth 100 Mbps / 1 Gbps)
Why it's wrong here
The value 100 might result from an incorrect formula interpretation, such as dividing the default reference bandwidth of 100 Mbps by 1 Gbps and misreading the units (100/1 = 100). But the correct default calculation for a GigabitEthernet interface is 100/1000 = 0.1, which rounds to 1—not 100. Moreover, the explicit 'ip ospf cost 50' command takes precedence over any derived value, making 100 wrong on two counts.
- ✗
10 (derived from reference bandwidth 1000 Mbps / 100 Mbps)
Why it's wrong here
This option could stem from using a reference bandwidth of 1000 Mbps and dividing by 100 Mbps, yielding 10. But OSPF's default reference bandwidth is 100 Mbps, and the interface is GigabitEthernet at 1000 Mbps, so the derived default is 0.1, rounded to 1. Additionally, the manually configured 'ip ospf cost 50' overrides any bandwidth-based calculation, so 10 is neither the default nor the effective cost.
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.
About these practice questions
One of 1,923 original 350-401 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 350-401 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 350-401 exam.