← Interview Prep

gNMI, OpenConfig & Streaming Telemetry

The gRPC-native management stack: gNMI RPCs (Capabilities/Get/Set/Subscribe) over gRPC+protobuf, streaming-telemetry modes (ONCE/POLL/SAMPLE/ON_CHANGE), dial-in vs dial-out, OpenConfig vendor-neutral YANG models and the config/state split, gNOI/gRIBI, and SNMP vs NETCONF vs RESTCONF vs gNMI.

Where NETCONF is XML-over-SSH, gNMI is the gRPC-native answer: config and high-frequency streaming telemetry over one efficient, encrypted channel, using the same YANG models — usually the vendor-neutral OpenConfig ones. It's the modern DC/operator management interface. Pairs with NETCONF & YANG.

gNMI = gRPC Network Management Interface (protocol). OpenConfig = vendor-neutral YANG models. Streaming telemetry = the push model gNMI's Subscribe enables. All three usually show up together, but they're three separate things.

gNMI — the protocol

Built on gRPC (HTTP/2 + TLS) with protobuf encoding — compact, multiplexed, bidirectional. Paths are derived from the YANG schema. Four RPCs:

RPCPurpose
CapabilitiesDiscover supported models, encodings, and gNMI version.
GetOne-shot snapshot of the values at a set of paths.
SetTransactional config change: update / replace / delete in one request (all-or-nothing).
SubscribeThe headline feature — streaming telemetry.

A path targets the tree, with list keys inline:

/interfaces/interface[name=Ethernet1]/state/counters/in-octets
# encodings: JSON_IETF | protobuf | ASCII

Subscribe — streaming telemetry

Instead of polling SNMP every 5 minutes, the device pushes data as it changes or on a fast timer. Subscription modes:

ModeBehavior
ONCESend current values once, then close.
POLLClient asks on demand over the open stream.
STREAM · SAMPLEPush every N (e.g. every 10s) — good for counters/rates.
STREAM · ON_CHANGEPush only when a value changes — ideal for state (interface up/down, BGP session).
STREAM · TARGET_DEFINEDDevice picks the best mode per leaf.

OpenConfig — the models

OpenConfig is a set of vendor-neutral YANG models (interfaces, BGP, routing-policy, LLDP, platform, telemetry…) maintained by network operators so the same path works across vendors.

The wider gRPC family

SNMP vs NETCONF vs RESTCONF vs gNMI

SNMPNETCONFRESTCONFgNMI
TransportUDPSSH (830)HTTP (443)gRPC/HTTP2 (TLS)
EncodingBERXMLJSON/XMLprotobuf / JSON
ModelMIB (SMI)YANGYANGYANG (OpenConfig)
Config transactionsWeakStrong (candidate/commit)BasicSet (atomic)
TelemetryPoll (traps)NotificationsStreaming (Subscribe)

Tooling

Likely interview questions

Related: NETCONF & YANG · Python Automation (gNMI) · Frameworks Compared.