200-901 Infrastructure and Automation Practice Question
A network automation engineer needs to retrieve the running configuration of a Cisco IOS XE device using NETCONF. Which ncclient method should be used to fetch the configuration without modifying the device?
⚠ Common exam trap
It's easy for candidates to confuse the method that stages or applies changes with the method that simply reads configuration from a datastore.
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
✓
get_config
Reading the running configuration over NETCONF requires a read operation against the running datastore. The ncclient get_config method is designed for exactly this purpose, accepting a source datastore and optional subtree or XPath filter. The other methods either modify state, apply staged changes, or send unvalidated raw RPCs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
get_config
Why this is correct
get_config retrieves configuration data from a specified datastore, such as running, without altering the device. It accepts a source datastore and an optional filter, making it the correct method for reading the running configuration in a read-only operation. This matches the scenario's requirement exactly.
- ✗
edit_config
Why it's wrong here
edit_config is used to change the device configuration by sending a configuration payload to a target datastore. It modifies device state rather than retrieving it, so it does not satisfy the requirement to fetch the running configuration without changes. Using it here could unintentionally alter the device.
- ✗
dispatch
Why it's wrong here
dispatch sends a raw RPC XML string to the device, which is powerful but low-level and error-prone for simple retrieval. While it could technically be used to send a get-config RPC, it is not the dedicated method for fetching configuration and does not provide the same clarity or validation as the purpose-built method.
- ✗
commit
Why it's wrong here
commit applies changes that were previously staged in the candidate datastore to the running configuration. It is a write operation and requires a prior edit_config. It does not retrieve configuration and would fail or do nothing meaningful if called without staged changes.
Go deeper
Related to this question
About these practice questions
One of 975 original 200-901 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 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 200-901 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 200-901 exam.