Courseiva
Automation →mediumMultiple Choice

350-401 Automation Practice Question

A network automation engineer is developing a Python script that will retrieve interface statistics from a Cisco IOS XE device using NETCONF. The engineer needs to discover which YANG models are supported by the device before constructing the RPC. Which NETCONF capability exchange message should the script send first to obtain this information?

⚠ Common exam trap

The trap here is assuming that capability discovery requires an explicit RPC or RESTCONF query, when it is actually part of the initial NETCONF session handshake.

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

✓

Establish an SSH session and read the <hello> message sent by the device immediately after the NETCONF subsystem is started.

The NETCONF protocol requires a capability exchange during session establishment. The server sends a <hello> message containing a <capabilities> element that lists all supported YANG models and protocol features. The client must parse this message to discover available models before sending any RPCs. This is fundamental to NETCONF operation and is defined in RFC 6241.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Send a RESTCONF GET request to the /restconf/data/ietf-yang-library:modules-state endpoint.

    Why it's wrong here

    RESTCONF is a different protocol from NETCONF and uses HTTP methods. While the ietf-yang-library model can provide module information, this endpoint is specific to RESTCONF and not used within a NETCONF session. The scenario explicitly requires a NETCONF approach, and the initial <hello> exchange is the correct method.

  • ✓

    Establish an SSH session and read the <hello> message sent by the device immediately after the NETCONF subsystem is started.

    Why this is correct

    When a NETCONF session is established over SSH, both the client and server exchange <hello> messages. The server's <hello> contains a <capabilities> element listing all supported YANG models and protocol features. This is the standard mechanism for capability discovery, and the client must parse this message to learn which models are available.

  • ✗

    Issue a NETCONF <get-config> RPC with a filter specifying the urn:ietf:params:xml:ns:yang:ietf-interfaces namespace.

    Why it's wrong here

    A <get-config> RPC retrieves configuration data for a specified datastore and filter. It does not return capability information. Using this RPC assumes the engineer already knows which YANG model to query, which defeats the purpose of discovering supported models. Capability discovery must precede any data retrieval operations.

  • ✗

    Send an <rpc> message with a <get> operation targeting the ietf-netconf-monitoring model.

    Why it's wrong here

    The <get> operation retrieves configuration and state data, not capability information. While the ietf-netconf-monitoring model can provide schema details, it requires prior knowledge of the model and does not return the list of supported capabilities. The initial capability exchange occurs automatically during session establishment, not via an explicit <get> RPC.

Go deeper

Related to this question

About these practice questions

This 350-401 question is part of Courseiva's 1,923-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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 350-401 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 350-401 exam.