Problem with snmptrap

"Sorrell, Al" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <3899F44EE8372C44926752C5C84C13D3019B33B08A@OMTCP36040.corp.troweprice.net>
Anyone seen anything like this before using snmptrap? I have an app running on
Solaris8 NET-SNMP 5.4.2.1 (I know it's old - that system is going away) which seems to
work correctly, but under Solaris 10/NET-SNMP V5.6.1rc2 it fails. It appears that snmptrap
is using the destination as the source and leaving the destination blank according
to the -d packet dump.

Using NET-SNMP V5.4.2.1 under Solaris 8, this seems to work OK:
$ uname -a
SunOS tcnetops 5.8 Generic_117350-38 sun4u sparc SUNW,Sun-Fire-V440
$ /usr/local/bin/snmptrap -V
NET-SNMP version: 5.4.2.1

trap_dest=172.22.227.66
sourceIP=10.102.16.26
eventId="EvID"
eventDescr="EvDesc"
eventSubject="EvSubj"
/usr/local/bin/snmptrap  -v1 -d -c public $trap_dest 1.3.6.1.4.1.33544.1 $sourceIP 6 1 "" \
        1.3.6.1.4.1.33544.1.1 s "$eventId" \
        1.3.6.1.4.1.33544.1.2 s "$eventDescr" \
        1.3.6.1.4.1.33544.1.3 s "$eventSubject"

Sending 110 bytes to UDP: [0.0.0.0]->[172.22.227.66]:162
0000: 30 6C 02 01  00 04 06 70  75 62 6C 69  63 A4 5F 06    0l.....public¤_.
0016: 09 2B 06 01  04 01 82 86  08 01 40 04  0A 66 10 1A    [email protected]..
0032: 02 01 06 02  01 01 43 04  25 A6 F7 1B  30 40 30 12    ......C.%¦÷.0@0.
0048: 06 0A 2B 06  01 04 01 82  86 08 01 01  04 04 45 76    ..+...........Ev
0064: 49 44 30 14  06 0A 2B 06  01 04 01 82  86 08 01 02    ID0...+.........
0080: 04 06 45 76  44 65 73 63  30 14 06 0A  2B 06 01 04    ..EvDesc0...+...
0096: 01 82 86 08  01 03 04 06  45 76 53 75  62 6A          ........EvSubj


On 172.22.227.66 (running HP OpenView/NNM) the trap is received as expected:
1344974076 2 Tue Aug 14 15:54:36 2012 omt2netops.troweprice.com - Received event .1.3.6.1.4.1.33544.1.0.1 (enterprise:.1.3.6.1.4.1.33544.1 generic:6 specific:1), no format in trapd.conf. 3 args: [1] private.enterprises.33544.1.1 (OctetString): EvID  [2] private.enterprises.33544.1.2 (OctetString): EvDesc  [3] private.enterprises.33544.1.3 (OctetString): EvSubj;1 .1.3.6.1.4.1.33544.1.0.1 0

================================

The same command executed under 5.6.1rc2 on Solaris 10 doesn't seem to work (i.e., no trap is received).
NOTE the difference in the packet dump where it seems to have used the destination as the source!

$ uname -a
SunOS omt2netops 5.10 Generic_142900-02 sun4v sparc SUNW,SPARC-Enterprise-T5120
$ snmptrap -V
NET-SNMP version: 5.6.1.rc2

trap_dest=172.22.227.66
sourceIP=10.102.16.26
eventId="EvID"
eventDescr="EvDesc"
eventSubject="EvSubj"


$ /usr/local/bin/snmptrap  -v1 -d -c public $trap_dest 1.3.6.1.4.1.33544.1 $sourceIP 6 1 "" \
>       1.3.6.1.4.1.33544.1.1 s "$eventId" \
>       1.3.6.1.4.1.33544.1.2 s "$eventDescr" \
>       1.3.6.1.4.1.33544.1.3 s "$eventSubject"

Sending 111 bytes to UDP: [172.22.227.66]:161->[0.0.0.0]:0
0000: 30 6D 02 01  00 04 06 70  75 62 6C 69  63 A4 60 06    0m.....public.`.
0016: 09 2B 06 01  04 01 82 86  08 01 40 04  0A 66 10 1A    [email protected]..
0032: 02 01 06 02  01 01 43 05  00 A2 35 3C  8B 30 40 30    ......C...5<.0@0
0048: 12 06 0A 2B  06 01 04 01  82 86 08 01  01 04 04 45    ...+...........E
0064: 76 49 44 30  14 06 0A 2B  06 01 04 01  82 86 08 01    vID0...+........
0080: 02 04 06 45  76 44 65 73  63 30 14 06  0A 2B 06 01    ...EvDesc0...+..
0096: 04 01 82 86  08 01 03 04  06 45 76 53  75 62 6A       .........EvSubj


_________________________
Almon (Al) Sorrell
Global Business Solutions and Technology Services
Corporate Network Services | Network Engineering Consultant

T. Rowe Price
4515 Painters Mill Road, TE9008
Owings Mills, MD 21117
Phone: (410) 345-3042  Cell:(443) 527-2398 Fax:(410) 345-3135
Email: [email protected]





T. Rowe Price (including T. Rowe Price Group, Inc. and its affiliates) and its associates do not provide legal or tax advice.  Any tax-related discussion contained in this e-mail, including any attachments, is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding any tax penalties or (ii) promoting, marketing, or recommending to any other party any transaction or matter addressed herein.  Please consult your independent legal counsel and/or professional tax advisor regarding any legal or tax issues raised in this e-mail.

The contents of this e-mail and any attachments are intended solely for the use of the named addressee(s) and may contain confidential and/or privileged information. Any unauthorized use, copying, disclosure, or distribution of the contents of this e-mail is strictly prohibited by the sender and may be unlawful. If you are not the intended recipient, please notify the sender immediately and delete this e-mail.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.