Re: [tkined] Listening for traps on Solaris

From: Juergen Schoenwaelder (
Date: Thu Jan 13 2000 - 09:33:48 MET

>>>>> Indranil Adak writes:

Indranil> You are right Stuart. There is going to be a problem if your
Indranil> box needs other SNMP managers to be running. Actually, any
Indranil> trap daemon listening at port 162 should not be application
Indranil> specific, rather it has to function as a postmaster for
Indranil> traps. The trap PDU s are specific to different applications
Indranil> (may not be true always), therefore, different applications
Indranil> should register themselves to the trap daemon with an
Indranil> information that what kind of traps they are looking
Indranil> for. That is, different applications register themselves to
Indranil> this trap daemon specifying the trap OID (a pattern would
Indranil> do). The trap daemon running at port 162, will then filter
Indranil> out the received traps and send them to the interested
Indranil> application. The bottomline is that, if more than one
Indranil> application registers for the same kind of trap, both of
Indranil> them receive the same traps. The model may look like as ...

What we need is a very generic and simple udp forwarder which simply
forwards everything it receives on one port (e.g. 162) to several
other ports. The only problem with this scheme is that you loose the
IP address and port of the original sender. So a more intelligent
forwarder might actually understand SNMP PDUs and encoded this
information at the end of the trap/inform varbind. Of course, this is
less trivial to do since you have to decode most of the varbind and
reassemble the PDU.

Another option is to make sure that the trap/inform socket (162) with
SO_REUSEADDR. This allows on some systems to bind multiple programs to
the same socket and the kernel takes care that everybody receives the
messages. Unfortunately, this only works on a small number of OSs.


Juergen Schoenwaelder      Technical University Braunschweig
<>  Dept. Operating Systems & Computer Networks
Phone: +49 531 391 3289    Bueltenweg 74/75, 38106 Braunschweig, Germany
Fax:   +49 531 391 5936    <URL:>

-- !! This message is brought to you via the `tkined & scotty' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to <>. !! See for more information.

This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:27:31 MET