Hi all,

I am trying to configure my computer (an Ubuntu Computer with net-snmp
version 5.4) to send traps whenever the network interface is switched
and/or off and when it is connected and disconnected. 

Until now, I have not managed to reveice this traps in v3, although I'm
receiving them in v2. 

Follwing, I will attach my configuration file, as well as the log of the
snmptrap.

snmpd.conf
-------------------%<---------------------------------------------------
rwcommunity usmuser 

# SECTION: SNMPv3 User Creation
#       This section creates a user for SNMPv3

engineID 0x80001F880430313032303330343035
engineIDType 1
engineIDNic lo
engineIDNic eth0

createUser -e 0x80001F880430313032303330343035 usmuser MD5 md5passwd DES
despasswd

access usmuser   ""      any       priv    exact  all    all   all

group usmuser usm public

access usmuser "" any noauth exact all all all

###########################################################################
# SECTION: Trap Destinations
#
#   Here we define who the agent will send traps to.


trap2sink  localhost  

trapsess -e 0x80001F880430313032303330343035 -Ci -v3 -l authPriv -u
usmuser -a MD5 -A md5passwd -x DES -X despasswd 192.168.175.247  
trapsess -e 0102030405 -v3 -l authPriv -u usmuser -a MD5 -A md5passwd -x
DES -X despasswd 192.168.175.247

# trapcommunity: Default trap sink community to use

trapcommunity  usmuser

# authtrapenable: Should we send traps when authentication failures 
# occur
authtrapenable  2

iquerySecName usmuser
agentSecName usmuser
rouser usmuser
rwuser usmuser

monitor -S -u v -r 3 -e linkUpTrap "Generate linkUp" ifOperStatus != 2
monitor -S -u usmuser -r 3 -e linkDownTrap "Generate linkDown"
ifOperStatus == 2

NotificationEvent linkUpTrap IF-MIB::linkUp ifIndex ifAdminStatus
ifOperStatus
NotificationEvent linkDownTrap IF-MIB::linkDown ifIndex ifAdminStatus
ifOperStatus

-----------------------%<---------------------------------------------

snmptrapd.conf
-------------------------%<-------------------------------------------

createUser -e 0x80001F880430313032303330343035 usmuser MD5 md5passwd DES
despasswd

#authcommunity  log,execute,net   public

com2sec usmuser default usmuser

access usmuser   ""      any       noauth    exact  all    all   all

authuser log,execute,net usmuser priv
authuser log,execute,net usmuser auth

trapcommunity usmuser


--------------------------%<-------------------------------------------

snmptrapd -f -Lo -D -M

-------------------------%<-------------------------------------------

trace: snmp_sess_select_info(): snmp_api.c, 5875:
sess_select: for all sessions: 7 5 3 
sess_select: next alarm 4.992482 sec
verbose:sess_select: timer due in 4.992482 sec
verbose:sess_select: setting timer to 4.992482 sec, clear block (was 0)
trace: netsnmp_udp_recvfrom(): snmpUDPDomain.c, 144:
netsnmp_udp: got source addr: 127.0.0.1
trace: netsnmp_udp_recvfrom(): snmpUDPDomain.c, 149:
netsnmp_udp: got destination (local) addr 127.0.0.1
trace: netsnmp_udp_recv(): snmpUDPDomain.c, 227:
netsnmp_udp: recvfrom fd 7 got 149 bytes (from UDP: [127.0.0.1]:32808)
trace: _sess_process_packet(): snmp_api.c, 5125:
sess_process_packet: session 0x80ab110 fd 7 pkt 0x80afe18 length 149
dumpx_recv:02 01 01 
dumpv_recv:  Integer:   1 (0x01)
trace: _snmp_parse(): snmp_api.c, 4127:
snmp_api: Parsing SNMPv2 message...
trace: _snmp_parse(): snmp_api.c, 4137:
dumph_recv: SNMPv2c message

