What Is Needed to Make a NETCONF Script Work on IOS XE?
Short answer
B port=830
Question

Key Takeaways
This question tests your knowledge of NETCONF transport defaults: NETCONF uses port 830, not the default SSH port 22. The trap is to focus on the RPC call syntax while overlooking the connection-level port parameter.
For a NETCONF-capable Cisco IOS XE device, the default communication port is TCP 830. The community consensus confirms that adding port=830 to the ncclient connection is the correct fix for a failing script.
Common mistake: Choosing A because `get_config('show running')` appears to be a valid NETCONF retrieval call. In reality, the script already contains a `get_config` call, and the failure is caused by the missing `port=830` in the `manager.connect()` statement; additionally, `get_config` expects a datastore name like `'running'`, not a CLI command.
Expert Analysis
Why the Answer Is Correct
B is correct because NETCONF operates over TCP port 830 on Cisco IOS XE devices by default. The ncclient Python library needs port=830 explicitly in the manager.connect() call when the device is not listening on the library's default port. Community comment [1] and [4] both emphasize that NETCONF uses port 830, while port 22 is used for standard SSH.
Why the Other Options Are Wrong
Option A is incorrect because it modifies the RPC call, not the connection setup; the script already calls get_config(). Option C is malformed Python and the device_params dictionary should be valid, but it does not address the port issue. Option D sets hostkey_verify=True, which requires a known host key and is not the default setting needed to make the initial NETCONF connection succeed; in fact, hostkey_verify=False is often used in lab environments.
Community Comment Notes
Comment [2] lists the Cisco IOS XE NETCONF defaults: XML encoding, port 830, "admin" user, and SSH transport. Comment [3] provides a Cisco documentation link showing that NETCONF uses SSH and defaults to port 830. Comment [5] asks why option A is not the answer, which is well explained by the fact that the connection fails before any RPC call is made.
Official Reference
- https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/1612/b_1612_programmability_cg/configuring_yang_datamodel.pdf
- https://www.rfc-editor.org/rfc/rfc6241
- https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=netconf
These links open the official vendor documentation in a new tab.
Exam Strategy
When a NETCONF script fails, always inspect the manager.connect() parameters before worrying about RPC syntax. Remember that Cisco IOS XE NETCONF uses TCP port 830 by default, so if the script does not specify port=830, that is likely the missing configuration.
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 5
-
teems5uk 👍 3 Answered BB. port=830 NETCONF typically uses port 830 for communication.
-
peugeotdude 👍 2As per Cisco, Netconf uses SSH but defaults to port number 830 https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/1612/b_1612_programmability_cg/configuring_yang_datamodel.pdf NETCONFuses a simple RemoteProcedure Call (RPC) based mechanism to facilitate communication between a client and a server. The client can be a script or application running as part of a network manager. The server istypically a network device (switch or router). It usesSecureShell (SSH) asthe transport layer across network devices. It uses SSH port number 830 as the default port. The port number is a configurable option.
-
supershysherlock 👍 2B is correct. Typical defaults for a NETCONF-capable Cisco IOS XE device: XML as the data encoding format. Port 830 for NETCONF communication. The "admin" user for authentication by default. SSH as the transport protocol for secure communication.
-
chiacche 👍 1 Answered BNETCONF typically operates over port 830, which is the default port for NETCONF on Cisco devices. Port 22 is typically used for SSH.
-
FrankYaan1980 👍 2why it is not A?
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All 350-401 Questions
Access 218 questions with complete answers and detailed explanations.
View Full 350-401 Practice Test →