Tuesday, April 9, 2019

snmpwalk commands!

I use SNMP at work quite a bit and I have to issue snmpwalk commands fairly often to trouble shoot monitoring.

Here are a couple examples using SNMP v2c and v3.

SNMP V3 with authentication
snmpwalk -v3 -l authPriv -u USERNAME -a MD5 -A "PASSPHRASE" -x AES -X "PASSPHRASE" device.domain.com 1.3.6.1.2.1.31.1.1.1.1

SNMP v2c

snmpwalk -v2c device.domain.com -c SNMPString

Sometimes you need to redirect this to a file for better searching and reviewing.

 snmpwalk -v2c device.domain.com -c SNMPString > mibtree.txt 2>&1

That will do it without any errors or unwanted output.