Install and configure the net-snmp agent in Windows

Source: Internet
Author: User
Tags snmpwalk

Although there is a lot of information on the Internet, it is messy and I feel that it is not very good. So I have summarized that I can successfully configure it on Windows 7.

1. Download and install

Net-snmp InstallationProgram: Net-snmp-5.4.2.1-1.win32.exe

Perl Installer: ActivePerl-5.10.0.1004-MSWin32-x86-287188.msi

The default installation process is good.

 

2. Configure the snmpd. conf file

In the path(Software installation path) \ etc \ SNMP \, add a fileSnmpd.conf, and remove the suffix .txt. In addition, an SNMP. conf file already exists in this path. Do not confuse the two,

Choose either of the following two methods:

A. simple configuration: Add "rocommunity public" to snmpd. conf.

B. Detailed configuration: add the following to snmpd. conf:


####
# First, map the community name (community) into a security name
# (Local and mynetwork, depending on where the request is coming
# From ):

 

# Sec. Name source community
Com2sec local localhost Root
Com2sec local 192.168.1.110 Root
Com2sec mynetwork 192.168.1.0/24 public

####
# Second, map the Security names into group names:

# Sec. Model sec. Name
Group myrwgroup V1 local
Group myrwgroup v2c local
Group myrwgroup USM local
Group myrogroup V1 mynetwork
Group myrogroup v2c mynetwork
Group myrogroup USM mynetwork

####
# Third, create a view for us to let the groups have rights:

# Incl/excl subtree mask
View All supported ded. 1 80

####
# Finally, grant the 2 groups access to the 1 view with different
# Write permissions:

# Context sec. Model sec. level match read write notif
Access myrogroup "" any noauth exact all none
Access myrwgroup "" any noauth exact all none

 

####

 

(Note that the SNMP service must be restarted every time you change the snmpd. conf file)

3. register the SNMP agent service in(Software installation path) \ path, open the fileRegisteragent. bat will automatically register the service.

 

4. Restart SNMP.

> Net stop "net-snmp agent"

> Net start "net-snmp agent"

 

5. OK, you can use it. Test it:

> Snmpwalk-V 2C-C root localhost if

> Snmpwalk-V 2C-C root 192.168.1.110 if

> Snmpget-V 2C-C root localhost 1.3.6.1.2.1.1.1.0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.