Hi Everyone,
Let's have a n idea about Configuration Protocols - NETCONF and RESTCONF
What are Configuration Protocols?
A protocol is a set of principles that is used to ensure unification of formatting. As various devices may be manufactured and used by various manufacturers and users, it is necessary to ensure that a unified set of principles is followed for ease of communication of these devices. Protocols are also necessary when it comes to cross-company or cross-model compatibility and scalability of the devices.
Configuration protocols are used for configuring, editing, managing or deleting configurations of a network device in a network. These protocols are developed and managed by various standardization institutions. Internet Engineering and Task Force (IEFT) is one the standardization institution in this regard which develops, manages and promotes internet standards.
Introduction to NETCONF and RESTCONF:
NETCONF (RFC 6241) & RESTCONF (RFC 8040) are configuration protocols that are developed by IEFT for configurations management of network devices in a particular network. Network Configuration Protocol (NETCONF) provides a source of configurations activation, management and deletion. Whereas, RESTCONF is considered to be a subset of NETCONF and implemented in HTTP or HTTPS. NETCONF protocol is used between forwarding and control layers of the network, on other hand, RESCONF is usually used in Control & Service layers within a network.

Comparison between NETCONF and RESTCONF:
NETCONF and RESTCONF differ in many ways. In terms of Transmission channel, NETCONF uses SSH (port 830), whereas, RESTCONF uses HTTP (port 443). Secondly, NETCONF uses XML (Extensible Markup Language) packet format and RESTCONF uses JSON & XML. Lastly, regarding interface, NETCONF supports Controller or NMS - Device interface, on other hand, RESTCONF supports Northbound interface for ODL controller. There is one key similarity in both protocols that is data modeling language. Both NETCONF and RESTCONF use same model language that is Yang model language.
NETCONF and RESTCONF key Operations:
NETCONF is divided into four layers: Secure Transport, Message, Operations and Content. Transport layer provides a secure communication channel between NETCONF manager and its agents. Message layers provides a notification mechanism. Operations provides basic operations that are basic capabilities of NETCONF protocol. Last but not the least, content layer is a description of configurations that are involved in network management.

There are five operations through which NETCONF manages the configurations of a network. Firstly, get operation is to get the current configuration and information about the device. Secondly, get-config is to get the specific or all the configuration of the device. Thirdly, edit-config is to load all or a specific part of configurations to a device. Fourthly, copy-config operation is used to replace all or a specific set of configurations with new or modified one. Lastly, delete-config is to delete the configurations.
Likewise, RESTCONF is operated by five HTTP operations. First operation is GET that retrieves the data from a source. Second operation is PATCH. PATCH is used to modify a source. Third operation is PUT that creates a new or replace existing resource. Fourth operation is POST that is used to create a new data source. Last but not the least, DELETE operation in RESTCONF is used to delete a source.
In terms of operation RESTCONF seems like NETCONF, however, there are many NETCONF features are missing in RESTCONF. For instance, locking of configurations, rolling back the configuration and ability of multiple data stores in a device of network.
Thank You for reading.

