Hello,
I am trying to configure snmptrapd to receive SNMP v3 traps with a non-default
context. My snmptrapd.conf is below:
view myView included .1
createUser -e 0x8000000001020304 test SHA "testtest" AES "testtest"
group mygroup usm test
setAccess mygroup mycontext usm priv exact log myView
However, when I tried to send trap using the command below, the trap was
dropped (the output from snmptrapd with -D at the end of this email).
snmptrap -v 3 -u test -x AES -X testtest -a SHA -A testtest -l AuthPriv -e
0x8000000001020304 -n mycontext localhost:162 0 linkUp.0
If I changed the setAccess line in snmptrapd.conf to use the default context
(setAccess mygroup "" usm priv exact log myView) and sent the trap with the
default context (same snmptrap as above, but without the -n option), snmptrapd
was able to receive the trap.
Any ideas what's going on here? Is there anything else that I should configure
to be able to receive traps with non-default context?
Thanks,
Ruth Kurniawati
Output with -D:
trace: _sess_process_packet(): snmp_api.c, 5099:
sess_process_packet: session 0x80029b18 fd 7 pkt 0x8006b980 length 166
dumpx_recv:02 01 03
dumpv_recv: Integer: 3 (0x03)
trace: snmpv3_parse(): snmp_api.c, 3573:
dumph_recv: SNMPv3 Message
trace: snmpv3_parse(): snmp_api.c, 3588:
dumph_recv: SNMP Version Number
dumpx_recv: 02 01 03
dumpv_recv: Integer: 3 (0x03)
trace: snmpv3_parse(): snmp_api.c, 3604:
dumph_recv: msgGlobalData
trace: snmpv3_parse(): snmp_api.c, 3621:
dumph_recv: msgID
dumpx_recv: 02 04 4D C4 78 E4
dumpv_recv: Integer: 1304721636 (0x4DC478E4)
trace: snmpv3_parse(): snmp_api.c, 3653:
dumph_recv: msgMaxSize
dumpx_recv: 02 03 00 FF E3
dumpv_recv: Integer: 65507 (0xFFE3)
trace: snmpv3_parse(): snmp_api.c, 3691:
snmpv3_parse: msgMaxSize 65507 received
trace: snmpv3_parse(): snmp_api.c, 3699:
dumph_recv: msgFlags
dumpx_recv: 04 01 03
dumpv_recv: String: .
trace: snmpv3_parse(): snmp_api.c, 3717:
dumph_recv: msgSecurityModel
dumpx_recv: 02 01 03
dumpv_recv: Integer: 3 (0x03)
trace: snmpv3_parse(): snmp_api.c, 3791:
dumph_recv: SM msgSecurityParameters
trace: usm_process_in_msg(): snmpusm.c, 2303:
usm: USM processing begun...
trace: usm_parse_security_parameters(): snmpusm.c, 1872:
dumph_recv: msgAuthoritativeEngineID
dumpx_recv: 04 08 80 00 00 00 01 02 03 04
dumpv_recv: String: ........
trace: usm_parse_security_parameters(): snmpusm.c, 1895:
dumph_recv: msgAuthoritativeEngineBoots
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: usm_parse_security_parameters(): snmpusm.c, 1919:
dumph_recv: msgAuthoritativeEngineTime
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: usm_parse_security_parameters(): snmpusm.c, 1947:
dumph_recv: msgUserName
dumpx_recv: 04 04 74 65 73 74
dumpv_recv: String: test
trace: usm_parse_security_parameters(): snmpusm.c, 1990:
dumph_recv: msgAuthenticationParameters
dumpx_recv: 04 0C 9F 73 AC 34 D9 51 9F 06 CF AF 7B 54
dumpv_recv: String: .s.4.Q....{T
trace: usm_parse_security_parameters(): snmpusm.c, 2019:
dumph_recv: msgPrivacyParameters
dumpx_recv: 04 08 1D 47 28 52 7B C8 03 99
dumpv_recv: String: .G(R{...
trace: sc_hash(): scapi.c, 415:
trace: sc_get_properlength(): scapi.c, 117:
trace: sc_hash(): scapi.c, 415:
trace: sc_get_properlength(): scapi.c, 117:
trace: set_enginetime(): lcd_time.c, 356:
lcd_set_enginetime: engineID 80 00 00 00 01 02 03 04 : boots=0, time=0
trace: usm_get_user_from_list(): snmpusm.c, 2998:
usm: match on user test
trace: usm_check_secLevel(): snmpusm.c, 2875:
comparex: Comparing: 1 3 SNMP-USER-BASED-SM-MIB::usmNoPrivProtocol
trace: sc_check_keyed_hash(): scapi.c, 539:
trace: sc_generate_keyed_hash(): scapi.c, 278:
trace: sc_get_properlength(): scapi.c, 117:
trace: usm_process_in_msg(): snmpusm.c, 2471:
usm: Verification succeeded.
trace: sc_hash(): scapi.c, 415:
trace: sc_get_properlength(): scapi.c, 117:
trace: get_enginetime_ex(): lcd_time.c, 250:
lcd_get_enginetime_ex: engineID 80 00 00 00 01 02 03 04 : boots=0, time=0
trace: sc_hash(): scapi.c, 415:
trace: sc_get_properlength(): scapi.c, 117:
trace: set_enginetime(): lcd_time.c, 356:
lcd_set_enginetime: engineID 80 00 00 00 01 02 03 04 : boots=0, time=0
trace: sc_decrypt(): scapi.c, 914:
trace: usm_process_in_msg(): snmpusm.c, 2653:
usm: USM processing completed.
trace: snmpv3_parse(): snmp_api.c, 3846:
dumph_recv: ScopedPDU
trace: snmpv3_scopedPDU_parse(): snmp_api.c, 4552:
dumph_recv: contextEngineID
dumpx_recv: 04 11 80 00 1F 88 80 01 19 14 11 E0 BE 43 4A 00
00 00 00
dumpv_recv: String: ...........CJ....
trace: snmpv3_scopedPDU_parse(): snmp_api.c, 4569:
scopedPDU_parse: inconsistent engineID information in message
trace: snmpv3_scopedPDU_parse(): snmp_api.c, 4576:
dumph_recv: contextName
dumpx_recv: 04 09 6D 79 63 6F 6E 74 65 78 74
dumpv_recv: String: mycontext
trace: snmpv3_parse(): snmp_api.c, 3865:
dumph_recv: TRAP2
trace: snmp_pdu_parse(): snmp_api.c, 4263:
dumpv_recv: Command TRAP2
trace: snmp_pdu_parse(): snmp_api.c, 4344:
dumph_recv: request_id
dumpx_recv: 02 04 75 68 23 C8
dumpv_recv: Integer: 1969759176 (0x756823C8)
trace: snmp_pdu_parse(): snmp_api.c, 4355:
dumph_recv: error status
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4366:
dumph_recv: error index
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4384:
dumph_recv: VarBindList
trace: snmp_pdu_parse(): snmp_api.c, 4414:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 166:
dumph_recv: Name
dumpx_recv: 06 08 2B 06 01 02 01 01 03 00
dumpv_recv: ObjID: DISMAN-EVENT-MIB::sysUpTimeInstance
trace: snmp_pdu_parse(): snmp_api.c, 4423:
dumph_recv: Value
dumpx_recv: 43 01 00
dumpv_recv: UInteger: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4414:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 166:
dumph_recv: Name
dumpx_recv: 06 0A 2B 06 01 06 03 01 01 04 01 00
dumpv_recv: ObjID: SNMPv2-MIB::snmpTrapOID.0
trace: snmp_pdu_parse(): snmp_api.c, 4423:
dumph_recv: Value
dumpx_recv: 06 0A 2B 06 01 06 03 01 01 05 04 00
dumpv_recv: ObjID: IF-MIB::linkUp.0
trace: _snmp_parse(): snmp_api.c, 4174:
snmp_parse: Parsed SNMPv3 message (secName:test, secLevel:authPriv):
trace: snmp_input(): snmptrapd_handlers.c, 987:
snmptrapd: input: a7
trace: snmp_input(): snmptrapd_handlers.c, 1045:
snmptrapd: Trap OID: IF-MIB::linkUp.0
trace: snmp_input(): snmptrapd_handlers.c, 1073:
snmptrapd: Running auth trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 153:
snmptrapd:auth: Comparing auth types: result=0, request=0, result=1
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 111:
snmptrapd:auth: Calling VACM for checking phase 0:read
vacm_in_view: ver=3, model=3, secName=test
trace: netsnmp_subtree_find_first(): agent_registry.c, 152:
subtree: looking for subtree for context: "mycontext"
trace: netsnmp_subtree_find_first(): agent_registry.c, 161:
subtree: didn't find a subtree for context: "mycontext"
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1366:
mibII/vacm_vars: vacm_in_view: no such ctxt "mycontext"
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 117:
snmptrapd:auth: result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 111:
snmptrapd:auth: Calling VACM for checking phase 1:write
vacm_in_view: ver=3, model=3, secName=test
trace: netsnmp_subtree_find_first(): agent_registry.c, 152:
subtree: looking for subtree for context: "mycontext"
trace: netsnmp_subtree_find_first(): agent_registry.c, 161:
subtree: didn't find a subtree for context: "mycontext"
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1366:
mibII/vacm_vars: vacm_in_view: no such ctxt "mycontext"
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 117:
snmptrapd:auth: result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 111:
snmptrapd:auth: Calling VACM for checking phase 2:notify
vacm_in_view: ver=3, model=3, secName=test
trace: netsnmp_subtree_find_first(): agent_registry.c, 152:
subtree: looking for subtree for context: "mycontext"
trace: netsnmp_subtree_find_first(): agent_registry.c, 161:
subtree: didn't find a subtree for context: "mycontext"
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1366:
mibII/vacm_vars: vacm_in_view: no such ctxt "mycontext"
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 117:
snmptrapd:auth: result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 111:
snmptrapd:auth: Calling VACM for checking phase 3:log
vacm_in_view: ver=3, model=3, secName=test
trace: netsnmp_subtree_find_first(): agent_registry.c, 152:
subtree: looking for subtree for context: "mycontext"
trace: netsnmp_subtree_find_first(): agent_registry.c, 161:
subtree: didn't find a subtree for context: "mycontext"
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1366:
mibII/vacm_vars: vacm_in_view: no such ctxt "mycontext"
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 117:
snmptrapd:auth: result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 111:
snmptrapd:auth: Calling VACM for checking phase 4:execute
vacm_in_view: ver=3, model=3, secName=test
trace: netsnmp_subtree_find_first(): agent_registry.c, 152:
subtree: looking for subtree for context: "mycontext"
trace: netsnmp_subtree_find_first(): agent_registry.c, 161:
subtree: didn't find a subtree for context: "mycontext"
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1366:
mibII/vacm_vars: vacm_in_view: no such ctxt "mycontext"
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 117:
snmptrapd:auth: result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 111:
snmptrapd:auth: Calling VACM for checking phase 5:net
vacm_in_view: ver=3, model=3, secName=test
trace: netsnmp_subtree_find_first(): agent_registry.c, 152:
subtree: looking for subtree for context: "mycontext"
trace: netsnmp_subtree_find_first(): agent_registry.c, 161:
subtree: didn't find a subtree for context: "mycontext"
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1366:
mibII/vacm_vars: vacm_in_view: no such ctxt "mycontext"
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 117:
snmptrapd:auth: result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 111:
snmptrapd:auth: Calling VACM for checking phase 6:(null)
vacm_in_view: ver=3, model=3, secName=test
trace: netsnmp_subtree_find_first(): agent_registry.c, 152:
subtree: looking for subtree for context: "mycontext"
trace: netsnmp_subtree_find_first(): agent_registry.c, 161:
subtree: didn't find a subtree for context: "mycontext"
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1366:
mibII/vacm_vars: vacm_in_view: no such ctxt "mycontext"
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 117:
snmptrapd:auth: result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 111:
snmptrapd:auth: Calling VACM for checking phase 7:(null)
vacm_in_view: ver=3, model=3, secName=test
trace: netsnmp_subtree_find_first(): agent_registry.c, 152:
subtree: looking for subtree for context: "mycontext"
trace: netsnmp_subtree_find_first(): agent_registry.c, 161:
subtree: didn't find a subtree for context: "mycontext"
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1366:
mibII/vacm_vars: vacm_in_view: no such ctxt "mycontext"
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 117:
snmptrapd:auth: result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 120:
snmptrapd:auth: Final bitmask auth: 0
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 131:
snmptrapd:auth: Dropping unauthorized message
_________________________________________________________________
Windows Liveā¢: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users