Test if SNMP devices are responding correctly to SNMP queries

Installing a SNMP tool

Debug and troubleshooting SNMP is notoriously awkward. Use this guide and you'll soon master the tools needed, get a better understanding of how SNMP works and most importantly ensure that a device correctly replies to your queries.

Several applications exists for executing an SNMP query - some with a GUI others as a command-line tool. We recommend the command-line tool SnmpWalk and if you're using Microsoft Windows consider downloading this ready to use package otherwise install a version matching your type of operating system (packages exists for Mac OS X and different flavours of Linux/Unix).

After downloading and installing SnmpWalk open a "command prompt" and navigate to the folder where SnmpWalk is located.


Create a SNMP query

The following is a simple SNMP query using SnmpWalk:

snmpwalk -Os -c [community string] -v [SNMP version] [IP] [OID]

  • [community string]: By default most SNMP enabled devices uses "public". You may have changed it through the administration tool used to configure the device.
  • [SNMP version]: SNMP protocol version, "1" or "2c". Most devices supports "2c".
  • [IP]: IP address of the device.
  • [OID]: SNMP OID value(s) that you wish to read (optional, but if omitted expect a very long response).


If community string is "public", SNMP protocol version is "2c", the IP address of the device is "" and you wish to read the "sysDescr" object (OID: iso. - then the command will look like this:

snmpwalk -Os -c public -v 2c iso.


Response from a SNMP enabled device (in this example from a Hewlett Packard network attached printer):

iso. = OID: iso. 
iso. = Timeticks: (526523774) 60 days, 22:33:57.74 
iso. = "" 
iso. = STRING: "NPI10BE5A" 
iso. = STRING: "HP Color LaserJet CM2320nf MFP" 
iso. = INTEGER: 72 
iso. = Timeticks: (0) 0:00:00.00


Response from a device not supporting SNMP: 

Timeout: No Response from

If you get a result like the one above, please verify that the SNMP community string, protocol version and IP address is correct. If the command has been entered correctly you can assume that the device does not respond to SNMP queries. Please see vendor documentation for further troubleshooting. 

OID to read values from

You got a valid reply from a SNMP enabled device, now you need to figure out which values that are of interest. Depending on the documentation available this may prove the most tedious part.

SNMP stores values in a tree like structure similar to how files and folders are organized on your hard drive. Each vendor may implement a private branch with specific information about the hardware or use the more generic structure defined by e.g RFC 1156

Anything under iso. should be well documented as is follows an agreed standard, but don't be surprised if your device just doesn't comply and produces odd output. Iso. is vendor specific and typically requires some sort of documentation from the vendor to interpret. 

Alternative you can run the snmpwalk example above, but just omit the OID. This will return every information the device is able to display through SNMP. The returned data may be a very long list of OIDs and values. 

Tools that can help you to understand what you're looking at:


Last updated:


  • Avatar

    Hi... I am a new one to SNMP, I followed the above way, it work well.
    But I want to find the device details of another machine, which is connected in my network,how can I do??
    If I give another machine's IP ,instead of mine, It cause time out..
    anyone give an idea regarding this...

  • Avatar


    Thanks for your comment.

    In most cases when you get an SNMP timeout is because the target machine doesn't have SNMP enabled or doesn't allow SNMP request from your machine.

    Check your SNMP configuration on the target IP address to make sure SNMP is supported.

    Best regards

    Claus Tjoerndal

  • Avatar

    Thanks for your reply. yes I done a mistake, now it works.
    I have two more questions, will you please help me..
    1.Is it possible to find the connection mode of the target machine(wired or wireless)?
    2.In a single command,can I list all SNMP enabled machines in my network??
    Thanks in advance..

  • Avatar


    1. It depends on what type MIB the SNMP device supports, but you might be able to collect interfaces information from OID .

    2. You can do it with this command, this will scan all ip addresses IP range otherwise you need to create a powershell to do it for you.

    for i in $(seq 1 254); do echo 172.16.132.$i ; sudo nmap -sU -p 161 --script=snmp-interfaces.nse 172.16.132.$i | grep "open"; done

    I can recommend you to try Panorama9 for 30days free, we will automatically start scanning your network for devices with SNMP enabled and monitor NAS, Switches, Printers and UPS.

    You can sigh up here for a free trail - http://www.panorama9.com/free-trial

  • Avatar

    Thanks again, actually I need this through java program.
    I am going with snmp4j.jar.
    Its really helpful.
    Can I get the mac os machine details from windows??

  • Avatar

    Hi... Is there any OID to find the login user name of the machine..

  • Avatar


    Sorry I didn't see your last two replies..

    You might be able to find machine/user information from the OID .

    Best regards

    Claus Tjoerndal

  • Avatar

    I tried but can't get the details..... here is my output =4.43.00(system uptime) 07:df:02:11:0f:02:11:00 output)

    Is there any version mismatch, i tried version 1 only...

  • Avatar

    That might be that I copied a specific OID from the Host-Resources MIB, if you run it against . you should get the full MIB returned, it should't matter what version you are using.

    But the MIB . will only contain data about the host and number of users, I can't find any MIBs containing user information, but you might be able to find the information some other MIBs

    I'll suggest you run a SNMPwalk against a machine where you know the username etc and ask for OID .1.3. and pass the result to a txt file, where you easily cam search for the specific username. This output will contain a massive numbers of lines, so therefore pass it to a file.

    Hope that helps.

    Best regards

    Claus Tjoerndal

  • Avatar

    Thanks, I tried the following command...
    snmpwalk -Os -c public -v 2c >wow.txt

    It gives 1400 lines of output...

    It doesn't have user name but it was what i am searching..

    so these are the maximum information, I can get from the SNMP...
    I am correct..???

  • Avatar

    It depends on the device type, switches with +48 ports might have even more information, there isn't a limit on SNMP it depends on the MIBs loaded to the device.

  • Avatar

    Thanks a lot for your comments..

  • Avatar

    Hi, i am a new in windows server and SNMP and i'm facing a critical alarm on my Nagios system from the Windows server 2008 ( Domain Controller)
    C:\ Drive Space
    CRITICAL 07-10-2015 01:20:34 5d 9h 36m 1s 2/2 CRITICAL - Socket timeout after 10 seconds
    D:\ Drive Space
    CRITICAL 07-10-2015 01:20:34 5d 9h 36m 1s 2/2 CRITICAL - Socket timeout after 10 seconds
    Memory Usage
    CRITICAL 07-10-2015 01:20:34 5d 9h 36m 1s 2/2 CRITICAL - Socket timeout after 10 seconds

    i tried to restart the SNMP service but that didn't change anything..

    please help ASAP

  • Avatar


    Thank you for your comment.

    The error message you're receiving sounds like your Nagios server isn't able to create a connection to your Windows server.
    The problem can be that your Windows server is simply not replying on the SNMP request.
    I will suggest that you start with a simple check from the Nagios server and e.g. your own machine just to make sure that your Windows server is replying on SNMP.
    This can be done by running a program called SNMPwalk, you can find the program in the article on top.
    snmpwalk -Os -c pulic -v 2c iso.

    If either of those test replies back with a result, the problem is located on your DC01, then try run the same cmd on the server, if you get a reply running the cmd locally, you might have a firewall problem.

    And just for the sake of it, Panorama9 have a 30-day free trial for our cloud based monitoring tool, and with our product you don't need to worry about how to setup specific rules to monitor e.g. your disk drive, memory rules etc. http://panorama9.com/free-trial

  • Avatar

    The format you have an example for the command snmpwalk -Os -c [community string] -v [SNMP version] [IP] [OID], doesn't work for me. I have to use the following format example:
    SnmpWalk.exe -r:MainRouter -csv
    SnmpWalk.exe -r: -t:10 -c:"admin_rw" -os:.
    SnmpWalk.exe -r:"::1" -v:3 -sn:SomeName -ap:MD5 -aw:SomeAuthPass -pp:DES -pw:SomePrivPass -os:. -op:. -q

  • Avatar

    Hi ShawnM,

    The reason is that our examples are based on the package "ready to use package", I will take a look at the guide and see if we can update it to one standard.

    Best regards

    Claus Tjoerndal

  • Avatar
    aman sahay

    I am going through same instuction in command prompt.
    But I am getting error like this:- 'snmpwalk' is not recognized as an internal or external command, Operable program and Batch file.
    can you suggest me....what mistake I am doing?


  • Avatar
    Mati Link

    SnmpWalk has changed its switches. Its time to update the article here.

  • Avatar
    Javier Victor Mariano Bruno (Derp)

    Come on guys, if you are trying to test snmp you should know by now how to execute an EXE. Snmpwalk its a tool not included in windows, as the article says. You need to follow the download link, open the zip and extract it on the folder you are working on or extract it to c:\windows\system32 if you want to have it available in any prompt folder.

    The guys from SNMPWalk changed the command line switches format, so just execute snmpwalk with no switches and at the end you will see some examples. The theory its the same.

  • Avatar
    Danny Merkenhof

    Is there a way to just monitor different OID's without having to add conditions to it? I'm trying to setup monitoring for my Sophos XG firewall but I would like to see things like CPU utilization, memory utilization, live users, etc. in a graph without the need of a condition. For example the Live users should be able to be none without creating an issue.


    So basically make conditions optional, but I'm not sure if that's possible..

    Edited by Danny Merkenhof