Site icon MapYourTech

Open-Source Configuration Model (OpenConfig)

OpenConfig is an open-source, vendor-neutral initiative designed to address the growing complexity of managing modern network infrastructures. It provides standardized models for configuring and monitoring network devices, focusing on programmability and automation. OpenConfig was created by large-scale network operators to address the limitations of traditional, vendor-specific configurations, allowing operators to manage devices from different vendors using a unified data model and interfaces.Lets explore OpenConfig, its architecture, key use cases, comparison with other network configuration approaches, and its advantages and disadvantages.

What is OpenConfig?

OpenConfig is a set of open-source, vendor-agnostic YANG models that standardize network configuration and operational state management across different devices and vendors. It focuses on enabling programmable networks, offering network operators the ability to automate, manage, and monitor their networks efficiently.

OpenConfig allows network administrators to:

OpenConfig and YANG

At the heart of OpenConfig is YANG (Yet Another Next Generation), a data modeling language used to define the structure of configuration and operational data. YANG models describe the structure, types, and relationships of network elements in a hierarchical way, providing a common language for network devices.

Key Features of OpenConfig YANG Models:

Example of OpenConfig YANG Model for Interfaces:

module openconfig-interfaces {
  namespace "http://openconfig.net/yang/interfaces";
  prefix "oc-if";

  container interfaces {
    list interface {
      key "name";
      leaf name {
        type string;
      }
      container config {
        leaf description {
          type string;
        }
        leaf enabled {
          type boolean;
        }
      }
    }
  }
}

This model defines the structure for configuring network interfaces using OpenConfig. It includes configuration elements like name, description, and enabled status.

How OpenConfig Works

OpenConfig models are typically used in conjunction with network management protocols like NETCONF, gNMI, or RESTCONF to configure and monitor devices. These protocols interact with OpenConfig YANG models to retrieve or update configurations programmatically.

Here’s how OpenConfig works with these protocols:

OpenConfig in Optical Networks

OpenConfig is particularly valuable in optical networks, where multiple vendors provide devices like DWDM systems, optical transponders, and OTN equipment. Managing these devices can be complex due to vendor-specific configurations and proprietary management interfaces. OpenConfig simplifies optical network management by providing standardized models for:

Example: OpenConfig YANG Model for Optical Channels

OpenConfig provides models like openconfig-optical-transport-line-common for optical networks. Here’s an example snippet of configuring an optical channel:

module openconfig-optical-transport-line-common {
  container optical-channel {
    list channel {
      key "name";
      leaf name {
        type string;
      }
      container config {
        leaf frequency {
          type uint32;
        }
        leaf target-output-power {
          type decimal64;
        }
      }
    }
  }
}
 

This YANG model defines the structure for configuring an optical channel, allowing operators to set parameters like frequency and target-output-power.

Key Components of OpenConfig

OpenConfig has several key components that make it effective for managing network devices:

Standardized Models

OpenConfig models cover a wide range of network elements and functions, from BGP and VLANs to optical transport channels. These models are designed to work with any device that supports OpenConfig, regardless of the vendor.

Streaming Telemetry

OpenConfig supports streaming telemetry, which allows real-time monitoring of network state and performance using protocols like gNMI. This approach provides a more efficient alternative to traditional polling methods like SNMP.

Declarative Configuration

OpenConfig uses declarative configuration methods, where the desired end-state of the network is defined and the system automatically adjusts to achieve that state. This contrasts with traditional imperative methods, where each step of the configuration must be manually specified.

OpenConfig Protocols: NETCONF vs. gNMI vs. RESTCONF

While OpenConfig provides the data models, various protocols are used to interact with these models. The table below provides a comparison of these protocols:

When to Use OpenConfig

OpenConfig is particularly useful in several scenarios:

Multi-Vendor Networks

OpenConfig is ideal for networks that use devices from multiple vendors, as it standardizes configurations and monitoring across all devices, reducing the need for vendor-specific tools.

Large-Scale Automation

For networks requiring high levels of automation, OpenConfig enables the use of programmatic configuration and monitoring. Combined with gNMI, it provides real-time streaming telemetry for dynamic network environments.

Optical Networks

OpenConfig’s models for optical networks allow network operators to manage complex optical channels, amplifiers, and transponders in a standardized way, simplifying the management of DWDM systems and OTN devices.

Advantages of OpenConfig

OpenConfig provides several advantages for network management:

Disadvantages of OpenConfig

Despite its benefits, OpenConfig has some limitations:

OpenConfig in Action: Example for Optical Networks

Imagine a scenario where you need to configure an optical transponder using OpenConfig to set the frequency and target power of an optical channel. Here’s an example using OpenConfig with gNMI:

Step 1: Configure Optical Channel Parameters

{
  "openconfig-optical-transport-line-common:optical-channel": {
    "channel": {
      "name": "channel-1",
      "config": {
        "frequency": 193400,
        "target-output-power": -3.5
      }
    }
  }
}
 

Step 2: gNMI Configuration

Send the configuration using a gNMI client:

gnmi_set -target_addr "192.168.1.10:57400" -tls -username admin -password admin -update_path "/optical-channel/channel[name=channel-1]/config/frequency" -update_value 193400

This command sends the target frequency value of 193.4 THz to the optical transponder using gNMI.

OpenConfig vs. Traditional Models: A Quick Comparison

Summary

OpenConfig has revolutionized network device management by providing a standardized, vendor-neutral framework for configuration and monitoring. Its YANG-based models allow for seamless multi-vendor network management, while protocols like NETCONF and gNMI provide the programmability and real-time telemetry needed for modern, automated networks. Although it comes with a learning curve and complexity, the benefits of standardization, scalability, and automation make OpenConfig an essential tool for managing large-scale networks, particularly in environments that include both traditional and optical devices.

 

Reference

https://openconfig.net/