200-901 Infrastructure and Automation Practice Question
A developer is writing a Python script that uses the ncclient library to retrieve the running configuration from a Cisco IOS XE device via NETCONF. The script must filter the configuration to return only the interface configuration. Which filter type should be used in the <get-config> RPC to achieve this?
⚠ Common exam trap
It's easy for candidates to confuse NETCONF filter types with other filtering mechanisms like XPath or proprietary filters, or assuming that any filter type can be used interchangeably.
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
✓
subtree filter
NETCONF supports two standard filter types: subtree and xpath. The subtree filter is the most widely implemented and allows selective retrieval of configuration data by specifying an XML fragment. For retrieving only interface configuration, a subtree filter containing the <interfaces> node is the correct approach.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
xpath filter
Why it's wrong here
XPath filters are not defined in the base NETCONF specification for the <get-config> operation. While some vendors may support proprietary XPath-like filtering, it is not the standard method and would not be portable across Cisco IOS XE devices.
- ✗
attribute filter
Why it's wrong here
Attribute filters are not a valid NETCONF filter type. NETCONF defines only subtree and xpath filters in RFC 6241. An attribute filter would not be recognized by the device and would likely result in an error or unfiltered data.
- ✓
subtree filter
Why this is correct
A subtree filter allows the client to specify a partial XML tree that matches the desired configuration nodes. By providing a filter with the <interfaces> container, the device returns only the matching interface configuration, which is exactly what the script needs.
- ✗
key filter
Why it's wrong here
A key filter is not part of the NETCONF standard. While keys are used in YANG models to identify list entries, there is no 'key filter' type in NETCONF RPCs. Using this would be invalid and would not achieve the desired filtering.
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.