[erlang-questions] SNMP usm discovery
Dominik Pawlak
dominik_pawlak@REDACTED
Tue May 20 15:45:13 CEST 2014
I'm trying to find a way to perform a snmpEngineID discovery process as defined in RFC3414 chapter 4 in a manager.
The process is pretty simple: you send a v3, usm Request message
with security level: noAuthNoPriv, empty user name, endineID and
varbinds. The agent then sends a report containing his engineID.
I tried registering agent with empty or no security name defined,
but when I try to send the Request message I get:
snmpm:register_agent("u", "a",
[{engine_id,[]},{address,[x,x,x,x]},{version,v3},{sec_model,usm},{sec_name,""},{sec_level,noAuthNoPriv}]).
snmpm:sync_get("u", "a", "auth", [], 1000).
{error,{send_failed,1440625960,unknownSecurityName}}
=ERROR REPORT==== 20-May-2014::11:12:57 ===
[ snmp : manager : snmpm_mpd : <0.55.0> ]
MPD: CONFIG ERROR: unknownSecurityName (message: {message,'version-3',
{v3_hdr,996332938,484,
[4],
3,undefined,undefined},
[48,24,4,0,4,4,97,117,116,
104,160,14,2,4,85,222,53,
40,2,1,0,2,1,0,48,0]})
I also tried registering a usm user with an empty (one space) name:
snmpm:register_usm_user(" ", " ", [{sec_name, "initial"}]).
snmpm:register_agent("u", "a", [{engine_id, "
"},{address,[x,x,x,x]},{version,v3},{sec_model,usm},{sec_name,"initial"},{sec_level,noAuthNoPriv}]).
This time the message is sent, and the agent does respond with a
message containing his engineID, but this information is not
provided to the snmpm_user module:
=INFO REPORT==== 20-May-2014::12:21:45 ===
SNMPM default user callback received handle_error:
ReqId: -1
Reason: {failed_processing_message,
{securityError,usmStatsUnknownEngineIDs}}
UserData: undefined
{error,{timeout,1440625963}}
What is the proper way of doing this?
--
Cheers,
Dominik Pawlak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140520/89f4cc73/attachment.htm>
More information about the erlang-questions
mailing list