SNMP协议

介绍SNMP知识:SNMP协议、SNMP-trap、SNMP服务、SNMP端口、snmp.exe

« 什么是snmp trap?进程snmp.exe 详解 »

snmp 服务配置



snmp從RH9.0後就改為net-snmp,所以跟之前設定略有差別,請修改下列設定檔:
]#vi /etc/snmp/snmpd.conf

.SNMP的設定
snmp從RH9.0後就改為net-snmp,所以跟之前設定略有差別,請修改下列設定檔:
]#vi /etc/snmp/snmpd.conf

com2sec local localhost public
com2sec mynetwork 192.168.0.0/24 public
group MyRWGroup v1 local
group MyROGroup v1 mynetwork
group MyRWGroup v2c local
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view all included .1 80
access MyROGroup "" any noauth prefix all none none
access MyRWGroup "" any noauth prefix all all all
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

<ps>請注意,mailscanner-mrtg使用v2c的界面取得數據,group MyRWGroup v2c
local此行一定要有.

修改完請重新啟動,/etc/rc.d/init.d/snmpd restart
測試snmp,
]#snmpwalk localhost -c public -v 1

測試mailscanner-mrtg使用的v2c uptime
]#snmpwalk -v 2c -c public localhost uptime

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最新评论及回复

最近发表

Powered By SNMP  Windows soft Download MSN中文博客

Copyright http://net-snmp.cn All Rights Reserved.