net-snmp配置

来源:互联网 发布:淘宝批发 编辑:程序博客网 时间:2024/06/08 01:00

1. list

全局配置 SNMP Version V2/V3 SNMP Port : 整形数(默认161) Trap Port : 整形数(默认162) SNMP V2 配置 (多组) NMS IP : IP地址 Access Type : Read/Read-Write Trap Level : Enable/disable Read Community : 字符串(默认public) Write Community : 字符串(默认private) Trap Community : 字符串(默认public) SNMP V3 配置 (多组) User Name : 字符串 Security Level : NOAuth,NOPriv(无需Auth密码和Priv密码) .. Auth,NOPriv(需要Auth密码,无需Priv密码) .. Auth,Priv(需要密码) Auth Protocol : MD5/SHA Auth Password : 字符串 Priv Protocol : DES/AES Priv Password : 字符串 Access Type : Read/Read-Write

添加SNMP V3用户
方法一:
①修改V3配置文件,要先停止snmpd,修改好了以后再启动snmpd。

② /home/root/ptm/collector/data/snmpd.conf这个文件是自动生成的,在末尾添加就可以了。
删除一个用户或者修改一个用户,都要同时删除两个配置文件中的对应的信息。

③ 配置方法如下。

/////////////////////////////////NoAuth NoPriv////////////////////////////////////////////////////adding the following line to /var/net-snmp/snmpd.conf:     createUser frankadding the following line to /usr/local/share/snmp/snmpd.conf:   rwuser frank noauth          # rwuser读写, rouser只读用户,noauth:无需密码登录///////////////////////////////// NoAuth Priv ////////////////////////////////////////////////////net-snmp-config --create-snmpv3-user –a “12345678” frankadding the following line to  /var/net-snmp/snmpd.conf:   createUser frank1 MD5 "12345678" DESadding the following line to /usr/local/share/snmp/snmpd.conf:   rwuser frank1////////////////////////////////// Auth NoPriv ///////////////////////////////////////////////////net-snmp-config --create-snmpv3-user -ro -A 12345678 -X 12345679 -a SHA -x DES frank1adding the following line to  /var/net-snmp/snmpd.conf:   createUser frank2 SHA "12345678" DES 12345679adding the following line to /usr/local/share/snmp/snmpd.conf:   rouser frank2

直接修改/var/net-snmp/snmpd.conf和/usr/local/net-snmp/share/snmp/snmpd.conf。前提也是要先关闭snmpd服务。

做的一个在web界面上添加V3用户

snmp客户端使用V3访问Mib库

原创粉丝点击