nerdexam
CiscoCisco

350-401 · Question #264

350-401 Question #264: Real Exam Question with Answer & Explanation

The correct answer is C: It opens an ncclient connection to a Cisco Nexus device and maintains it for the duration of the. Explanation Option C is correct because the code uses ncclient, a Python library specifically designed for NETCONF operations, to establish a persistent connection to a Cisco Nexus device - the manager.connect() function creates and maintains this connection for the entire durati

Submitted by satoshi_tk· Mar 6, 2026Automation

Question

Refer to the exhibit. What does the snippet of code achieve?

Options

  • AIt creates a temporary connection to a Cisco Nexus device and retrieves a token to be used for
  • BIt opens a tunnel and encapsulates the login information, if the host key is correct.
  • CIt opens an ncclient connection to a Cisco Nexus device and maintains it for the duration of the
  • DIt creates an SSH connection using the SSH key that is stored, and the password is ignored.

Explanation

Explanation

Option C is correct because the code uses ncclient, a Python library specifically designed for NETCONF operations, to establish a persistent connection to a Cisco Nexus device - the manager.connect() function creates and maintains this connection for the entire duration of the script or session, allowing NETCONF RPC calls to be made over it.

  • Option A is wrong because ncclient/NETCONF does not retrieve tokens; token-based authentication is associated with REST APIs (like RESTCONF or NX-API), not NETCONF sessions.
  • Option B is wrong because while NETCONF runs over SSH, the code is not specifically "opening a tunnel" or focusing on host key verification as its primary purpose - that describes SSH tunneling behavior, not ncclient functionality.
  • Option D is wrong because ncclient uses standard SSH credentials (username/password or keys), but the manager.connect() call with a password parameter actively uses the password - it is not ignored.

Memory Tip: Associate ncclientNETCONF clientpersistent XML-based management session. If you see manager.connect() with host, port 830, username, and password parameters, it's always an ncclient/NETCONF connection, since port 830 is the default NETCONF port.

Topics

#ncclient#NETCONF#Python network automation#Cisco Nexus

Community Discussion

No community discussion yet for this question.

Full 350-401 PracticeBrowse All 350-401 Questions