Failed sending V3 traps with auth using snmpNotifyTable
"Makavy, Erez (Erez)" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <AAB4B3D3CF0F454F98272CBE187FDE2F0C2102DB@is0004avexu1.global.avaya.com> |
Hi,
Background
----------------
I'm using the snmpTargetMIB and snmpNotificationMIB to send out traps.
net-snmp-5.3.1, on Linux, PPC.
Problem:
--------------
When I define a trap manager assigned with a local-user (user which has
the engine id of the local agent, not the engine id of the management
station),
I can not send out notifications with authentication (without
authentication works fine).
Analysis:
--------------
1) When I define the trap-managers associated user as a user with the
remote engine ID , it works fine.
2) looging at the tcpdump & logs I see that an engineID probe is sent
(to discover the trap-manager's engine ID)
As far as I know when sending out v3 notification (which do not need
acknowlegment) the authorative engine should be the sending agent's.
So there is no need to know the trap-manager's engineID.
3) Looking at the logs It seems like the AuthoritativeEngineID is the
trap-manager's and not the sending agent's (local agent).
which probably creates a problem because the user's engineID is the
local agent's.
Solution:
------------
I think in this case:
1) we should change the authoritative engine to the be the agent's,
2) we don't need a probe (though it wouldn't really hurt).
Could you point me to the propper place in the code to fix it.
Thanks,
Erez.
snmpd logging:
-------------------------
callback: calling a callback for maj=1 min=6
trace: send_notifications(): notification/snmpNotifyTable.c, 210:
send_notifications: starting: pdu=10096648, vars=0
trace: get_target_sessions(): target/target.c, 58:
target_sessions: looking for: inform
trace: get_target_sessions(): target/target.c, 62:
target_sessions: for: 0=inform
trace: get_target_sessions(): target/target.c, 58:
target_sessions: looking for: trap
trace: get_target_sessions(): target/target.c, 62:
target_sessions: for: 0=trap
trace: get_target_sessions(): target/target.c, 101:
target_sessions: found one: trap
trace: send_notifications(): notification/snmpNotifyTable.c, 256:
send_notifications: sent 0 notifications
trace: snmp_call_callbacks(): callback.c, 330:
callback: END calling callbacks for maj=1 min=6 (1 called)
trace: _callback_unlock(): callback.c, 150:
9:callback:lock: unlocked (APP,null)
trace: _callback_lock(): callback.c, 118:
9:callback:lock: locked (APP,null)
trace: snmp_call_callbacks(): callback.c, 304:
callback: START calling callbacks for maj=1 min=7
trace: snmp_call_callbacks(): callback.c, 318:
callback: calling a callback for maj=1 min=7
trace: send_notifications(): notification/snmpNotifyTable.c, 210:
send_notifications: starting: pdu=10096710, vars=100998a8
trace: get_target_sessions(): target/target.c, 58:
target_sessions: looking for: inform
trace: get_target_sessions(): target/target.c, 62:
target_sessions: for: 0=inform
trace: get_target_sessions(): target/target.c, 58:
target_sessions: looking for: trap
trace: get_target_sessions(): target/target.c, 62:
target_sessions: for: 0=trap
trace: get_target_sessions(): target/target.c, 101:
target_sessions: found one: trap
trace: _checkFilter(): notification/snmpNotifyTable.c, 110:
send_notifications: checking filters...
trace: header_complex_generate_oid(): header_complex.c, 239:
header_complex_generate_oid: generated:
.56.55.52.48.54.54.56.56.116.117.115.101.114.49
trace: _checkFilter(): notification/snmpNotifyTable.c, 125:
send_notifications: no matching profile
trace: send_trap_to_sess(): agent_trap.c, 863:
trap: sending trap type=167, version=3
trace: snmpv3_build(): snmp_api.c, 2241:
snmp_build: Building SNMPv3 message (secName:"user1",
secLevel:authNoPriv)...
trace: snmpv3_build(): snmp_api.c, 2243:
dumph_send: SNMPv3 Message
trace: snmpv3_packet_realloc_rbuild(): snmp_api.c, 2590:
dumph_send: TRAP2
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3356:
snmp_pdu_realloc_rbuild: starting
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3371:
dumph_send: VarBind
trace: snmp_realloc_rbuild_var_op(): snmp.c, 341:
dumph_send: Value
dumpx_send: 06 0A 2B 06 01 04 01 BF 08 03 02 0A
dumpv_send: ObjID: iso.3.6.1.4.1.8072.3.2.10
trace: snmp_realloc_rbuild_var_op(): snmp.c, 442:
dumph_send: Name
dumpx_send: 06 0A 2B 06 01 06 03 01 01 04 03 00
dumpv_send: ObjID: iso.3.6.1.6.3.1.1.4.3.0
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3371:
dumph_send: VarBind
trace: snmp_realloc_rbuild_var_op(): snmp.c, 341:
dumph_send: Value
dumpx_send: 06 09 2B 06 01 06 03 01 01 05 05
dumpv_send: ObjID: iso.3.6.1.6.3.1.1.5.5
trace: snmp_realloc_rbuild_var_op(): snmp.c, 442:
dumph_send: Name
dumpx_send: 06 0A 2B 06 01 06 03 01 01 04 01 00
dumpv_send: ObjID: iso.3.6.1.6.3.1.1.4.1.0
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3371:
dumph_send: VarBind
trace: snmp_realloc_rbuild_var_op(): snmp.c, 341:
dumph_send: Value
dumpx_send: 43 03 01 8C C0
dumpv_send: UInteger: 101568 (0x18CC0)
trace: snmp_realloc_rbuild_var_op(): snmp.c, 442:
dumph_send: Name
dumpx_send: 06 08 2B 06 01 02 01 01 03 00
dumpv_send: ObjID: iso.3.6.1.2.1.1.3.0
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3439:
dumph_send: error index
dumpx_send: 02 01 00
dumpv_send: Integer: 0 (0x00)
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3452:
dumph_send: error status
dumpx_send: 02 01 00
dumpv_send: Integer: 0 (0x00)
trace: snmp_pdu_realloc_rbuild(): snmp_api.c, 3465:
dumph_send: request_id
dumpx_send: 02 04 1E BF 3C 67
dumpv_send: Integer: 515849319 (0x1EBF3C67)
trace: snmpv3_packet_realloc_rbuild(): snmp_api.c, 2608:
dumph_send: ScopedPdu
trace: snmpv3_scopedPDU_header_realloc_rbuild(): snmp_api.c, 2536:
dumph_send: contextName
dumpx_send: 04 00
dumpv_send: String: [NULL]
trace: snmpv3_scopedPDU_header_realloc_rbuild(): snmp_api.c, 2550:
dumph_send: contextEngineID
[EREZ - this is the engineID of the management station, not the sending
agent]
dumpx_send: 04 09 80 00 05 23 01 87 40 66 88
dumpv_send: String: ...#..@f <mailto:...#..@f> .
trace: snmpv3_header_realloc_rbuild(): snmp_api.c, 2407:
dumph_send: msgSecurityModel
dumpx_send: 02 01 03
dumpv_send: Integer: 3 (0x03)
trace: snmpv3_header_realloc_rbuild(): snmp_api.c, 2421:
dumph_send: msgFlags
dumpx_send: 04 01 01
dumpv_send: String: .
trace: snmpv3_header_realloc_rbuild(): snmp_api.c, 2435:
dumph_send: msgMaxSize
dumpx_send: 02 03 00 FF E3
dumpv_send: Integer: 65507 (0xFFE3)
trace: snmpv3_header_realloc_rbuild(): snmp_api.c, 2448:
dumph_send: msgID
dumpx_send: 02 04 50 18 E1 EB
dumpv_send: Integer: 1343807979 (0x5018E1EB)
trace: snmpv3_header_realloc_rbuild(): snmp_api.c, 2472:
dumph_send: SNMP Version Number
dumpx_send: 02 01 03
dumpv_send: Integer: 3 (0x03)
trace: snmpv3_packet_realloc_rbuild(): snmp_api.c, 2636:
dumph_send: SM msgSecurityParameters
trace: usm_rgenerate_out_msg(): snmpusm.c, 1385:
usm: USM processing has begun (offset 99)
trace: usm_get_user(): snmpusm.c, 3015:
usm: getting user user1
trace: usm_get_user_from_list(): snmpusm.c, 3031:
usm: match on user user1
trace: sc_hash(): scapi.c, 416:
trace: sc_get_properlength(): scapi.c, 117:
trace: get_enginetime(): lcd_time.c, 154:
lcd_get_enginetime: engineID 80 00 05 23 01 87 40 66 88 : boots=0,
time=1015
trace: usm_rgenerate_out_msg(): snmpusm.c, 1607:
dumph_send: msgPrivacyParameters
dumpx_send: 04 00
dumpv_send: String: [NULL]
trace: usm_rgenerate_out_msg(): snmpusm.c, 1623:
dumph_send: msgAuthenticationParameters
dumpx_send: 04 0C 00 00 00 00 00 00 00 00 00 00 00 00
dumpv_send: String: ............
trace: usm_rgenerate_out_msg(): snmpusm.c, 1655:
dumph_send: msgUserName
dumpx_send: 04 05 75 73 65 72 31
dumpv_send: String: user1
trace: usm_rgenerate_out_msg(): snmpusm.c, 1670:
dumph_send: msgAuthoritativeEngineTime
dumpx_send: 02 02 03 F7
dumpv_send: Integer: 1015 (0x3F7)
trace: usm_rgenerate_out_msg(): snmpusm.c, 1686:
dumph_send: msgAuthoritativeEngineBoots
dumpx_send: 02 01 00
dumpv_send: Integer: 0 (0x00)
trace: usm_rgenerate_out_msg(): snmpusm.c, 1699:
[EREZ - seems like the authoritative engineID is the manager's and not
the agent's]
dumph_send: msgAuthoritativeEngineID
dumpx_send: 04 09 80 00 05 23 01 87 40 66 88
dumpv_send: String: ...#..@f <mailto:...#..@f> .
trace: sc_generate_keyed_hash(): scapi.c, 278:
trace: usm_rgenerate_out_msg(): snmpusm.c, 1788:
usm: Signing failed.
trace: _sess_async_send(): snmp_api.c, 4856:
sess_async_send: encoding failure
snmpd: send_trap: USM authentication failure (incorrect password or key)
trace: send_notifications(): notification/snmpNotifyTable.c, 256:
send_notifications: sent 1 notifications
Erez Makavy
Software Engineer
AVAYA Communication, ITC
Mail : <mailto:[email protected] <mailto:[email protected]> >
Tel:+972-3-6457562
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users