惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
S
Securelist
V
Vulnerabilities – Threatpost
C
Cyber Attacks, Cyber Crime and Cyber Security
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
Simon Willison's Weblog
Simon Willison's Weblog
Hacker News - Newest:
Hacker News - Newest: "LLM"
P
Palo Alto Networks Blog
T
Troy Hunt's Blog
SecWiki News
SecWiki News
Security Archives - TechRepublic
Security Archives - TechRepublic
T
The Blog of Author Tim Ferriss
Project Zero
Project Zero
Microsoft Security Blog
Microsoft Security Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
F
Full Disclosure
阮一峰的网络日志
阮一峰的网络日志
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Attack and Defense Labs
Attack and Defense Labs
Know Your Adversary
Know Your Adversary
WordPress大学
WordPress大学
PCI Perspectives
PCI Perspectives
N
News | PayPal Newsroom
The Last Watchdog
The Last Watchdog
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
CERT Recently Published Vulnerability Notes
H
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
云风的 BLOG
云风的 BLOG
月光博客
月光博客
T
The Exploit Database - CXSecurity.com
I
InfoQ
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
腾讯CDC
小众软件
小众软件
V2EX - 技术
V2EX - 技术
罗磊的独立博客
Cloudbric
Cloudbric
Recorded Future
Recorded Future
IT之家
IT之家
Google DeepMind News
Google DeepMind News
C
CXSECURITY Database RSS Feed - CXSecurity.com

kmcd.dev

Exploring Protocol Buffers Interactively Introducing ProtoDocs Ghost in the Shell: The Manga Behind the Anime The Hidden Cost of google.protobuf.Value Why Networking Built Its Own Data Modeling Language Zero-Friction Demos with WASM Let's Learn About BGP ConnectRPC: Where is it now? Building APIs with Contracts The Case for Greppable Code Unknown Fields in Protobuf IRC Log: Reactionary Faking protobuf data in Go Y'all are Sleeping on Mise-en-Place IRC Log: Standup 2 HTTP/2 From Scratch: Part 4 IRC Log: rm -rf /var/opt/gitlab/postgresql/data HTTP/2 From Scratch: Part 3 Building a Live BGP Map HTTP/2 From Scratch: Part 2 IRC Log: The Cloud Scale Incident Visualizing the Internet (2026) Shell Log: Namaste HTTP/2 From Scratch: Part 1 IRC Log: Standup HTTP/1.1 From Scratch WHOIS is dead, long live RDAP Months Considered Harmful Encryption vs. Compression On Creating My Own Cover Art Traceroute Tool from Scratch in Go My Favorite Interview Question From JSON to Protobuf Breaking gRPC Morse Code Can You Hack a Phone with Your Voice? Visualizing the Internet (2025) HTTP QUERY and Go I made a daily word game Protovalidate: Can Input Validation Be This Easy? Behold! The Barcode Scanner Mixing CEL and Protobuf for Fun FauxRPC and Protovalidate The Call of the Monolithic Codebase FauxRPC + Test Containers Self-Documenting Connect Services gRPC Over HTTP/3: Followup JSON to Protobuf Conversion gRPC: The Ugly Parts Working with Protobuf in 2024 Introducing FauxRPC HTTP/1.0 From Scratch Y'all are sleeping on HTTP/3 HTTP/0.9 From Scratch What version of HTTP are you using? Texans in Denmark gRPC Over HTTP/3 gRPC: The Good Parts Leaving Texas for Greener Pastures gRPC: The Bad Parts Unit Testing ConnectRPC Servers Daily Prompts Adding chart.js to Hugo Why I'm Rebranding Benchmarking gRPC (golang) Blog Update gRPC From Scratch: Part 3 - Protobuf Encoding Tracking the Wins Visualizing the Internet (2024) Dropping Unknown Fields in ConnectRPC RESTless: Web APIs After REST Introducing unknownconnect-go Making gRPC more approachable with ConnectRPC Inspecting Protobuf Messages Introducing protoc-gen-connect-openapi gRPC From Scratch: Part 2 - Server gRPC From Scratch: Part 1 - Client The Rollercoaster of Productivity in Side Projects Lessons from a Decades-Long Project How I learned to code Economists with (virtual) Guns Visualizing the Internet (2023) softlayer-python: language bindings/CLI for a cloud company SwFTP: SFTP/FTP Server For Openstack Swift Video: Morning Copenhagen Commute Goodbye Evepraisal Visualizing the spectrum of the sun (Part 2) Visualizing the Internet (2022) Evepraisal: A price estimation tool for Eve Online Visualizing the spectrum of the sun
Why you should use gNMI over SNMP in 2026
2023-11-04 · via kmcd.dev

