300-410 Infrastructure Services Practice Question
A network engineer is configuring a Cisco IOS router to authenticate OSPFv2 neighbors using MD5. The engineer wants to ensure that the authentication key is not sent in clear text and that the key can be changed without disrupting the adjacency. Which command should be used to configure the key on the interface?
⚠ Common exam trap
It's easy for candidates to confuse the command that enables MD5 authentication with the command that actually configures the MD5 key, leading to incomplete authentication setup.
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
✓
ip ospf message-digest-key <key-id> md5 <key>
To configure an MD5 key for OSPFv2 authentication on an interface, the 'ip ospf message-digest-key' command is used. The key is hashed and not sent in clear text. By configuring multiple keys with different key IDs, you can change the key without disrupting the adjacency. The other options either configure plaintext authentication or enable authentication without setting the key.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
area 0 authentication message-digest
Why it's wrong here
This command enables MD5 authentication for an entire OSPF area, not for a specific interface. While it can be used, it does not configure the key. The key still needs to be set on the interface with 'ip ospf message-digest-key'. The question asks for the command to configure the key on the interface, so this area-level command is not the correct answer.
- ✗
ip ospf authentication message-digest
Why it's wrong here
This command enables MD5 authentication on the interface but does not configure the key itself. It must be used in conjunction with the 'ip ospf message-digest-key' command. By itself, it does not provide the key, so authentication would fail. The requirement includes configuring the key, so this command alone is insufficient.
- ✓
ip ospf message-digest-key <key-id> md5 <key>
Why this is correct
The 'ip ospf message-digest-key' command with the 'md5' keyword configures an MD5 key for OSPFv2 authentication on an interface. The key is not sent in clear text; instead, an MD5 hash is used. Multiple keys can be configured with different key IDs, allowing for graceful key rollover without disrupting the adjacency. This meets both requirements.
- ✗
ip ospf authentication-key <key>
Why it's wrong here
The 'ip ospf authentication-key' command configures a plaintext authentication key for OSPFv2. It does not provide MD5 hashing, so the key would be sent in clear text, violating the requirement. Additionally, changing the key would require reconfiguration on both sides, potentially causing adjacency disruption. This command is used for simple password authentication, not MD5.
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
Courseiva writes every 300-410 question from scratch — 1,401 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 300-410 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 300-410 exam.