1. 下載安裝
net-snmp安裝程序:net-snmp-5.4.2.1-1.win32.exe
Perl安裝程序:ActivePerl-5.10.0.1004-MSWin32-x86-287188.msi
安裝過程默認就好
2. 配置snmpd.conf文件
在路徑(ne-snmp軟件安裝路徑)\etc\snmp\下,新建文件snmpd.conf,注意去掉.txt後綴,另外此路徑下已經有了一個snmp.conf文件,不要混亂兩者,
然後一下兩種方式二選一:
a.簡單配置:在snmpd.conf加入:rocommunity public
b.詳細配置:在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 to:
# incl/excl subtree mask
view all included .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 none
access MyRWGroup "" any noauth exact all all none
####