DevNet Associate (DEVASC) v1.0Infrastructure and AutomationMedium

A network automation script needs to check if a specific interface on a Cisco device is currently up and receiving packets. The most efficient way to retrieve this real-time operational status programmatically, without parsing CLI output, would be to use a protocol that can query structured data directly. Which protocol, often used with YANG data models, supports this type of operational state retrieval?

  1. ASSH (CLI)
  2. BSNMP
  3. CNETCONF
  4. DTelnet
Show answer & explanation

Correct answer: C. NETCONF

NETCONF is designed for programmatic configuration and operational state retrieval using structured data (YANG models). It allows querying specific data points (like interface status) directly without parsing unstructured CLI output, making it much more efficient and reliable than Telnet, SNMP (for detailed operational state), or CLI over SSH.

Why the other options are wrong

  • A. SSH (CLI) involves screen scraping, which is prone to errors, inefficient, and not structured.
  • B. SNMP can get some operational data, but NETCONF with YANG provides a richer, more granular, and standardized way to retrieve detailed operational state.
  • D. Telnet is insecure and relies on CLI parsing, not structured data.

NETCONF Operational Data

NETCONF allows programmatic retrieval of operational state data from network devices, providing structured access to real-time information defined by YANG models.

  • Retrieves real-time operational state.
  • Uses YANG models for data structure.
  • More granular and reliable than CLI parsing.
  • Accessible via `get` or `get-config` RPCs depending on data type.

Memory trick: Retrieve operational data with structured protocols, not CLI.

More Infrastructure and Automation questions