-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNMPv3 trap is not working #344
Comments
用一下1.25.0版本试一试 |
I am facing the same issue. |
Same here. SNMPV3 trap is not received properly when I use gosnmp. Same is received properly via snmptrap command In snmpdtrapd.conf, I have :createUser -e 800007e5801d3b1026d245ca3a deepa SHA512 password AES password While sending the snmpv3 trap, I have it like this -p := &g.UsmSecurityParameters{ On tcpdump, I can see the following -15:22:19.118858 IP localhost.52099 > localhost.snmp-trap: F=apr U="deepa" [!scoped PDU]ae_1a_a3_b8_40_be_81_dd_77_10_dd_a6_d3_0b_c0_42_33_cb_0d_40_c9_ce_ea_82_94_60_ad_f3_a4_18_f5_bc_d7_4e_e2_c8_e7_b0_9d_19_8c_d7_8b_be_12_8e_6b_6c_f9_64_6a_b6_8a_a2_c7_70_42_03_ec_35_d4_5a_a9_7b_cf |
When you say "the actual Trap is not seen", how do you know that ? Here is a good reference to configure a trap destination: http://www.net-snmp.org/docs/mibs/SNMP-TARGET-MIB.txt it's complicated, unfortunately, but thankfully only has to be setup once, typically. Here is an example script which sets up a trap destination ( at 192.168.131.8 port 10162 ) So when a trap is sent locally ( usually by an agent using 'send_v3trap' API ), the remote node is send the trap.
|
same issue, any ideas? use gosnmp to send trap-v3 not works....... |
I am trying to build an SNMP agent which will send the SNMv3 traps.
I am using the following code as a reference:
https://github.com/gosnmp/gosnmp/tree/master/examples/trapsend_v3 and using authPriv as security level.
I passed all the necessary parameters - username, authProtocol (MD5), authPassword, privprotocol(DES), privPassword, and setting the EngineID. I am confused with the EngineID setting.
My SNMP server is configured with the following engine ID (0x80001f8880315de44d53ce8394).
/etc/snmp/snmptrapd.conf
createUser -e 0x80001f8880315de44d53ce8394 username password DES password
authuser log username
I am coding EngineID in the SNMP go program as
SecurityParameters: &g.UsmSecurityParameters{UserName: "snmpv3_objectscale_md5_des",
AuthoritativeEngineID: "0x80001f8880315de44d53ce8394",
AuthenticationProtocol: g.MD5,
AuthenticationPassphrase: "password",
PrivacyProtocol: g.DES,
PrivacyPassphrase: "password",
},
resullt: I can see the packet is received by the server (TCPDUMP), the actual Trap is not seen. I am suspecting that I am not encoding the EngineID right in the code. Please help.
if I use the linux utility snmptrap, I can see that my server is receiving the traps.
snmptrap -d -v 3 -e 0x80001f8880315de44d53ce8394 -a MD5 -A password -x DES -X password -l authPriv -u username IP:162 pdus...
The text was updated successfully, but these errors were encountered: