6.0 Automation
NETCONF, RESTCONF & YANG Practice Questions
Model-driven programmability with NETCONF, RESTCONF, and YANG data models.
One solved question, so you can see how these are marked
Which protocol operates over SSH port 830 and utilizes XML-encoded payload framing alongside YANG data models for network configuration?
NETCONF
NETCONF uses SSH on port 830 to exchange XML-encoded data structures defined by YANG models.
Every question in the set below is marked like this. The answers stay hidden until you pick one.
All 27 NETCONF, RESTCONF & YANG questions in this set
Answers and explanations appear when you work through the set above.
Which URI root prefix and HTTP headers are standard when establishing a RESTCONF connection to retrieve JSON data from a Cisco IOS XE device?
- Root: /restconf/data/, Header: Accept: application/yang-data+json
- Root: /api/v1/, Header: Content-Type: text/xml
- Root: /netconf/xml/, Header: Accept: application/netconf+json
- Root: /dna/intent/api/, Header: Accept: application/yaml
In YANG modeling language, what keyword represents data that can be queried and modified by configuration commands (such as setting an IP address)?
- config true
- config false
- operational
- state
Which HTTP method is used in RESTCONF to create a new resource or execute an operation without replacing the target object entirely?
- GET
- POST
- PUT
- DELETE
Which standard NETCONF protocol operation retrieves running configuration data and device operational state data simultaneously?
- <get-config>
- <get>
- <edit-config>
- <copy-config>
Which HTTP header must be included in a RESTCONF request when sending a JSON payload to modify a configuration on a Cisco device?
- Content-Type: application/yang-data+json
- Accept: text/plain; charset=utf-8
- Content-Type: application/xml-config
- Content-Type: application/x-www-form-urlencoded
Which REST API GET request endpoint path retrieves the inventory list of managed network devices from a Cisco DNA Center platform?
- /dna/intent/api/v1/network-device
- /api/v1/topology/switches
- /restconf/data/cisco-dna-devices
- /dna/system/api/v1/inventory
On a Cisco IOS XE device, which URI path prefix is used for RESTCONF configuration and operational data resources?
- /api/v1/data/
- /restconf/data/
- /yang/config/
- /dna/intent/api/
Which layer of the NETCONF protocol framework defines RPC wrapper messages such as <rpc> and <rpc-reply>?
- Transport Protocol Layer
- Operations Layer
- Messages Layer
- Content Layer
In YANG modeling, which statement structure defines a list of nodes that can exist multiple times in configuration data, requiring a key leaf for unique identification?
- container
- leaf
- list
- typedef
What key advantage does Model-Driven Streaming Telemetry provide over traditional SNMP polling?
- It pushes data periodically or on change, in YANG-modeled form, with no polling.
- SNMP processes telemetry faster than gRPC because it encodes data as ASN.1 BER.
- Streaming telemetry runs over UDP port 161, the same port used for SNMP polls.
- Telemetry sends unstructured CLI show output that operators read by eye.
Which RESTCONF HTTP operational request method maps directly to the NETCONF <edit-config> operation using target operation="create"?
- GET
- POST
- DELETE
- OPTIONS
In YANG data modeling, what node type holds a single primitive data value (such as an integer, string, or boolean) without child nodes?
- container
- leaf
- list
- module
What standard TCP port is assigned for secure NETCONF communication over SSH?
- TCP 830
- TCP 443
- TCP 80
- TCP 22
What is the relationship between YANG data models and XML/JSON payloads in network automation?
- YANG is a programming language that compiles Python scripts into CLI binaries.
- YANG defines the structure, types, and constraints; XML or JSON encodes the data.
- YANG replaces SSH as the transport layer that NETCONF sessions run over.
- YANG is a format used to render SNMP traps into syslog messages for a collector.
Which NETCONF operation retrieves running configuration data together with operational state data, optionally narrowed by a filter?
- <get-config>
- <get>
- <edit-config>
- <copy-config>
Which HTTP header must be included in a RESTCONF request to instruct the server to format the returned response body as JSON data?
- Content-Type: application/yang-data+xml
- Accept: application/yang-data+json
- Authorization: Bearer Cisco123
- User-Agent: Python-Requests/2.25
Why is Ansible categorized as an agentless configuration management platform, unlike Puppet or Chef?
- Ansible requires a specialized hypervisor to be installed on each managed target.
- It connects over standard protocols such as SSH or NETCONF, with no agent installed.
- Ansible runs on Windows endpoints and pushes its agent to devices over SMB.
- Ansible playbooks are compiled C++ binaries copied to each device and run there.
In NETCONF (RFC 6241), which standard datastore target represents the operational configuration currently active and executing on a network router?
- <running/>
- <candidate/>
- <startup/>
- <intended/>
On a RESTCONF server that implements the RFC 8527 datastore resources, which path reads the candidate configuration datastore?
- /restconf/data?content=config
- /restconf/ds/ietf-datastores:candidate
- /restconf/operations/ietf-netconf:commit
- /restconf/running/candidate-config
Which HTTP method mapping correctly correlates to standard RESTCONF CRUD (Create, Read, Update, Delete) operations?
- GET = Create, POST = Read, PUT = Delete, DELETE = Update
- POST = Create, GET = Read, PATCH = Modify/Update, DELETE = Delete
- PUT = Read, POST = Update, DELETE = Create, GET = Delete
- FETCH = Read, SEND = Create, ALTER = Update, REMOVE = Delete
In the NETCONF protocol layer architecture, how are request messages and response payloads wrapped during client-server interactions?
- Requests are sent as raw CSV records, and responses come back as JSON objects.
- Requests are wrapped in <rpc> elements and replies in <rpc-reply> elements.
- Both requests and replies are sent over UDP port 161 as SNMP variable bindings.
- Requests use plain YAML documents with no enclosing tags around the operation.
In a YANG data model, what is the core structural difference between a leaf-list and a list?
- A leaf-list holds single-type values; a list holds entries with child nodes, keyed in config.
- A leaf-list is used only for write operations, while a list is used for read-only state.
- A leaf-list stores binary image files, while a list stores string variables only.
- They are identical and interchangeable; leaf-list is the older YANG 1.0 spelling.
Which configuration management tool utilizes an agentless, push-based operational model driven over SSH/NETCONF, contrasting with agent-based pull models?
- Ansible
- Puppet
- Chef
- SaltStack (in standard minion mode)
What API endpoint path is invoked on Cisco Catalyst Center to generate an authentication token using HTTP Basic Auth credentials?
- /dna/system/api/v1/auth/token
- /restconf/data/ietf-interfaces
- /api/v1/login/session
- /api/v1/certs/ssl
In RESTCONF (RFC 8040), what is the key functional difference between the PUT and PATCH HTTP methods when modifying resource configurations?
- PUT creates new log entries in the datastore, while PATCH deletes user accounts.
- PUT replaces the whole target resource; PATCH merges only the fields it sends.
- PUT is a read-only method, while PATCH is the write method for configuration.
- PUT requires XML encoding, while PATCH requires plaintext YAML in the body.
What is the default TCP transport layer protocol and port reserved for standard NETCONF communications?
- HTTP over TCP Port 80
- SSH over TCP Port 830
- HTTPS over TCP Port 443
- UDP Port 161
In a YANG data model, which node statement defines a complex structural container that organizes child data nodes into a logical hierarchy, but contains no actual data value itself?
- leaf
- leaf-list
- container
- typedef