trace: snmp_comstr_parse(): snmp_auth.c, 135:
dumph_recv:   SNMP version
dumpx_recv:    02 01 01 
dumpv_recv:      Integer:       1 (0x01)
trace: snmp_comstr_parse(): snmp_auth.c, 147:
dumph_recv:   community string
dumpx_recv:    04 06 70 75 62 6C 69 63 
dumpv_recv:      String:        public
trace: _snmp_parse(): snmp_api.c, 4183:
dumph_recv:   PDU
trace: snmp_pdu_parse(): snmp_api.c, 4289:
dumpv_recv:     Command TRAP2
trace: snmp_pdu_parse(): snmp_api.c, 4370:
dumph_recv:     request_id
dumpx_recv:      02 04 0A F2 59 ED 
dumpv_recv:        Integer:     183654893 (0xAF259ED)
trace: snmp_pdu_parse(): snmp_api.c, 4381:
dumph_recv:     error status
dumpx_recv:      02 01 00 
dumpv_recv:        Integer:     0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4392:
dumph_recv:     error index
dumpx_recv:      02 01 00 
dumpv_recv:        Integer:     0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4410:
dumph_recv:     VarBindList
trace: snmp_pdu_parse(): snmp_api.c, 4440:
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, 4449:
dumph_recv:         Value
dumpx_recv:          43 02 05 EE 
dumpv_recv:            UInteger:        1518 (0x5EE)
trace: snmp_pdu_parse(): snmp_api.c, 4440:
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, 4449:
dumph_recv:         Value
dumpx_recv:          06 09 2B 06 01 06 03 01 01 05 03 
dumpv_recv:            ObjID: IF-MIB::linkDown
trace: snmp_pdu_parse(): snmp_api.c, 4440:
dumph_recv:       VarBind
trace: snmp_parse_var_op(): snmp.c, 166:
dumph_recv:         Name
dumpx_recv:          06 0A 2B 06 01 02 01 02 02 01 01 02 
dumpv_recv:            ObjID: IF-MIB::ifIndex.2
trace: snmp_pdu_parse(): snmp_api.c, 4449:
dumph_recv:         Value
dumpx_recv:          02 01 02 
dumpv_recv:            Integer: 2 (0x02)
trace: snmp_pdu_parse(): snmp_api.c, 4440:
dumph_recv:       VarBind
trace: snmp_parse_var_op(): snmp.c, 166:
dumph_recv:         Name
dumpx_recv:          06 0A 2B 06 01 02 01 02 02 01 07 02 
dumpv_recv:            ObjID: IF-MIB::ifAdminStatus.2
trace: snmp_pdu_parse(): snmp_api.c, 4449:
dumph_recv:         Value
dumpx_recv:          02 01 01 
dumpv_recv:            Integer: 1 (0x01)
trace: snmp_pdu_parse(): snmp_api.c, 4440:
dumph_recv:       VarBind
trace: snmp_parse_var_op(): snmp.c, 166:
dumph_recv:         Name
dumpx_recv:          06 0A 2B 06 01 02 01 02 02 01 08 02 
dumpv_recv:            ObjID: IF-MIB::ifOperStatus.2
trace: snmp_pdu_parse(): snmp_api.c, 4449:
dumph_recv:         Value
dumpx_recv:          02 01 02 
dumpv_recv:            Integer: 2 (0x02)
trace: snmp_pdu_parse(): snmp_api.c, 4440:
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 03 00 
dumpv_recv:            ObjID: SNMPv2-MIB::snmpTrapEnterprise.0
trace: snmp_pdu_parse(): snmp_api.c, 4449:
dumph_recv:         Value
dumpx_recv:          06 0A 2B 06 01 04 01 BF 08 03 02 0A 
dumpv_recv:            ObjID: NET-SNMP-MIB::netSnmpAgentOIDs.10
trace: snmp_input(): snmptrapd_handlers.c, 1052:
snmptrapd: input: a7
trace: snmp_input(): snmptrapd_handlers.c, 1110:
snmptrapd: Trap OID: IF-MIB::linkDown
trace: snmp_input(): snmptrapd_handlers.c, 1138:
snmptrapd: Running auth trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 164:
snmptrapd:auth: Comparing auth types: result=0, request=0, result=1
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 118:
snmptrapd:auth: Calling VACM for checking phase 0:read
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1287:
mibII/vacm_vars: vacm_in_view: ver=1, community=public
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1240:
netsnmp_udp_getSecName: resolve <"public", 0x0100007f>
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1245:
netsnmp_udp_getSecName: compare <"usmuser", 0x00000000/0x00000000>...
nope
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1385:
mibII/vacm_vars: vacm_in_view: No security name found
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 124:
snmptrapd:auth:   result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 118:
snmptrapd:auth: Calling VACM for checking phase 1:write
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1287:
mibII/vacm_vars: vacm_in_view: ver=1, community=public
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1240:
netsnmp_udp_getSecName: resolve <"public", 0x0100007f>
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1245:
netsnmp_udp_getSecName: compare <"usmuser", 0x00000000/0x00000000>...
nope
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1385:
mibII/vacm_vars: vacm_in_view: No security name found
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 124:
snmptrapd:auth:   result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 118:
snmptrapd:auth: Calling VACM for checking phase 2:notify
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1287:
mibII/vacm_vars: vacm_in_view: ver=1, community=public
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1240:
netsnmp_udp_getSecName: resolve <"public", 0x0100007f>
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1245:
netsnmp_udp_getSecName: compare <"usmuser", 0x00000000/0x00000000>...
nope
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1385:
mibII/vacm_vars: vacm_in_view: No security name found
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 124:
snmptrapd:auth:   result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 118:
snmptrapd:auth: Calling VACM for checking phase 3:log
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1287:
mibII/vacm_vars: vacm_in_view: ver=1, community=public
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1240:
netsnmp_udp_getSecName: resolve <"public", 0x0100007f>
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1245:
netsnmp_udp_getSecName: compare <"usmuser", 0x00000000/0x00000000>...
nope
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1385:
mibII/vacm_vars: vacm_in_view: No security name found
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 124:
snmptrapd:auth:   result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 118:
snmptrapd:auth: Calling VACM for checking phase 4:execute
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1287:
mibII/vacm_vars: vacm_in_view: ver=1, community=public
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1240:
netsnmp_udp_getSecName: resolve <"public", 0x0100007f>
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1245:
netsnmp_udp_getSecName: compare <"usmuser", 0x00000000/0x00000000>...
nope
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1385:
mibII/vacm_vars: vacm_in_view: No security name found
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 124:
snmptrapd:auth:   result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 118:
snmptrapd:auth: Calling VACM for checking phase 5:net
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1287:
mibII/vacm_vars: vacm_in_view: ver=1, community=public
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1240:
netsnmp_udp_getSecName: resolve <"public", 0x0100007f>
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1245:
netsnmp_udp_getSecName: compare <"usmuser", 0x00000000/0x00000000>...
nope
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1385:
mibII/vacm_vars: vacm_in_view: No security name found
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 124:
snmptrapd:auth:   result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 118:
snmptrapd:auth: Calling VACM for checking phase 6:(null)
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1287:
mibII/vacm_vars: vacm_in_view: ver=1, community=public
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1240:
netsnmp_udp_getSecName: resolve <"public", 0x0100007f>
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1245:
netsnmp_udp_getSecName: compare <"usmuser", 0x00000000/0x00000000>...
nope
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1385:
mibII/vacm_vars: vacm_in_view: No security name found
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 124:
snmptrapd:auth:   result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 118:
snmptrapd:auth: Calling VACM for checking phase 7:(null)
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1287:
mibII/vacm_vars: vacm_in_view: ver=1, community=public
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1240:
netsnmp_udp_getSecName: resolve <"public", 0x0100007f>
trace: netsnmp_udp_getSecName(): snmpUDPDomain.c, 1245:
netsnmp_udp_getSecName: compare <"usmuser", 0x00000000/0x00000000>...
nope
trace: vacm_check_view(): mibgroup/mibII/vacm_conf.c, 1385:
mibII/vacm_vars: vacm_in_view: No security name found
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 124:
snmptrapd:auth:   result: not authorized
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 127:
snmptrapd:auth: Final bitmask auth: 0
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 140:
snmptrapd:auth: Dropping unauthorized message
trace: _sess_read(): snmp_api.c, 5449:
sess_read: not reading 5 (fdset 0xbf8b9508 set 0)
trace: _sess_read(): snmp_api.c, 5449:
sess_read: not reading 3 (fdset 0xbf8b9508 set 0)
trace: snmp_sess_select_info(): snmp_api.c, 5875:
sess_select: for all sessions: 7 5 3 
sess_select: next alarm 4.97761 sec
verbose:sess_select: timer due in 4.97761 sec
verbose:sess_select: setting timer to 4.97761 sec, clear block (was 0)


--------------------------%<-------------------------------------------

As it can be extracted from the log, the trap for snmpv2 is correctly
received, but the trap for v3 is not received because there is some
problem when authenticating the Security User Name. 

Do you have any clue about this problem?

Thanks in advance!

Regards,

Ricardo

-- 
--
Ricardo MarĂ­n Vinuesa
GMV SOLUCIONES GLOBALES INTERNET, S.A.

www.gmv.com
www.gmv-sgi.com
SECURE e-SOLUTIONS


______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
 puede contener informacion clasificada por su emisor como confidencial
 en el marco de su Sistema de Gestion de Seguridad de la 
Informacion siendo para uso exclusivo del destinatario, quedando 
prohibida su divulgacion copia o distribucion a terceros sin la 
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje 
 erroneamente, se ruega lo notifique al remitente y proceda a su borrado. 
Gracias por su colaboracion.
______________________
This message including any attachments may contain confidential 
information, according to our Information Security Management System,
 and intended solely for a specific individual to whom they are addressed.
 Any unauthorised copy, disclosure or distribution of this message
 is strictly forbidden. If you have received this transmission in error,
 please notify the sender immediately and delete it.
______________________

-------------------------------------------------------------------------
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-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to