Network engineers deal with a unique set of headaches when managing infrastructure. SNMP is over 30 years old, and most networks still depend on it today. We finally have a strong modern alternative and it is time to move on.

SNMP has been the standard for decades, but its flaws are hard to ignore now. It is clunky, inefficient, and simply does not scale in modern environments.

gNMI (gRPC Network Management Interface) solves these problems. It is cleaner, faster, and gives administrators much better control over what data they pull and how they receive it.

The protocol relies on three main operations:

  • Get: Pull data from a device.
  • Set: Change a configuration.
  • Subscribe: Get automated updates whenever data changes.

Why gNMI beats SNMP

The benefits come down to a few key architectural shifts.

  • Model-driven design: gNMI uses YANG to define data. This makes writing automation scripts much easier because you actually know what the data structure looks like without hunting through MIBs.
  • Truly bidirectional: You can use gNMI for both telemetry and configuration. This lets you handle everything from provisioning to troubleshooting with one tool.
  • Efficiency and scale: gNMI uses a streaming approach. It can handle high traffic volumes across massive networks without killing device performance.
  • Modern security: It is built on HTTP/2 and uses TLS to encrypt traffic by default. You get a secure management plane right out of the box.

Here is a quick look at how they stack up:

FeatureSNMPgNMI
TransportUDP (mostly)HTTP/2 (TCP)
Data FormatASN.1 (MIBs)Protocol Buffers (modeled with YANG/OpenConfig)
Speed30s to 5min intervalsNear real-time streaming
SecurityShared secrets (v2) / Complex USM (v3)Certificate-based Mutual TLS

Subscriptions: Stop Polling, Start Streaming

The “streaming” aspect is a massive upgrade. Because gNMI uses gRPC, it can hold a persistent connection where the device pushes updates to the client. SNMP has no suitable way to do this[1] . Instead, SNMP forces you into a repetitive request and response loop.

Look at a typical SNMP setup:

D2 Diagram

The client has to ask for the same data over and over, often getting the exact same answer. I am also sparing you the typical SNMP mess where you have to manually map index numbers to interface names. If an interface is “too fast,” you have to mess with ifHCInOctets values. With SNMP, you have to poll frequently to get resolution on the data.

Now look at a gNMI subscription:

D2 Diagram

You set the subscription once and the device sends updates only when the value changes. If nothing changes, the device stays quiet. This massive reduction in “chatter” lowers the load on your hardware and your network.

Architecture: How it actually works

Moving to gNMI means rethinking where your data goes. SNMP usually feeds into a monolithic Network Management System (NMS). gNMI typically flows into a Time Series Database (TSDB) like Prometheus or InfluxDB via a telemetry collector that translates the stream into metrics Prometheus can scrape.

The data itself is sent as binary using Protocol Buffers (Protobuf). This makes it incredibly efficient over the wire, but it does mean you cannot just read it in plain text with Wireshark unless you have the right dissectors configured.

A major architectural shift here is Dial-Out telemetry. With traditional Dial-In, your collector connects to every single device. With Dial-Out, the devices are configured to actively push data to a central destination. This simplifies firewall rules and bootstrapping, but it also shifts connection management and scaling complexity onto the devices themselves, especially in very large deployments.

What about NETCONF?

Since we are talking about YANG models, you might wonder why we are not just using NETCONF. Both have their place in modern networks.

NETCONF uses XML and is heavily focused on transactional configuration. It is fantastic when you need to apply a complex, multi-device configuration change and ensure it either fully succeeds or rolls back. However, XML is heavy. For high-speed telemetry and streaming state data, gNMI with its binary Protobuf format is far superior.

The Gotchas

I will admit gNMI is not a perfect solution. Advocacy is useless if we ignore the hurdles.

First, there is a CPU tax. gRPC and TLS encryption require more overhead on the network device than a simple UDP-based SNMP poll. Older hardware might actually struggle with this load.

Second, navigating OpenConfig models can be intimidating at first. While YANG is infinitely better than hunting through ancient MIBs, you still have to understand the “YANG tree” structure to know exactly what paths to subscribe to. The learning curve is definitely steeper.

Better Tooling and Open Standards

Despite the learning curve, the ecosystem is catching up fast. Tools like gNMIc provide a much better user experience than old school commands like snmpget. Plus, gNMI is an open standard. It is not locked to one vendor. Even when using vendor specific data models, they are almost always described in YANG, which makes documentation and automation much more predictable.

gNMI is the logical choice for most modern networks. I even suspect it is a great fit for smaller setups like homelabs, though I will save that for a later post. There is plenty more to dive into, including different subscription types like STREAM or ONCE, but those deserve their own deep dives. Thanks for reading.

Footnotes

  1. SNMP’s push mechanisms (traps/informs) are unreliable and not suited for structured telemetry.