net-snmp
Net-SNMP provides tools and libraries for SNMP protocol operations, including querying network devices, sending traps, and managing SNMP agents for information exchange between servers and clients.
Description
The Simple Network Management Protocol (SNMP) enables management information exchange between agents (servers) and clients. Net-SNMP offers a comprehensive suite of command-line tools for SNMP operations like querying device information (snmpget, snmpwalk), sending notifications (snmptrap, snmpinform), and configuring agents (snmpd, snmptrapd). It includes libraries for development, Perl bindings, and utilities for SNMPv3 user management and view-based access control.
Use cases include network monitoring, device discovery, performance data collection, and trap handling for alerts. Tools support SNMPv1, v2c, and v3 with authentication/privacy options. Development files aid custom SNMP applications, while MIB parsing resolves OIDs to textual descriptions.
Key packages cover trap handling (libnetsnmptrapd45), base MIBs/documentation (libsnmp-base), core library (libsnmp45), applications (snmp), agent daemon (snmpd), trap receiver (snmptrapd), and graphical MIB browser (tkmib).
How It Works
Net-SNMP implements SNMP protocol standards for GET/SET/GETNEXT/GETBULK requests/responses, trap/inform notifications, and agent operations. Tools encode/decode ASN.1 BER packets, parse MIBs for OID resolution, and handle SNMPv3 USM (User-based Security Model) with MD5/SHA auth and DES/AES privacy. Agents (snmpd) expose MIB variables via UDP/161, process requests, and generate traps via UDP/162. Trap receiver (snmptrapd) logs/decodes incoming notifications. MIB2C generates agent extension code from MIB definitions.
Installation
sudo apt install snmpFlags
Examples
snmpwalk -v2c -c public 192.168.1.1 .1snmpget -v2c -c public 192.168.1.1 sysDescr.0snmpwalk -v2c -c public 192.168.1.1 hrSWRunNamesnmpwalk -v2c -c public 192.168.1.1 ifDescrsnmpset -v2c -c private 192.168.1.1 sysContact.0 s admin@corp.comsnmptrap -v2c -c public 192.168.1.1 0 linkDownsnmpbulkwalk -v2c -c public -Cn0 -Cr25 192.168.1.1 systemonesixtyone -c community.txt -i targets.txt