300-435 Question 2
Single answerA network engineer is tasked with automating the configuration of a Cisco network using Python and NETCONF. The engineer decides to use the ncclient library to establish a connection to a network device and retrieve its running configuration. Which key action must the engineer perform to successfully establish the NETCONF session and retrieve the desired configuration?
- A
Ensure that the NETCONF port (830) is open and accessible on the network device
- B
Install the Cisco-specific NETCONF schema files on the Python environment
- C
Enable SNMP on the network device for communication with ncclient
- D
Use an SSH key pair for authentication instead of a username and password
Show answer and explanation
Correct answer: A
Explanation
To successfully establish a NETCONF session with a network device using ncclient, the engineer must ensure that the NETCONF service is enabled and the default port (830) is open and accessible. NETCONF relies on SSH for communication, but this does not mandate the use of SSH keys. SNMP and schema installation are unrelated to the ncclient library's functionality.
- A. Correct.
This is correct. NETCONF operates over port 830 by default, and this port must be open and accessible for the ncclient library to establish a session.
- B. Incorrect.
This is incorrect. While NETCONF uses XML-based data models, the ncclient library does not require pre-installation of Cisco-specific schema files. The library interacts with the device's built-in NETCONF capabilities.
- C. Incorrect.
This is incorrect. NETCONF and SNMP are separate protocols. NETCONF does not rely on SNMP for communication.
- D. Incorrect.
This is incorrect. While SSH is used for NETCONF connectivity, username and password authentication is commonly used. SSH key-based authentication is an option but not a requirement.