English

RESTCONF

Posted on Sep 21, 2024 by
11

Overview of RESTCONF

According to RFC8040, RESTCONF is described as: An HTTP-based protocol that facilitates a programmatic interface for accessing data defined in YANG, leveraging the datastore concepts as defined in the Network Configuration Protocol (NETCONF).

Let's delve into this definition a little deeper. Essentially, RESTCONF offers an HTTP-based method to access datastores, originally specified by NETCONF. This distinction often leads to confusion, as many assume RESTCONF and NETCONF are completely separate protocols. However, it's crucial to understand that NETCONF is more than a communication protocol; it also defines the structure of configuration datastores, often referred to unofficially as the "Datastore Manager." The RESTCONF RFC essentially refers to this aspect of NETCONF.

As its name suggests, RESTCONF operates following standard REST architecture principles. This implies that actions such as GET, PUT, POST, and DELETE can be performed using RESTCONF, similar to other REST APIs. RESTCONF does not aim to replace NETCONF but rather offers an HTTP interface adhering to REST principles.

RESTCONF

Why use RESTCONF ?

As networks grow in scale and complexity, the need for automated operations and maintenance (O&M) solutions has become increasingly urgent. In this evolving landscape, adopting interfaces that streamline management and align with modern development practices is crucial.

NETCONF, which provides a programmatic interface based on RPC (remote procedure call), has struggled to keep pace with network advancements. Consequently, there is a demand for standard interfaces that are compatible with both web application access and network device operations. RESTCONF addresses this by combining NETCONF with HTTP, offering core NETCONF functionalities through HTTP methods. This RESTful interface simplifies the development of web-based O&M tools, making it easier to manage complex networks effectively.

Comparison between RESTCONF and NETCONF: Transmission Channel (Protocol)

  • NETCONF + YANG: At the transport layer, NETCONF typically uses Secure Shell (SSH) to transmit data in XML format.

  • RESTCONF + YANG: RESTCONF uses HTTP for accessing device resources and adheres to RESTful principles commonly used in the IT sector.

Data Packet Format

  • NETCONF + YANG: Uses XML for encoding data.

  • RESTCONF + YANG:Can use either XML or JSON formats for data encoding.

Operational Characteristics

  • NETCONF + YANG: NETCONF operations are more intricate. For instance, NETCONF supports addition, deletion, modification, and query operations, multiple datastore configurations, and configuration rollback. It requires a two-phase configuration validation process, where parameters must be configured and committed to take effect.

  • RESTCONF + YANG: RESTCONF operations are more straightforward. It performs create, read, update, and delete (CRUD) operations only within the datastore. Operations in RESTCONF take effect immediately, bypassing the need for a two-phase commit.

Benefits of using RESTCONF

  • Web Development Support: RESTCONF offers RESTful interfaces that are conducive to web application development.

  • Multi-Vendor Compatibility: Its standard interfaces work across various vendors’ devices, thereby lowering development and maintenance expenses.

  • Extensibility: RESTCONF boasts significant flexibility, allowing different vendors to introduce additional NETCONF operations.

  • No Need for NMS Tools: RESTCONF operates over the web, eliminating the requirement for dedicated network management system (NMS) tools.

RESTCONF Request Structure

RESTCONF uses HTTPS as its transport protocol, requiring a URL to locate resources on the network device. The basic structure of a RESTCONF request URL is:

https://<device-address>/restconf/data/<yang-module>:<container>

Breaking down this structure:

  • Address: The address where the RESTCONF server component is running, likely the IP address of the network device.

  • Yang-Module: The name of the YANG Data Model in use for interaction.

  • Container: A YANG module contains various nodes like containers, lists, and leafs, providing a framework for network configuration.

Application Scenarios for RESTCONF

Network devices are often distributed across different regions, making it impractical for administrators to configure and manage each device on-site, especially if they come from various manufacturers with distinct command-line configurations. While NETCONF can streamline device configuration and management, its complexity and incompatibility with IT O&M tools pose challenges. RESTCONF addresses these issues by offering simplified network management through HTTP, allowing remote configuration and real-time monitoring of network devices without requiring specialized management tools.

RESTCONF

Steps to Configure RESTCONF

  • Enable the HTTP server: This enhances secure management and monitoring of devices.

  • Enable the RESTCONF server function: This activates RESTCONF capabilities on the target device.

By following these steps, RESTCONF can be effectively used to configure and manage network devices remotely, aligning with contemporary network management needs.

Videos
Global Delivery Service | FS
01:11
Jun 26, 2024
94
Global Delivery Service | FS
Solutions