Set up Net-SNMP Agent on Windows

This article shows you how to turn your Windows box into an SNMP-enabled host, using Net-SNMP.

Step 1: Installation

Obtain installation (binary) package from Net-SNMP site and install using all default setting. By default, the Net-SNMP is installed under C:/usr. Follow the list of snapshots below to download and install the latest stable version of Net-SNMP.

Step 2: Configuration

Add Net-SNMP to the path. Go to “Control Panel”->”Performance and Maintenance”->”System”. Click “Advanced” Tab. Then click “Environment Variables”. From System Variables list, select Path, then click “Edit” button. Append “C:net-snmpbin” to Path variable value. Then click “OK”->”OK”->”OK” to save.

Select “Start”->”Run” to open a DOS prompt. Then at the prompt, type “snmpconf –i”. Then select C:/net-snmp/etc/snmp/snmp.conf to read the default setting in.

Select snmpd.conf, which is configuration file for the Net-SNMP SNMP agent. It’s documented on this SNMPD.CONF page. The snmp.conf file the configuration file for the Net-SNMP applications and it’s documented on this SNMP.CONF page.

The most basic configuration is to set up read and write communities and community strings. To do so, select 1 for “Access Control Setup”.

Select “3: a SNMPv1/SNMPv2c read-only access community name“. Hit Return key.

Enter “public” as the community string; you can enter any string you like. The community string works a bit like password. Then enter nothing for both “the hostname or network address to accept…” and for “The OID that this community ….”. By entering nothing, we specify that we will accept SNMP queries from all hostnames and all network addresses and that this community can view all MIBs installed on this SNMP agent.

Select “4: a SNMPv1/SNMPv2c read-write access community name“. Hit Return key.

Enter “public” as the community string. Then enter nothing for both “the hostname or network address to accept…” and for “The OID that this community ….”. By entering nothing, we specify that we will accept SNMP read-write queries for this community from all hostnames and all network addresses and that this community can view all MIBs installed on this SNMP agent.

To exit and save snmpd.conf, enter “finished” -> “finished” -> “quit”.

To verify the Net-SNMP has been configured correctly, go to C:net-snmpbin and double click “snmpd.exe” to run the SNMP agent.

You may see this warning message because SNMPD would try to bind to several TCP ports (161 for general SNMP messages and 162 for trap messages), just click “Unblock”. If you are not the admin of your machine, you might want to ask your admin whether you can run a SNMP agent on your machine.

You should see a terminal that looks like this. This is the log windows of snmpd.exe. Only close it if you want to kill snmpd.exe.

Now you are ready to poll network info from your SNMP-enabled box! At the prompt, type “snmpwalk –v 2c –c public localhost”. The “snmpwalk” command retrieves a subtree of management values using SNMP GETNEXT requests. It’s syntax is as followed:

snmpwalk [APPLICATION OPTIONS] [COMMON OPTIONS] [OID]

If no argument is given, snmpwalk will search the subtree rooted at SNMPv2-SMI::mib-2. The “-v 2c” option tells snmpwalk to use SNMP version 2c, whereas the “-c public” option specifies the public community string. Lastly, “localhost” option tells snmpwalk to query from localhost.

C:\usr\etc\snmp> snmpwalk -v 2c -c public localhost

To set up SNMPv3 security, here is a short instruction, thanks to this article on netadmintools.com. First, add the following two lines to snmpd.conf

createUser jess MD5 "jess_password" DES
rouser jess

Make sure you restart the Net-SNMP Agent service after these changes. This will set up a read only user jess that will authenticate with the passphrase jess_password using MD5/DES for encryption. Note that the password is available in plain text in the file, unlike with the GNU/Linux configuration; however, the traffic is still encrypted.

Now we can get the sysUpTime, how long snmpd has been running.

C:\usr\etc\snmp> snmpget -v 3 -u jess -l authNoPriv -a MD5 -A jess_password localhost sysUpTime.0 

20 thoughts on “Set up Net-SNMP Agent on Windows”

  1. U Saved my day. Thank you.
    Suddenly our server SNMP didn’t work at all. Even remove & re-install didn’t work!

    But you helped me(and company) so much.

    Thank you again.

  2. What’s Happening i’m new to this, I stumbled upon this I’ve found It positively helpful and it has helped me out loads. I am hoping to give a contribution & aid different users like its helped me. Good job.

  3. I have followed all the instructions on this article.

    When I start snmpd.exe from the command line, I get the following errors

    C:\Documents and Settings\myself>snmp

    C:\Documents and Settings\myself>snmpd
    No log handling enabled – using stderr logging
    Error opening specified endpoint “”
    Server Exiting with code 1

    What is wrong here? and how do I fix it ?

    • Hi Max, this might have to do with you using a path with space in it. Net-SNMP was originally written on *nix-based system(Unix and Linux) and was later ported to Windows. Software like this often has trouble with path with space. Try install Net-SNMP in a path without space.

  4. I would like to use the latest long term supported version of net-snmp v5.7.3 on Windows; although Net-snmp.org hasn’t posted binaries for Windows systems. They only have source code. Does anyone have a link to a compiled net-snmp agent v5.7.3 for Windows?

  5. No log handling enabled – using stderr logging
    MIB search path: c:/usr/share/snmp/mibs
    Cannot find module (IP-MIB): At line 0 in (none)
    Cannot find module (IF-MIB): At line 0 in (none)
    Cannot find module (TCP-MIB): At line 0 in (none)
    Cannot find module (UDP-MIB): At line 0 in (none)
    Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
    Cannot find module (SNMPv2-MIB): At line 0 in (none)
    Cannot find module (SNMPv2-SMI): At line 0 in (none)
    Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
    Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
    Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
    Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
    Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
    Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
    Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
    Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
    Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
    Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
    Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
    Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
    Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
    Cannot find module (SNMPv2-TM): At line 0 in (none)
    Warning: no access control information configured.
    (Config search path: c:/usr/etc/snmp;c:/usr/share/snmp;c:/usr/lib)
    It’s unlikely this agent can serve any useful purpose in this state.
    Run “snmpconf -g basic_setup” to help you configure the snmpd.conf file for this agent.
    NET-SNMP version 5.6.1.1

    I installed net-snmp to Windows 10/ Configuration no any problem, I overcome to Perl issues. However, last of step snmpd.exe show to me before mentioned error

  6. Jessica Chiang can you read my comment. Please if you know any information let me know that.

    Thank you!

    How to process of manager installation …

  7. The fascist DONALD TRUMP said to CNN “I believe HITLER was RIGHT”. gaf Donald Trump is a racist with SEWER and the DailyStormer, he listens to satanic 666 sexist music… just google “Donald Trump SEWER 2154” and see FOR YOURSELF!! THE MUSIC oq VIDEO IS about the KKK and Adfolf Hitler raping a 12 year old African-American WOMAN OF COLOR in front of her parents and then hanging MLK with Emma Watson and Taylor Swift!! TAYLOR SWIFT the racist white privileged cvnt said she voted “for donald trump twice” in her OWN WORDS!!! Say no to hate, say no to SEWER, say no to l DONALD TRUMP and EMMA WATSON and Tatylor Swift !! Deport racism today yvr.

  8. Steel I-beamѕ are avaіlable іnn differentt standard ѕizes.
    On the other hand, if the CSS оverflow attribute is ѕet to
    hidden, then thе image іs curtaіled to the dimensions of the element.
    Further, itt will appear onlpy for one dimension if only one
    dimension exceeds the dimension ᧐f the containing element.

Leave a Reply to Andrei Tunes Cancel reply