CCNP Infrastructure Practice Question
A network engineer is deploying a new branch office router that must obtain its WAN interface IP address dynamically from the ISP while also advertising its LAN prefix into OSPF. The engineer configures the WAN interface with the ip address dhcp command. Which additional configuration is required on the router to ensure the LAN prefix is advertised into OSPF with the correct network statement when the WAN IP changes?
⚠ Common exam trap
The trap here is assuming that because the WAN interface uses DHCP, the OSPF configuration must also be dynamic, but the LAN advertisement is separate and should use a static network statement.
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
✓
Use the network command with a wildcard mask that matches the LAN subnet under router ospf.
The network command under router ospf with a wildcard mask matching the LAN subnet is the correct way to advertise the LAN prefix into OSPF. It is independent of the WAN interface's DHCP-assigned IP address, so the advertisement remains stable even if the WAN IP changes. Other options either advertise the wrong prefix or introduce unnecessary complexity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable OSPF on the WAN interface and rely on connected route redistribution.
Why it's wrong here
Enabling OSPF on the WAN interface would advertise the WAN subnet, not the LAN prefix. Redistributing connected routes might include the LAN, but it is not the most direct or recommended method and can lead to suboptimal routing. The requirement specifically asks for the LAN prefix to be advertised with the correct network statement.
- ✓
Use the network command with a wildcard mask that matches the LAN subnet under router ospf.
Why this is correct
The network command under router ospf with a wildcard mask matching the LAN subnet will advertise the LAN prefix into OSPF regardless of the WAN IP address. This is the standard method to enable OSPF on an interface and advertise its connected network. It does not depend on the WAN IP, so it remains stable when the DHCP lease changes.
- ✗
Configure a static route to the ISP and redistribute it into OSPF.
Why it's wrong here
Redistributing a static default route does not advertise the LAN prefix into OSPF. The LAN prefix must be advertised via a network statement or redistribution of connected interfaces. A static route to the ISP only provides a default path and does not satisfy the requirement to advertise the LAN prefix dynamically when the WAN IP changes.
- ✗
Configure OSPF to use the interface's DHCP-assigned IP address as the router ID.
Why it's wrong here
The router ID is chosen from the highest loopback or active interface IP, but it does not affect which prefixes are advertised. Using the DHCP-assigned IP as router ID could cause instability if the address changes. This does not ensure the LAN prefix is advertised into OSPF when the WAN IP changes.
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
Courseiva writes every 350-401 question from scratch — 1,923 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
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.