NETCONF and RESTCONF: Managing Network Devices Through APIs

  • 1378 views
  • 2023-07-25

NETCONF and RESTCONF are two powerful and popular APIs used for managing network devices like routers, switches, and firewalls. They allow you to configure, monitor, and control network devices programmatically using standard protocols. In this post, we will take a closer look at NETCONF and RESTCONF and see how they work.

What is NETCONF?

NETCONF stands for Network Configuration Protocol. It was developed by the IETF as a standard way to manage network devices from different vendors. Some key things to know about NETCONF:

  • Uses XML-based data encoding to communicate between client and server. Configuration data and RPCs are encoded in XML.
  • Operates over a secure connection like SSH or TLS. This allows remote configuration.
  • Uses a RPC model for operations like get, edit, copy, validate etc. The client sends a request and the server responds with a reply.
  • Allows you to get and edit full or partial device configurations. You can retrieve specific portions of the config instead of the whole thing.
  • Supports transactional style operations if the device capabilities permit it. This allows you to apply multiple changes and then commit them together.
  • Provides notification streams from the server to client using NETCONF Notifications. The server can notify clients of important config changes.

netconf

Overall, NETCONF gives you a standardized way to manage device configs on any vendor equipment that supports NETCONF. It is easy to integrate with automation and orchestration tools.

What is RESTCONF?

RESTCONF is an extension of NETCONF that utilizes RESTful APIs. It was also created by the IETF to adapt NETCONF for RESTful architectures. Key facts about RESTCONF:

  • Uses HTTP methods like GET, POST, PUT, PATCH, and DELETE to operate on device configs.
  • Encodes data in XML or JSON. YAML is also supported.
  • Supports REST style URIs to access device data resources. For example, `/config/interfaces/interface=Ethernet0/0`
  • Built on top of NETCONF so it inherits the same capabilities like configuration editing, transactions etc.
  • Designed to easily integrate with RESTful systems, web services, SDN controllers, and orchestration tools.

In summary, RESTCONF adapts NETCONF to use REST principles. This makes it a natural fit for automation systems that leverage REST APIs. It offers a standard way to integrate network gear into cloud environments.

Comparing NETCONF and RESTCONF

While both APIs serve the same overall purpose, there are some key differences between the two:

  • NETCONF uses XML while RESTCONF supports XML, JSON, and YAML.
  • NETCONF uses SSH/TLS while RESTCONF uses REST over HTTPS.
  • NETCONF RPC style vs RESTCONF's RESTful resources and verbs. 
  • RESTCONF offers more flexibility for custom URIs to reference device resources.
  • RESTCONF integrates better with RESTful architecture while NETCONF is protocol agnostic.

In essence, RESTCONF makes it easier to use NETCONF principles in a RESTful environment. Both offer programmatic access to modify, monitor, and manage network devices.

Conclusion

NETCONF and RESTCONF are important protocols that allow you to automate network operations. Both provide an standardized way to configure and manage network gear from different vendors. NETCONF has been around longer while RESTCONF brings NETCONF to RESTful ecosystems. Network engineers and IT teams can leverage these APIs to automate configuration management, policy changes, monitoring, and more. This helps remove manual tasks, enforce consistency, and integrate with cloud orchestration platforms.

Support AceITCert.com by buying stuff you need!

0 Comments

In order to participate in the comments you need to be logged-in.
You can sign-up or login (it's free).