Chapter 6
NETCONF/YANG
This chapter provides an overview of the NETCONF protocol and Yang (a data modelling language for NETCONF). It describes
the applications, installation and configuration steps, operation examples, Web UI demo, and troubleshooting aspects of
NETCONF. It also describes how to enable the NETCONF feature in OpenIL.
6.1 Overview
The NETCONF protocol defines a mechanism for device management and configuration retrieval and modification. It uses a
remote procedure call (RPC) paradigm and a system of exposing device (server) capabilities, which enables a client to adjust to
the specific features of any network equipment. NETCONF further distinguishes between state data (which is read-only) and
configuration data (which can be modified). Any NETCONF communication happens on four layers as shown in the table below.
XML is used as the encoding format.
Table 21. The NETCONF layers
Layer
Purpose
Example
1
Content
Configuration data, Notification data
2
Operations
<edit-config>
3
Messages
<rpc>, <rpc-reply>, <notification>
4
Secure
Transport SSH, TLS
YANG is a standards-based, extensible, hierarchical data modeling language that is used to model the configuration and state
data used by NETCONF operations, remote procedure calls (RPCs), and server event notifications. The device configuration
data are stored in the form of an XML document. The specific nodes in the document as well as the allowed values are defined
by a model, which is usually in YANG format or possibly transformed into YIN format with XML-based syntax. There are many
such models created directly by IETF to further support standardization and unification of the NETCONF interface of the common
network devices. For example, the general system settings of a standard computer are described in the IETF-system model
(
) or the configuration of its network interfaces defined by the IETF-interfaces model (
). However, it is common for
every system to have some specific parts exclusive to it. In that case there are mechanisms defined to enable extensions while
keeping the support for the standardized core. Also, as this whole mechanism is designed in a liberal fashion, the configuration
does not have to concern strictly network. Even RPCs additional to those defined by NETCONF can be characterized, thus
allowing the client to request an explicit action from the server.
A YANG module defines a data model through its data, and the hierarchical organization of and constraints on that data. A module
can be a complete, standalone entity, or it can reference definitions in other modules and sub-modules as well as augment other
data models with additional nodes. The module dictates how the data is represented in XML.
A YANG module defines not only the syntax but also the semantics of the data. It explicitly defines relationships between and
constraints on the data. This enables you to create syntactically correct configuration data that meets constraint requirements
and enables you to validate the data against the model before uploading it and committing it on a device.
For information about NETCONF, see
, NETCONF Configuration Protocol.
For information about YANG, see
, YANG - A Data Modeling Language for the Network Configuration Protocol
(NETCONF), and related RFCs.
6.2 Netopeer2
6.2.1 Overview
is a set of tools implementing network configuration tools based on the NETCONF Protocol. This is the second
generation of the toolset, originally available as the Netopeer project. It is based on the new generation of the NETCONF and
NXP Semiconductors
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
73 / 199