Thanks Dave for the response. snmptrap is sending inform message but is not getting inform response back. I enabled debug with -d and here is the exchange. If I entered just ".1.3.6.1.6.3.1.1.5.4.", I got an usage error: The t->local etc are output from snmptrap. It is sending INFORM(A6) but getting REPORT(A8) back:
" $ snmptrap -d -Ci -v 3 -e 80001F88807AB9545CF73FBE4B -l noauth -u inter localhost 0 .1.3.6.1.6.3.1.1.5.4.0 t->local = t->remote = sock = 3 flags = 0x0 local_addr: 0.0.0.0 0.0.0.0 162 Sending 137 bytes to UDP: [127.0.0.1]:162->[0.0.0.0] 0000: 30 81 86 02 01 03 30 11 02 04 0E 87 D1 92 02 03 0.....0......... 0016: 00 FF E3 04 01 04 02 01 03 04 22 30 20 04 0D 80 .........."0 ... 0032: 00 1F 88 80 7A B9 54 5C F7 3F BE 4B 02 01 00 02 ....z.T\.?.K.... 0048: 01 00 04 05 69 6E 74 65 72 04 00 04 00 30 4A 04 ....inter....0J. 0064: 0D 80 00 1F 88 80 7A B9 54 5C F7 3F BE 4B 04 00 ......z.T\.?.K.. 0080: A6 37 02 04 5E CC 46 D4 02 01 00 02 01 00 30 29 .7..^.F.......0) 0096: 30 0D 06 08 2B 06 01 02 01 01 03 00 43 01 00 30 0...+.......C..0 0112: 18 06 0A 2B 06 01 06 03 01 01 04 01 00 06 0A 2B ...+...........+ 0128: 06 01 06 03 01 01 05 04 00 ......... Received 113 bytes from UDP: [127.0.0.1]:162->[0.0.0.0] 0000: 30 6F 02 01 03 30 11 02 04 0E 87 D1 92 02 03 00 0o...0.......... 0016: FF E3 04 01 00 02 01 03 04 23 30 21 04 0D 80 00 .........#0!.... 0032: 1F 88 80 C0 83 74 3C 5C 98 BE 4B 02 01 01 02 02 .....t<\..K..... 0048: 36 FE 04 05 69 6E 74 65 72 04 00 04 00 30 32 04 6...inter....02. 0064: 0D 80 00 1F 88 80 C0 83 74 3C 5C 98 BE 4B 04 00 ........t<\..K.. 0080: A8 1F 02 04 5E CC 46 D4 02 01 00 02 01 00 30 11 ....^.F.......0. 0096: 30 0F 06 0A 2B 06 01 06 03 0F 01 01 04 00 41 01 0...+.........A. 0112: 12 . Resending 137 bytes to UDP: [127.0.0.1]:162->[0.0.0.0] 0000: 30 81 86 02 01 03 30 11 02 04 0E 87 D1 93 02 03 0.....0......... 0016: 00 FF E3 04 01 04 02 01 03 04 22 30 20 04 0D 80 .........."0 ... 0032: 00 1F 88 80 7A B9 54 5C F7 3F BE 4B 02 01 00 02 ....z.T\.?.K.... 0048: 01 00 04 05 69 6E 74 65 72 04 00 04 00 30 4A 04 ....inter....0J. 0064: 0D 80 00 1F 88 80 7A B9 54 5C F7 3F BE 4B 04 00 ......z.T\.?.K.. 0080: A6 37 02 04 5E CC 46 D4 02 01 00 02 01 00 30 29 .7..^.F.......0) 0096: 30 0D 06 08 2B 06 01 02 01 01 03 00 43 01 00 30 0...+.......C..0 0112: 18 06 0A 2B 06 01 06 03 01 01 04 01 00 06 0A 2B ...+...........+ 0128: 06 01 06 03 01 01 05 04 00 ......... Received 113 bytes from UDP: [127.0.0.1]:162->[0.0.0.0] 0000: 30 6F 02 01 03 30 11 02 04 0E 87 D1 93 02 03 00 0o...0.......... 0016: FF E3 04 01 00 02 01 03 04 23 30 21 04 0D 80 00 .........#0!.... 0032: 1F 88 80 C0 83 74 3C 5C 98 BE 4B 02 01 01 02 02 .....t<\..K..... 0048: 36 FF 04 05 69 6E 74 65 72 04 00 04 00 30 32 04 6...inter....02. 0064: 0D 80 00 1F 88 80 C0 83 74 3C 5C 98 BE 4B 04 00 ........t<\..K.. 0080: A8 1F 02 04 5E CC 46 D4 02 01 00 02 01 00 30 11 ....^.F.......0. 0096: 30 0F 06 0A 2B 06 01 06 03 0F 01 01 04 00 41 01 0...+.........A. 0112: 13 . ......................... " The snmptrapd gets the informRequest and dumps this out: " snmp_parse: Parsed SNMPv3 message (secName:inter, secLevel:noAuthNoPriv): USM unknown security name (no such user exists) snmp_parse: Parsed SNMPv3 message (secName:inter, secLevel:noAuthNoPriv): USM unknown security name (no such user exists) snmp_parse: Parsed SNMPv3 message (secName:inter, secLevel:noAuthNoPriv): USM unknown security name (no such user exists) " Following is my trapd config file: " # snmptrapd.conf doNotRetainNotificationLogs yes #authCommunity log,execute,net public authCommunity log,execute public authUser log,execute inter createUser -e 0x80001f888085b94c4882d8bc4b inter traphandle .1.3.6.1.6.3.1.1.5.3 log " Thanks in advance, Fatima On Fri, Apr 9, 2010 at 2:56 AM, Dave Shield <d.t.shi...@liverpool.ac.uk> wrote: > On 9 April 2010 03:16, Fatima Peter <fatima.pe...@gmail.com> wrote: >> I sent an inform message to the trap-server with the following command: >> >> $ sudo snmptrap .... > > Why "sudo"? > Sending an SNMP request does not require special privileges, > so there seems no reason to run this as root. > >> ....-Ci -v 3 -e 0x80001f888085b94c4882d8bc4b -l noauth -u inter localhost > > OK so far. > >> .... 0 linkUp.0 > > Why "linkUp.0" ? > The OID of the notification is simply "linkUp" - .1.3.6.1.6.3.1.1.5.4 > > Don't get confused between notifications and scalar objects. > > (Strictly speaking, the linkUp trap also needs several payload varbinds, > but it's sensible to get the basic request working first) > > >> t->local = >> t->remote = >> sock = 3 flags = 0x0 >> local_addr: 0.0.0.0 0.0.0.0 162 > > What are these? > I assume they're not specified on the command line, > so presumably this is output from the snmptrap command. > > They look like debug statements, but I'm unclear where they are coming > from. You don't seem to be turning on any debugging.... > > >> snmpinform: Timeout (Sub-id not found: (top) -> linkUp) >> >> Since snmptrap did not complain.... > > Err.... what do you think the line immediately above is? > It's the "snmptrap -Ci" command (i.e. "snmpinform"), complaining > that it doesn't recognise the trap OID that you have asked for. > > >> .... it did send the message out and did not get response from snmptrapd. > > My guess is that the trap was *not* sent (because of the error above), > and this is why it wasn't received by snmptrapd, not any acknowledgement > received. > > If you want to check whether the request is sent or not (rather than guessing) > use the '-d' flag. This works for both "snmptrap" (was the request sent?) > and "snmptrapd" (was it received?) > > To specify the trap OID robustly, use the MIB name as well > i.e. > IF-MIB::linkUp > > Dave > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders