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

推荐订阅源

大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
雷峰网
雷峰网
量子位
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
T
Tailwind CSS Blog
月光博客
月光博客
博客园 - 【当耐特】
博客园_首页
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
SNMP & ICMP Protocols
ruro122020 · 2026-04-24 · via DEV Community

ruro122020

Here are a couple of communication protocols I learned today on a system at work.

SNMP
SNMP stands for Simple Network Management Protocol. It runs over UDP (User Datagram Protocol: a lightweight method of sending data that doesn’t require a back-and-forth connection handshake) on ports 161 and 162 (specific numbered channels that network services listen on) and is used to discover and monitor devices on a network. Say you have a dozen devices on your network and one drops off, SNMP sends a notification to the central server letting you know that device is unreachable.

When an SNMP manager (the central software that monitors everything) polls a device, it gets back structured data organized by OIDs (Object Identifiers: unique dotted-number addresses that each point to one specific piece of data on a device). These OIDs are organized in a tree structure called a MIB (Management Information Base: a map of all the data a device can report). Here’s roughly what that looks like:

OID                          Value
─────────────────────────────────────────
1.3.6.1.2.1.1.1.0           "Cisco IOS v15.2"    (system description)
1.3.6.1.2.1.1.3.0           84729100             (uptime in hundredths of a second)
1.3.6.1.2.1.1.5.0           "core-router-01"     (hostname)
1.3.6.1.2.1.2.2.1.10.1      5765214890           (bytes received on interface 1)
1.3.6.1.2.1.2.2.1.16.1      3298107654           (bytes sent on interface 1)
1.3.6.1.2.1.2.2.1.7.1       1                    (interface 1 admin status: 1=up)
1.3.6.1.2.1.25.3.3.1.2.1    47                   (CPU usage: 47%)

Enter fullscreen mode Exit fullscreen mode

The first six numbers are always the same (1.3.6.1.2.1) because every standard SNMP query starts at the same root: ISO > identified-organization > DoD > internet > management > MIB-II. After that, the numbers branch into data categories: 1 for system info, 2 for interfaces (the physical or virtual network connections on a device), 25 for host resources like CPU and memory.

So when the value next to the OID changes from 1 (up) to 2 (down), that’s in the value column, that means interface 1 went offline. That’s what triggers a trap (an unsolicited alert that an SNMP agent sends to the manager without being asked) on port 162 to alert you something is wrong.

ICMP
ICMP stands for Internet Control Message Protocol. It operates at the network layer (Layer 3 of the OSI model: the layer responsible for routing packets between devices across networks). ICMP uses type/code pairs to identify messages (the most common are type 8 for echo request and type 0 for echo reply. That’s what ping uses). It’s how you do network diagnostics, error reporting, and troubleshooting. It’s also the protocol behind DoS (Denial of Service) ping flood attacks, where an attacker overwhelms a target by sending massive amounts of ICMP traffic.

A common use case would be if you’re trying to reach a website and it’s not loading, you can open a terminal and run ping google.com. If you get replies back with round-trip times (the number of milliseconds it takes a packet to travel to the destination and back), you know your network connection is fine and the problem is somewhere else. If you get “Request timed out” or “Destination host unreachable,” that tells you the issue is between you and the server. Maybe your router is down, maybe your ISP is having problems. That’s ICMP doing its job under the hood.