1. 下载安装
net-snmp安装程序:net-snmp-5.4.2.1-1.win32.exe
Perl安装程序:ActivePerl-5.10.0.1004-MSWin32-x86-287188.msi
2.在net-snmp安装目录下:D:\Program Filesnet-snmp\etc\snmp
创建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 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
####
3.注册snmp agent服务
D:\Program Filesnet-snmp >registeragent.bat
4.启动snmp
5.输入命令:snmpwalk -v2c -c public localhost [oid]