1.修改 snmpd.conf ,如下这里验证过并不需要本地生成myuser账户,这个应该只是组成报文时需要的。
注意鉴权方式主要有以下几种 authNoPriv authPriv NoauthPriv NoauthNOPriv
-------------------------------------------------------------------------------------------------------------------
###############################################################################
#
# ACTIVE MONITORING
#
# send SNMPv1 traps
# trapsink localhost public
# send SNMPv2c traps
#trap2sink 192.168.78.30 public
# send SNMPv2c INFORMs
trapsess -v 3 -u myuser -e 0x1111111111 -a MD5 -A 11111111 -x AES -X 22222222 -l authPriv 192.168.78.30
#informsink localhost public
# Note that you typically only want *one* of these three lines
# Uncommenting two (or all three) will result in multiple copies of each notification.
------------------------------------------------------------------------------------------------------------------
2.启动snmpd
ubuntu@ubuntu:/usr/local/net-snmp/sbin$ sudo ./snmpd -f -Le
Turning on AgentX master support.
NET-SNMP version 5.9.1
3.接收相关oid 主机ubuntu 192.168.78.30 NMS windows 192.168.78.37