snmp - the Simple Network Management Protocol is anything but as I discovered while trying to monitor status on remote devices. The story so far …

Some background on snmpwalk

snmpwalk is a very useful tool to explore what snmp information is available from an snmp enabled device. To use snmpwalk, on a commandline enter:

snmpwalk -Os -v [1|2c|3] -c community host [ OID ]

-Os means print only last symbolic element of OID
-v is the snmp version identifier
-c is the snmp community
host is the ipaddress of the snmp agent you want to query
OID is an optional item which identifies a specific branch of the mib for the device. If given only the values under that branch will be printed.

You can use snmpwalk --help to get a full list of options for snmpwalk.
By default an snmp agent listens on UDP port 161 and traps are handled through UDP port 162. If the agent you want to query is not listening on UDP port 161 then you may need to specifiy the agent ip-address and port in the format host:port-number.

Turning snmp on in a Cisco ASA

#
# allow host #.#.#.# to poll through the ASA's outside interface for snmp
# community "public" using snmp version 2. Refers to the contents of the
# standard MIB-II which is sometimes referred to as RFC1213-MIB
snmp-server host outside #.#.#.# poll community public version 2c
#
# as far as I can see this is informational
snmp-server location MyServerRoom
#
# sets the text for mib object sysContact
snmp-server contact Me
#
# set the snmp community
snmp-server community public
#
# enables the specified snmp traps
snmp-server enable traps snmp authentication linkup linkdown coldstart