COMP347 Unit 8 – Network Management and Network Operations
After completing this extended tutorial, you should be able to:
Network telemetry is the practice of continuously collecting high‑frequency, structured data from network devices, enabling real‑time monitoring, analytics, and automation. Unlike the traditional SNMP polling model (pull‑based, low‑frequency, and limited data), modern telemetry uses a push model with rich data models (YANG) and efficient protocols like gRPC and gNMI. This tutorial provides a comprehensive, in‑depth exploration of network telemetry, YANG, and model‑driven management.
We begin by defining telemetry and its key drivers: the need for higher frequency, richer data, and scalability. We then delve into the YANG data modeling language, its syntax, and how it represents configuration and operational state. The gNMI (gRPC Network Management Interface) protocol is examined in detail, covering its operations (Capabilities, Get, Set, Subscribe) and its use of gRPC for efficient, bi‑directional streaming. We contrast telemetry with SNMP, highlighting the architectural and functional differences. The tutorial also covers telemetry data pipelines, the OpenConfig initiative, security considerations, and practical deployment strategies. Case studies illustrate telemetry in large‑scale networks.
Network telemetry refers to the automated, high‑frequency collection of data from network devices to enable real‑time monitoring, analytics, and automation. It is driven by the need for:
Telemetry is typically push‑based: devices stream data to a collector without being polled, reducing overhead and enabling higher frequencies.
YANG (Yet Another Next Generation) is a data modeling language used to model configuration and state data for network devices. It was defined in RFC 6020 (updated by RFC 7950). YANG models are hierarchical and can represent:
YANG syntax uses containers, lists, leafs, and leaf‑lists. It supports data types like integer, string, enumeration, and more complex ones like union and leafref.
Example YANG snippet:
container interfaces {
list interface {
key "name";
leaf name { type string; }
leaf enabled { type boolean; }
leaf ip-address { type inet:ipv4-address; }
container state {
config false;
leaf oper-status { type enumeration { enum up; enum down; } }
leaf in-octets { type yang:counter64; }
}
}
}
YANG modules are used by protocols like NETCONF and RESTCONF, and also form the basis for gNMI telemetry.
gNMI (gRPC Network Management Interface) is a modern, protocol‑buffers‑based management protocol defined by the OpenConfig working group. It uses gRPC (high‑performance RPC framework) and provides:
gNMI messages are encoded in Protocol Buffers (protobuf) over HTTP/2, providing high efficiency, multiplexing, and flow control.
Subscription types:
Paths in gNMI are defined using XPath‑like notation (e.g., /interfaces/interface[name='eth0']/state/oper-status).
Model‑driven telemetry leverages YANG models to define the data to be streamed. Devices export data based on the model, and collectors interpret the data using the same model. This ensures consistency and reduces integration effort.
Streaming telemetry typically involves:
Advantages: lower latency, higher throughput, and richer data compared to SNMP polling.
| Aspect | SNMP (v2c/v3) | gNMI/Telemetry |
|---|---|---|
| Data Model | SMI/MIB (flat, ASN.1) | YANG (hierarchical, rich) |
| Transport | UDP (mostly) | gRPC/HTTP2 (TCP) |
| Encoding | BER | Protocol Buffers or JSON |
| Communication | Pull (polling) | Push (streaming) and Pull |
| Frequency | Typical 1‑5 min | Sub‑second to minutes |
| Data Richness | Limited (scalars, tables) | Hierarchical, complex data |
| Security | Community strings or USM | TLS + mTLS, OAuth |
| Configuration | SET operation (limited) | Full configuration via Set (with transactional semantics) |
| Standardization | IETF (mature) | OpenConfig, IETF (growing) |
While SNMP remains widely deployed, telemetry is increasingly favored for modern, large‑scale, and automated networks.
A telemetry pipeline consists of:
Considerations: data volume, latency, retention, and the need for downsampling.
OpenConfig is a vendor‑neutral initiative that provides standard YANG models for common network functions (interfaces, BGP, routing, etc.). Using OpenConfig models enables multi‑vendor interoperability and reduces operational complexity. Many devices support both OpenConfig and vendor‑native models.
gNMI uses TLS for encryption. Authentication can be through certificates (mTLS) or username/password over TLS. Authorization is typically handled by the device based on the authenticated user and role‑based access control (RBAC) to specific YANG paths. gNMI also supports secure channels for sensitive configuration operations.
All answers are hidden; click Show Answer to reveal.
Define network telemetry and list its key drivers.
What is YANG and what is its purpose?
List the four main gNMI operations.
What transport protocol does gNMI use?
What are the three subscription modes in gNMI?
Explain the difference between a pull‑based and push‑based monitoring model.
What is the advantage of push‑based telemetry over polling?
What is the role of Protocol Buffers in gNMI?
What is a YANG container? Provide an example.
container interfaces { ... }.How does gNMI handle configuration changes?
What is the OpenConfig initiative?
Compare the data models used by SNMP and gNMI.
What is the purpose of the Capabilities operation in gNMI?
How can you secure gNMI communications?
What is a subscription in gNMI? Give an example.
Explain the concept of "on‑change" telemetry.
What is a data pipeline in telemetry context?
Why might a network operator choose telemetry over SNMP?
What is the role of a message broker (e.g., Kafka) in a telemetry pipeline?
What are the key differences between YANG and SMI (used by SNMP)?
How does gNMI support notifications?
What is the purpose of the config false statement in YANG?
What is a "leaf‑list" in YANG?
Explain the difference between a YANG list and a container.
How does gNMI ensure reliable delivery of telemetry data?
What is the role of YANG modules in model‑driven management?
What are the typical output formats of gNMI?
Why is it beneficial to use OpenConfig models instead of vendor‑specific models?
What is a "path" in gNMI?
/interfaces/interface[name='eth0']/state/oper-status).What is the purpose of the Get operation in gNMI?
Explain the difference between "periodic" and "on‑change" streaming.
What is the significance of the "sample interval" in telemetry subscriptions?
How does telemetry help in capacity planning?
What is the role of a "collector" in a telemetry system?
How does gNMI support batch updates?
What is the difference between a YANG "choice" and "case"?
Why is it important to standardize on a few YANG models in an organization?
What is the role of the gNMI "heartbeat" mechanism?
How can you test a gNMI connection to a device?
What is the relationship between gNMI and NETCONF?
Explain the concept of "model‑driven" telemetry.
What are the common challenges in deploying telemetry at scale?
Sample solutions are hidden – click to reveal.
Write a YANG module snippet that models a network interface with the following: name (string), enabled (boolean), speed (integer), and operational status (enum: up/down).
container interface {
leaf name { type string; }
leaf enabled { type boolean; }
leaf speed { type uint64; }
leaf oper-status {
type enumeration { enum up; enum down; }
}
}
Using gNMI, how would you subscribe to the operational status of all interfaces on a router, with updates every 10 seconds?
/interfaces/interface/state/oper-status, mode STREAM, sample interval 10 seconds.Compare the data retrieval mechanisms: SNMP GET vs. gNMI Get. What are the key differences in the response format and data richness?
You want to collect interface counters (in/out octets) every 5 seconds from 1000 routers. Which approach would you choose: SNMP polling or gNMI streaming? Justify.
Design a telemetry data pipeline for a service provider with 5000 devices. Include ingestion, buffering, processing, storage, and visualization components.
What are the trade‑offs between using periodic telemetry and on‑change telemetry for monitoring BGP state?
Explain how gNMI's Subscribe operation can be used for both telemetry and event notifications.
You have a device that supports OpenConfig and native YANG models. Which would you prefer for your management system and why?
Describe the steps to secure a gNMI connection between a collector and a network device.
What is the impact of increasing the sampling frequency in a telemetry subscription on device resources and network bandwidth?
Write a gNMI Set request (in JSON format) to update the hostname of a device to "router-core-01".
{
"update": [
{
"path": "/system/config/hostname",
"val": "router-core-01"
}
]
}
How would you use gNMI's Get operation to retrieve the current operational status of a specific interface?
/interfaces/interface[name='eth0']/state/oper-status.Explain the role of a YANG "leafref" and provide an example.
leaf interface-name { type leafref { path "/interfaces/interface/name"; } }.You are migrating from SNMP to gNMI. What are the main challenges you might face?
What is the difference between a YANG list and a YANG container? Provide a use case for each.
Explain the concept of "model‑driven" telemetry and its benefits for automation.
How can you validate that a gNMI subscription is working correctly?
What are the considerations when storing telemetry data in a time‑series database?
Describe a scenario where you would use the POLL subscription mode in gNMI instead of STREAM.
How can gNMI support configuration rollback if a Set operation fails?
Sample answers are hidden; use them to guide your study.
Write a detailed analysis of the YANG data modeling language, including its structure, data types, and the differences between configuration and state data. Compare it with ASN.1/SMI used in SNMP.
YANG is hierarchical, with containers, lists, leafs. It supports types like int64, string, enumeration, and complex constraints. Configuration is writable, state is read‑only. ASN.1/SMI is flat, less expressive, and primarily for monitoring. YANG also supports RPCs and notifications.
Design a comprehensive telemetry collection strategy for a large data center network with 2000 switches and routers. Include subscription definition, collector architecture, and data processing.
Use OpenConfig models for common data. Set up a cluster of gNMI collectors, each handling a subset of devices. Stream data via gRPC to Kafka. Use Flink for real‑time analytics. Store metrics in Prometheus and logs in Elasticsearch. Implement dashboards with Grafana.
Explain the role of gRPC and Protocol Buffers in gNMI. How do they contribute to performance and interoperability?
gRPC provides efficient, multiplexed RPC over HTTP/2, enabling bi‑directional streaming. Protocol Buffers offer compact, language‑agnostic serialization, reducing bandwidth and ensuring cross‑platform support.
Compare and contrast the security models of SNMPv3 and gNMI. Which one is more suitable for modern cloud environments?
SNMPv3 uses USM (keys) and VACM, while gNMI uses TLS/mTLS and RBAC. gNMI is more aligned with modern security practices (certificates, OAuth) and integrates better with cloud IAM.
Research the OpenConfig YANG models and select three common models (e.g., interfaces, BGP, routing). Describe their structure and key data nodes.
Interfaces model: container interfaces with list interface, leafs for name, config, and state. BGP model: container bgp with global, neighbors. Routing model: lists for routes. Each provides standardized representation.
Explain the concept of "model‑driven" telemetry and how it improves operational efficiency compared to ad‑hoc telemetry.
Model‑driven telemetry uses predefined YANG models, ensuring consistency across devices. It reduces integration effort, enables automated analytics, and supports multi‑vendor environments.
Write a guide on setting up a gNMI subscription for a Cisco IOS‑XE device using the OpenConfig models. Include configuration steps and verification commands.
Enable gRPC/gNMI on device. Configure subscriptions via CLI or YANG. Use gnmic to subscribe. Verify with show commands for telemetry statistics.
Discuss the challenges of processing high‑volume telemetry data in real time. How can you design a scalable pipeline?
Challenges: data volume, latency, and state management. Use distributed stream processing (Flink, Kafka Streams), partition data by device, and use windowing for aggregations. Use auto‑scaling.
Explain how gNMI supports both configuration and telemetry operations in a single protocol. Why is this beneficial?
gNMI provides Get/Set for config and Subscribe for telemetry, unifying management. This reduces the number of protocols and tools needed, and allows correlation between configuration changes and resulting state.
Compare the performance of SNMP polling vs. gNMI streaming for collecting interface counters from 100 devices. Quantify the differences in network load and latency.
SNMP polling with 100 devices and 10 OIDs each at 1 min interval generates hundreds of requests/sec. gNMI streaming sends batched updates at configurable intervals, reducing overhead. Latency is lower because data is pushed immediately.
Discuss the role of YANG in automating network operations. How does it enable intent‑based networking?
YANG provides a structured data model for configuration and state. Automation tools can use YANG‑defined APIs to push configurations and verify compliance, enabling intent‑based systems to translate policies into device configurations.
Design a telemetry alerting rule to detect interface flapping (operational status toggling) using streaming data. Specify the detection logic and the actions.
Monitor oper‑status changes; if toggles more than 3 times within 5 minutes, trigger alert. Action: send notification to network team with interface details.
Research the differences between gNMI and RESTCONF for configuration management. When would you choose one over the other?
gNMI uses gRPC (binary, streaming) for high performance; RESTCONF uses HTTP/JSON and is simpler for web‑based integrations. Choose gNMI for telemetry and large‑scale config; RESTCONF for lightweight, RESTful use cases.
Explain the concept of a "candidate" configuration in YANG and how it relates to gNMI Set operations.
A candidate configuration is a proposed set of changes that can be validated before applying. gNMI Set does not explicitly support candidate, but devices may implement their own candidate models; NETCONF is more traditionally used for this.
Write a research paper on the evolution of network management from SNMP to gNMI and YANG, highlighting the drivers, benefits, and challenges.
Cover: scalability, speed, automation needs. gNMI and YANG address limitations of SNMP (polling, data modeling, security). Challenges: adoption, vendor support, migration costs.
Analyze a case study of a large cloud provider that uses telemetry for network management. What metrics do they collect, and how do they use the data for automation?
Example: Google's network uses telemetry for real‑time congestion control, predictive maintenance, and capacity planning. They collect flow data, interface counters, and routing changes to drive automated rerouting.
This extended tutorial has provided a comprehensive exploration of network telemetry, YANG, gNMI, and model‑driven management. We covered the foundational concepts of telemetry, the YANG data modeling language, and the gNMI protocol with its operations and subscription models. A detailed comparison with SNMP highlighted the advantages of telemetry in terms of frequency, data richness, and scalability. We also examined telemetry data pipelines, OpenConfig models, security considerations, and operational best practices.
The quiz, exercises, and homework assignments are designed to reinforce understanding and develop practical skills for deploying and managing telemetry systems. As networks evolve towards automation and intent‑based operations, telemetry and YANG play a pivotal role in providing the high‑quality data needed for closed‑loop control and predictive analytics. The next tutorial will explore Configuration Management and Change Control, focusing on maintaining consistent device configurations.
COMP347 Unit 8 – Extended Tutorial 8 • TrustOpen University • Last updated: August 2026