Model-Driven Programmability: NETCONF and RESTCONF

Model-driven programmability is considered the main component in innovating network automation, a game-changer in the computer networks arena. Network automation is the future, and it is already here. Majority if not all of the major Service Providers and Enterprise Networks are shifting to a more service-oriented approach to manage their networks by looking at IETF’s Network Configuration Protocol (NETCONF), Representational State Transfer Configuration Protocol (RESTCONF), and a data modeling language known as YANG to aid in managing the time, finances and processes efficiently when it comes to network element configuration.

 

NETCONF

The NETCONF protocol enables the device to expose an entire formal Application Programming Interface (API). Applications can use this straightforward API to send and receive full and partial configuration data sets.

NETCONF protocol, according to IETF RFC 6241, is a simple mechanism wherein:

  • A simple network device can be managed
  • Configuration data information can be retrieved
  • New configuration data can be manipulated and uploaded

 

NETCONF protocol functions as a device configuration mechanism, a vast improvement from SNMP wherein it only monitors, polls, and notifies whenever there is a fault in the network devices. NETCONF uses remote procedure calls (RPC) model wherein the client inputs an RPC in XML and forwards it to a server utilizing a secure, connection-oriented session.

The server provides an RPC reply in XML. Both the request and response contents are fully described in XML DTDs and/or XML schemas, which allows both sides to understand the syntax limitations that occur on the exchange. The protocol messages are also in XML and the mandatory transport protocol for NETCONF is through the Secure Shell Transport Layer Protocol (SSH).

 

NETCONF Protocol Layers

NETCONF is conceptually divided into four layers, as shown below.

NETCONF

  1. Secure Transport – enables the client and server to communicate with each other. NETCONF can be overlaid on top of any transport protocol that provides a set of basic requirements.
  2. Messages – gives a simple and independent transport framing mechanism for encoding RPCs and notifications.
  3. Operations – operations layer defines a set of base protocol operations called on RPC methods together with XML-encoded parameters.
  4. Content – has a set of managed objects, such as configuration data, status data, and statistics information.

 

YANG

YANG is a data modeling language for NETCONF as per RFC 6020. It is used to model configuration and state data manipulated by NETCONF, NETCONF RPCs, and notifications. YANG is utilized to model the operations and content layers of NETCONF.

 

YANG Data Models

The model can be presented in multiple formats based on the need during that specific instance. Below are some options:

  • HTML/JavaScript
  • YANG Language
  • Clear text
  • XML
  • JSON

 

RESTCONF

RESTCONF is a protocol defined by RFC 8040 based on HTTP used for configuring data defined in YANG version 1 or 1.1 using the datastore concepts defined in the Network Configuration Protocol (NETCONF). RESTCONF uses HTTP methods to provide Create, Read, Update, Delete (CRUD) operations on a conceptual datastore comprising YANG-defined data, which is compatible with a server that administers NETCONF datastores.

RESTCONF

 

Utilizing RESTCONF with Postman

Postman is a powerful but simpler REST API client that quickly tests APIs in GUI, which saves APIs into collections for reuse. It manages multiple environments, auto-generates code from API calls, and acts as a standalone application or a Chrome plug-in.


Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: