gRPC Network Management Interface (gNMI) is a Google Protocol RPC (gRPC) based protocol to manage network devices. gRPC is a framework used to connect services competently. SONiC provides the gNMI server, while the user provides the client. gNMI uses the gRPC framework to enable telemetry and configuration management of devices. gNMI streams data from the network device and provides the functionality to configure and retrieve operational and configuration states while providing a powerful method for switch management. The use of gNMI for the streaming of data from the network device and the functionality to configure and retrieve operational and configuration states provides a powerful method for switch management.
The supported RPC operations include:
The use case for gNMI includes streaming telemetry, verifying the state of interfaces, setting the MTU for an interface, configuring and manipulating ACL, and so on. This section provides an example of setting MTU on an interface.
The following example provides the means to set the MTU on interface Ethernet0.
docker exec -it telemetry bash
gnmi_set -username admin -password Dell\!234 -update /openconfig-interfaces:interfaces/interface[name=Ethernet0]/config/mtu:@mtu.json -target_addr 127.0.0.1:8080 -insecure true -pretty
The json file mtu.json contains the following: