Dangerous SNMP
|
Dangerous SNMP is the awesome way to use SNMP for Linux.
IANA number for Dangerous Linux: 41326.
What's done?
What else is on the list?
The only useful command-line tool provided right now is "snmp-client".
"snmp-client" is a general purpose SNMP command-line utility for communicating with an SNMP agent. It currently has support for the following operations:
Simple SNMP "get" operation.
snmp-client -v2c -cpublic udp://localhost get .1.3.6.1.2.1.1.1.0
Simple SNMP "getnext" operation.
snmp-client -v2c -cpublic udp://localhost getnext .1.3.6.1.2.1.1.1.0
Trivial SNMP "getbulk" operation.
snmp-client -v2c -cpublic udp://localhost getbulk .1.3.6.1.2.1.1.1.0
Useful SNMP "getbulk" operation.
snmp-client -v2c -cpublic udp://localhost getbulk .1.3.6.1.2.1.1.1.0 --repetitions 20 1.3.6.1.2.1.2.2.1.1
A typical SNMP "walk" operation.
snmp-client -v2c -cpublic udp://localhost walk .1.3.6.1.2.1
This is only around for testing AgentX functionality as it's developed.
For information on /proc/PID/io, see this site: http://docs.1h.com/Proc_I/O_Explained
Current MIBs include:
The following packages are required to compile Dangerous SNMP:
If you're testing, then you may want to use "tshark" to inspect the SNMP packets on the command line to make sure that things are looking the way that they should.
I've been using this command to inspect the traffic to my local net-snmp agent:
sudo tshark -i lo port 161 -V -O snmp
And this one to test AgentX:
sudo tshark -i lo port 705 -V -O agentx
To see the registered OIDs (and their sub-agents) on a Net-SNMP agentx master agent, run this command:
snmpwalk -v2c -cpublic localhost .1.3.6.1.4.1.8072.1.2