350-401 · Question #1351
350-401 Question #1351: Real Exam Question with Answer & Explanation
The correct answer is C: It prints the XML output of "show running interface GigabitEthernet 1" on the device with IP. Explanation Option C is correct because the script uses NETCONF with ncclient to establish a connection to a device at IP 192.168.1.10 and executes a get_config or dispatch operation using an XML filter targeting the GigabitEthernet 1 interface - this is a read operation, not a w
Question
Refer to the exhibit. What is the result of running the script?
Options
- AIt configures the IP address 192.168.1.10 on the GigabitEthernet 1 interface and prints the new
- BIt opens interface config mode on the router and prompts for further XML commands from the
- CIt prints the XML output of "show running interface GigabitEthernet 1" on the device with IP
- DIt prints the XML output of "show running" on the device with IP 192.168.1.0.
Explanation
Explanation
Option C is correct because the script uses NETCONF with ncclient to establish a connection to a device at IP 192.168.1.10 and executes a get_config or dispatch operation using an XML filter targeting the GigabitEthernet 1 interface - this is a read operation, not a write/configure operation, so it retrieves and prints the XML-formatted running configuration for that specific interface.
Why the distractors are wrong:
- Option A is incorrect because the script performs a GET (read) operation, not a SET/edit-config (write) operation that would push an IP address configuration to the device.
- Option B is incorrect because NETCONF does not "open an interactive config mode" - it is a programmatic, session-based protocol that exchanges complete XML messages, not an interactive CLI prompt.
- Option D is incorrect because
192.168.1.0is typically a network address, not a host address, and the script targets192.168.1.10; additionally, the XML filter scopes the output toGigabitEthernet 1, not the entire running config.
💡 Memory Tip: Think "NETCONF GET = XML printout" - if the script uses
get_configwithout anedit-config, it's always reading and displaying XML data, never configuring. The host IP in the connection manager is your target device address.
Topics
Community Discussion
No community discussion yet for this question.