YANG (Yet Another Next Generation) is a data modeling language standardized in RFC 6020/7950 that defines the structure, semantics, and syntax of data exchanged between network management protocols. It models the hierarchical configuration, operational state, remote procedure calls (RPCs), and event notifications of a network device in a machine-readable, protocol-independent format.
Glossary
YANG

What is YANG?
YANG is a data modeling language used to define the configuration and state data, operations, and notifications for network devices, serving as the foundation for model-driven programmability.
As the cornerstone of model-driven programmability, YANG modules serve as the single source of truth for a device's API contract. Tools like pyang and yanglint validate these modules, while protocols such as NETCONF and RESTCONF use them to instantiate the MAPE-K loop for closed-loop automation, enabling true declarative configuration and drift remediation.
Key Features of YANG
YANG is the foundational data modeling language for modern network programmability, defining the structure, constraints, and semantics of configuration and operational data.
Model-Driven Programmability
YANG enables model-driven programmability by providing a precise, machine-readable contract between network clients and servers. Unlike unstructured CLI scraping, YANG models define the exact syntax and semantics of every configurable element.
- Structured Data: Models define a strict tree hierarchy of containers, lists, and leaf nodes.
- Type Safety: Each leaf is bound to a specific data type (e.g.,
inet:ipv4-address,uint16), preventing invalid configurations. - Single Source of Truth: The YANG model serves as the definitive API specification, from which NETCONF, RESTCONF, and gRPC interfaces are derived.
Configuration and Operational State
YANG cleanly separates configuration data from operational state data using the config true/false statement. This distinction is fundamental to declarative intent-based networking.
- Config (
config true): The writable, intended state of the device, such as interface IP addresses or BGP peer settings. - State (
config false): Read-only data reflecting the device's actual running status, including interface counters, temperature sensors, and protocol adjacency tables. - Unified Tree: Both config and state are exposed in a single, coherent data tree, allowing operators to compare intended versus actual state for drift detection.
Reusable Types and Groupings
YANG promotes modularity through typedefs and groupings, preventing duplication and ensuring consistency across large, multi-vendor data models.
- Typedef: Defines a custom data type derived from a base type with added constraints. For example, a
vlan-idtypedef restricts auint16to the range 1–4094. - Grouping: A reusable block of schema nodes that can be referenced via the
usesstatement. Common structures like an IP prefix or a QoS policy can be defined once and instantiated in multiple places. - Augmentation: External modules can extend existing models without modifying the original, enabling vendor-specific extensions to standard models like
ietf-interfaces.
RPCs and Notifications
Beyond static data, YANG models define executable Remote Procedure Calls (RPCs) and asynchronous notifications for event-driven network management.
- RPC: Defines a parameterized operation that a server exposes. For example, an
activate-licenseRPC takes a license key as input and returns a success or error status. - Action: An operation bound to a specific data node instance, such as
reset-counterson a particular interface. - Notification: Defines an event that the server can push to subscribed clients, such as a
link-downalert with the interface name and timestamp. - YANG 1.1 introduced the
actionstatement, clarifying the distinction between global operations and instance-specific operations.
Constraints and Validation
YANG provides a rich constraint language that enforces data integrity at the model level, catching configuration errors before they are committed to a device.
mustStatement: An XPath expression that must evaluate totruefor the data to be valid. For example, amustconstraint can enforce that an MTU value does not exceed the parent interface's maximum.whenStatement: Makes a node conditional on an XPath expression, dynamically hiding or disabling irrelevant configuration branches.uniqueStatement: Enforces uniqueness across one or more descendant leafs within a list, such as ensuring no two VLANs share the same ID.rangeandlength: Restrict numeric and string values directly on type definitions.
Versioning and Module Management
YANG supports robust module lifecycle management through semantic versioning, import dependencies, and submodules, enabling multi-vendor interoperability.
revisionStatement: Tracks the version history of a module with a date stamp and description of changes.importandinclude:importreferences definitions from an external module, whileincludepulls in a submodule that shares the same namespace.- Backward Compatibility: YANG 1.1 introduced the
non-backwards-compatibleextension to signal breaking changes, allowing clients to gracefully handle model updates. - YANG Catalog: A public registry maintained by the IETF and industry bodies that indexes standardized and vendor-specific YANG modules for discovery.
Frequently Asked Questions
Clear, technical answers to the most common questions about YANG, the data modeling language that underpins modern model-driven network programmability and automation.
YANG is a data modeling language specifically designed to define the configuration and operational state data, administrative actions, and asynchronous notifications for network devices. It works by creating a structured, machine-readable contract between a network element and a management system. A YANG model describes the hierarchical organization of data, constraints, and data types using modules and submodules. This model is then used by protocols like NETCONF and RESTCONF to instantiate, manipulate, and stream data from devices. Unlike a Management Information Base (MIB), which is a flat list of objects, YANG models the complex, nested relationships of modern network functions, enabling true model-driven programmability where the API is generated directly from the model.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
YANG is the foundational data modeling language for network programmability. These related concepts form the ecosystem that enables model-driven, zero-touch operations.
YANG Schema Mount
A mechanism defined in RFC 8528 that allows one YANG module to reference and embed the entire schema tree of another module at a specific mount point. This is essential for modular device architectures.
- Use Case: Mounting line-card-specific YANG modules under a chassis controller module
- Scope: Each mount point creates an independent schema namespace
- Discovery: Clients query the mount point to retrieve the mounted schema tree
- Relationship: Enables recursive composition of device schemas without duplication
YANG Library
Defined in RFC 8525, YANG Library provides a standardized mechanism for a server to advertise the complete set of YANG modules, submodules, datastores, and schema mount points it supports.
- Content: Lists module name, revision, namespace, and conformance type
- Datastore Mapping: Associates each module with the datastores where it is implemented
- Dynamic Updates: YANG Library content changes when modules are loaded or removed at runtime
- Client Use: Enables automated tooling to discover device capabilities before issuing configuration

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us