v1 配置:
[root@web2 snmp]# cat snmpd.conf
com2sec notConfigUser localhost public
#com2sec mynet 10.10.10.0/24 public
com2sec mynet 125.82.13.0/24 tm_pk
com2sec mynet 209.209.18.0/24 tm_pk
group notConfigGroup v1 notConfigUser
group notConfigGroup v1 mynet
view all included .1 80
view system included .1.3.6.1.2.1.1
view system included .iso.org.dod.internet.mgmt.mib-2.system
access notConfigGroup "" any noauth exact all none none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
v2配置:
[root@web2 snmp]# cat snmpd.conf
com2sec notConfigUser localhost public
#com2sec mynet 10.10.10.0/24 public
com2sec mynet 125.82.13.0/24 tm_pk
com2sec mynet 209.209.18.0/24 tm_pk
group notConfigGroup v2c notConfigUser
group notConfigGroup v2c mynet
view all included .1 80
view system included .1.3.6.1.2.1.1
view system included .iso.org.dod.internet.mgmt.mib-2.system
access notConfigGroup "" any noauth exact all none none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
使用snmpwalk若跑了一些讯息后停下来Timeout: No Respons
可能是网路环境不好,可以适度调整一下
请加参数(-t),例如:snmpwalk -c public -v 1 -t 120 192.168.1.55
本文转自 liang3391 51CTO博客,原文链接:http://blog.51cto.com/liang3391/490560