Site icon MapYourTech

gRPC Network Management Interface (gNMI and Streaming Telemetry)

As modern networks scale, the demand for real-time monitoring and efficient management of network devices has grown significantly. Traditional methods of network monitoring, such as SNMP, often fall short when it comes to handling the dynamic and high-performance requirements of today’s networks. gNMI (gRPC Network Management Interface), combined with streaming telemetry, provides a more efficient, scalable, and programmable approach to managing and monitoring network devices.Lets explore gNMI, its architecture, key features, how it differs from traditional protocols like SNMP and NETCONF, and its advantages. We will also look at how streaming telemetry works with gNMI to deliver real-time data from network devices, including use cases in modern networking and optical networks.

What Is gNMI?

gNMI (gRPC Network Management Interface) is a network management protocol developed by Google and other major tech companies to provide real-time configuration and state retrieval from network devices. Unlike traditional polling methods, gNMI operates over gRPC (Google Remote Procedure Call) and supports streaming telemetry, which provides real-time updates on network performance and device health.

Key Features:

gNMI and Streaming Telemetry Overview

Streaming telemetry allows network devices to push data continuously to a monitoring system without the need for constant polling by management tools. gNMI is the protocol that facilitates the delivery of this telemetry data using gRPC, which provides a reliable and efficient means of communication.

With gNMI, network operators can:

gNMI Architecture

gNMI operates in a client-server model, with the following components:

gNMI Operations

gNMI supports several operations for interacting with network devices:

How gNMI Works: Streaming Telemetry Example

In traditional SNMP-based monitoring, devices are polled periodically, and data is retrieved based on requests from the monitoring system. This method introduces latency and can miss important real-time events. Streaming telemetry, on the other hand, allows network devices to continuously push real-time data to the monitoring system, providing better visibility into network performance.

Streaming Telemetry with gNMI:

  1. Subscribe to Metrics: The gNMI client (e.g., a telemetry collector) subscribes to specific metrics from the device, such as interface statistics or CPU usage.
  2. Data Streaming: The gNMI server on the device streams updates to the client either on-change or at specified intervals.
  3. Data Collection: The telemetry collector processes the streamed data and provides real-time insights, dashboards, or alerts based on predefined thresholds.

Example of a gNMI Subscription to Monitor Optical Channel Power Levels:

gnmi_subscribe -target_addr "192.168.1.10:57400" -tls -username admin -password admin \ -path "/optical-channel/state/output-power" -mode "sample" -interval "10s"

In this example, the gNMI client subscribes to the output power of an optical channel, receiving updates every 10 seconds.

gNMI vs. Traditional Protocols (SNMP, NETCONF)

gNMI Use Cases

Real-Time Network Monitoring

gNMI is ideal for real-time monitoring in dynamic networks where performance metrics need to be collected continuously. With on-change and sampled telemetry, operators can monitor:

Automated Network Configuration

gNMI’s Set operation allows network operators to push configurations programmatically. For example, operators can automate the deployment of configurations across thousands of devices, ensuring consistency and reducing manual effort.

Streaming Telemetry in Optical Networks

In optical networks, gNMI plays a crucial role in monitoring and managing optical channels and transponders. For example, gNMI can be used to:

Example: Streaming Telemetry from an Optical Device:

gnmi_subscribe -target_addr "10.0.0.5:57400" -tls -username admin -password admin \ -path "/optical-channel/state/frequency" -mode "on_change"

This command subscribes to the optical channel’s frequency and receives real-time updates whenever the frequency changes.

Advantages of gNMI and Streaming Telemetry

gNMI, combined with streaming telemetry, offers numerous advantages:

Disadvantages of gNMI

While gNMI provides significant improvements over traditional protocols, there are some challenges:

gNMI and Streaming Telemetry Example for Optical Networks

Imagine a scenario in an optical transport network (OTN) where it is crucial to monitor the power levels of optical channels in real-time to ensure the stability of long-haul links.

Step 1: Set Up a gNMI Subscription

Network operators can set up a gNMI subscription to monitor the optical power of channels at regular intervals, ensuring that any deviation from expected power levels is immediately reported.

gnmi_subscribe -target_addr "10.0.0.8:57400" -tls -username admin -password admin \ -path "/optical-channel/state/output-power" -mode "sample" -interval "5s"

Step 2: Real-Time Data Streaming

The telemetry data from the optical transponder is streamed every 5 seconds, allowing operators to track power fluctuations and quickly detect any potential signal degradation.

Step 3: Trigger Automated Actions

If the power level crosses a predefined threshold, automated actions (e.g., notifications or adjustments) can be triggered.

gNMI vs. Other Telemetry Approaches: A Quick Comparison

Summary

gNMI and streaming telemetry are essential tools for modern network management, particularly in dynamic environments requiring real-time visibility into network performance. By replacing traditional polling-based methods with real-time data streams, gNMI provides a more efficient, scalable, and secure approach to monitoring and configuring devices. The protocol’s integration with YANG data models ensures vendor neutrality and standardization, while its use of gRPC enables high-performance, low-latency communication. As networks evolve, particularly in areas like optical networking, gNMI and streaming telemetry will continue to play a pivotal role in ensuring operational efficiency and network reliability.