350-401 Automation Practice Question
A network automation team is evaluating YANG as the data modeling language underpinning its Cisco IOS XE automation. Which two statements accurately describe YANG in this context? (Choose two.)
⚠ Common exam trap
A common mix-up: candidates confuse YANG, a modeling language, with the transport protocols that actually carry its data.
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
✓
YANG modules can include constraints such as type, range, and pattern on leaves, and devices enforce these during configuration validation.
YANG is a hierarchical data modeling language that defines configuration and state schemas transported by NETCONF and RESTCONF. Its leaves carry constraints such as type, range, and pattern that devices validate on write, which is why model-driven automation is more robust than CLI scraping. YANG is an open standard, is not a transport itself, and its data can be encoded in XML or JSON depending on the protocol and media type.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
YANG replaces the need for underlying transport protocols by embedding its own session and encryption layer for device communication.
Why it's wrong here
YANG is only a modeling language and carries no transport or encryption of its own. It relies on NETCONF over SSH or RESTCONF over HTTPS to move data between client and device. Claiming YANG embeds session and encryption functions mischaracterizes it as a protocol, which is incorrect and would lead engineers to expect security features that YANG does not provide.
- ✓
YANG modules can include constraints such as type, range, and pattern on leaves, and devices enforce these during configuration validation.
Why this is correct
YANG leaves carry built-in types and restriction statements like range, length, pattern, and mandatory. When a NETCONF or RESTCONF write arrives, the device validates the value against these constraints, producing errors such as 'invalid-value' if violated. This enforcement is central to why model-driven interfaces are more reliable than CLI screen-scraping, and it directly reflects how YANG behaves on IOS XE.
- ✗
YANG data can only be serialized as XML, so JSON payloads are invalid for any NETCONF or RESTCONF operation.
Why it's wrong here
NETCONF uses XML encoding, but RESTCONF supports both XML and JSON through media types like application/yang-data+json. Saying YANG data can only be serialized as XML is incorrect and would wrongly exclude JSON-based automation. This misconception often leads engineers to avoid RESTCONF with JSON even though IOS XE fully supports it.
- ✗
YANG models are proprietary to Cisco and cannot be extended or reused across different vendors' network operating systems.
Why it's wrong here
YANG is an open standard published by the IETF, and many models such as ietf-interfaces are vendor-neutral and reused across platforms. Vendors can augment standard models with native extensions, but the base language and common models are not proprietary to Cisco. This statement is therefore false and would mislead a team into avoiding reusable, standards-based models.
- ✓
YANG defines a hierarchical, tree-structured schema for configuration and state data that protocols such as NETCONF and RESTCONF can transport.
Why this is correct
YANG is a data modeling language that describes configuration and state data in a hierarchical tree, with nodes, containers, lists, and leaves. NETCONF and RESTCONF use these models to encode payloads in XML or JSON. This statement accurately captures YANG's role as the schema layer that gives structure and validation to model-driven automation on IOS XE.
Go deeper
Related to this question
Learn chapter
Network Automation and Programmability
Key term
NETCONF Protocol
NETCONF is a network management protocol that uses a structured data format to configure, retrieve, and modify network devices in a standard, programmatic way.
Key term
REST API for Network Devices
A REST API for network devices is a set of rules that allows software applications to communicate with routers, switches, and firewalls using standard web methods like GET, POST, PUT, and DELETE over HTTP or HTTPS.
About these practice questions
Courseiva writes every 350-401 question from scratch — 1,923 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.