Hi net-snmp users! I use SNMP v3 for sending enterprise traps to localhost. I have checked the documentation: http://net-snmp.sourceforge.net/tutorial/tutorial-5/commands/snmptrap-v3.html and also the man pages, but still I don't understand something.
If I want to walk on my MIB using snmpv3 I put rwuser username in /usr/local/share/snmp/snmpd.conf. and a createUser directive in /var/net-snmp/snmpd.conf createUser username MD5 authpass DES privpass snmpwalk works fine getting the right keys from the MIB. When it comes to sending traps to the same username works only for informs, I meen snmpinform cmd works fine and sends the alert to localhost. I have the same createUser directive from above in /var/net-snmp/snmptrapd.conf. If I want to send TRAP2 with snmptrap I get: snmptrap: USM unknown security name (no such user exists) (Sub-id not found: (top) -> coldStart) Ok. I have checked the link written above, and there I found that I need to modify the createUser directive using an engine ID , I've done that, restarted the snmptrapd, in order to take the new user with this new engine ID, and run again snmptrap, this time with the -e engineID from the persistent file in the command line, but sadly same behavoir, USM unknown security name. What do I do wrong? Here is some debug from snmptrap: snmptrap -Ddumph_send,dumpv_send,usm -e 0xbd224466-v 3 -u root -a MD5 -A authpass -l authPriv -x DES -X privpass localhost 42 coldStart.0 dumph_send: SNMPv3 Message dumph_send: TRAP2 dumph_send: VarBind dumph_send: Value ObjID: SNMPv2-MIB::coldStart.0 dumph_send: Name ObjID: SNMPv2-MIB::snmpTrapOID.0 dumph_send: VarBind dumph_send: Value UInteger: 42 (0x2A) dumph_send: Name ObjID: RFC1213-MIB::sysUpTime.0 dumph_send: error index Integer: 0 (0x00) dumph_send: error status Integer: 0 (0x00) dumph_send: request_id Integer: 253202694 (0xF179106) dumph_send: ScopedPdu dumph_send: contextName String: [NULL] dumph_send: contextEngineID String: .....ò..Qih.C dumph_send: msgSecurityModel Integer: 3 (0x03) dumph_send: msgFlags String: . dumph_send: msgMaxSize Integer: 65507 (0xFFE3) dumph_send: msgID Integer: 1331985359 (0x4F647BCF) dumph_send: SNMP Version Number Integer: 3 (0x03) dumph_send: SM msgSecurityParameters usm: USM processing has begun (offset 76) usm: getting user root usm: Unknown User snmptrap: USM unknown security name (no such user exists) (Sub-id not found: (top) -> coldStart) I have in /var/net-snmp/snmptrapd.conf and snmpd.conf createUser -e 0xbd224466 root MD5 "authpass" DES "privpass" I have observed that snmpinform, or snmptrap -Ci which is the same, does a SNMP GET message before, I suspect that it takes the remote engineID. But if I configure as above, I am working on localhost only, snmptrap fails to identify the user even I specify the engine ID in the cmd line. I am using net-snmp5.2.2.pre1
signature.asc
Description: This is a digitally signed message part
-- This message was scanned for spam and viruses by BitDefender. For more information please visit http://www.bitdefender.com/