A SNMPv3 TRAP

url:http://www.net-snmp.org/wiki/index.php/TUT:Configuring_snmptrapd_to_receive_SNMPv3_notifications

(for this, I'm making up an engineID to use: 0x8000000001020304)

In a /tmp/snmptrapd.conf file put:

 createUser -e 0x8000000001020304 traptest SHA mypassword AES
 authuser log traptest

Then start snmptrapd pointing to that file (runs in the foreground, uses only that config file and logs to stderr):

 snmptrapd -f -C -c /tmp/snmptrapd.conf -Le

Then run snmptrap (in another window) to send a linkup trap:

 snmptrap -v 3 -n "" -a SHA -A mypassword -x AES -X mypassword -l authPriv -u traptest -e 0x8000000001020304 localhost 0 linkUp.0

You should see this in the output of the window running snmptrapd:

 2007-10-10 10:19:11 localhost [UDP: [127.0.0.1]:46380]: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (0) 0:00:00.00 SNMPv2-MIB::snmpTrapOID.0 = OID: IF-MIB::linkUp.0

Success!


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值