NETCONF and YANG introduction

  • LinkedIn
  • facebook
  • Twitter
HomeProducts & TechnologyOperating SystemComware V7Technologies




Network Configuration Protocol (NETCONF) is an XML-based network management protocol with filtering capabilities. It provides programmable mechanisms to manage and configure network devices. Through NETCONF, you can configure device parameters, retrieve parameter values, and get statistics information.

In NETCONF messages, each data item is contained in a fixed element. This enables different devices of the same vendor to provide the same access method and the same result presentation method. For the devices of different vendors, XML mapping in NETCONF messages can achieve the same effect. For a network environment containing different devices regardless of vendors, you can develop a NETCONF-based NMS system to configure and manage devices in a simple and effective way.

NETCONF structure

NETCONF has four layers: content layer, operations layer, RPC layer, and transport protocol layer.

NETCONF message format

All NETCONF messages are XML-based and comply with RFC 4741. Any incoming NETCONF messages must pass XML Schema check before it can be processed. If a NETCONF message fails XML Schema check, the device sends an error message to the client.

For information about the NETCONF operations supported by the device and the operable data, see the NETCONF XML API reference for the device.

Supported NETCONF operations

The following NETCONF operations are available with Comware 7:

Retrieving the running data.

Filtering data.

Modifying the running configuration.

Performing CLI operations through NETCONF.

Rolling back the configuration.

Retrieving YANG file content.

How to use NETCONF

You can use NETCONF to manage and configure the device by using the methods in Table 1.

Table 1 NETCONF methods for configuring the device

Configuration tool

Login method



Console port



This method uses the CLI to implement NETCONF operations.

This method is suitable for R&D and test purposes.

Custom interface


To use this method, you must enable NETCONF over SOAP or NETCONF over SSH to encode the NETCONF messages sent from a custom interface.


YANG is a data modeling language used to model the operations, data, and notifications manipulated by NETCONF. YANG features good readability and extensibility.

Both the device and client can use YANG for modeling. After the device provides a YANG data model, the client can use a conversion tool to automatically generate the corresponding access codes. This mechanism reduces the workload of developers.

Are you an H3C partner? Log in to see additional resources.
You can find excellent H3C partners, or you can become one of them to build a
partnership with H3C and share success together.