What we've ended up doing is changing get_myaddr() in snmplib/system.c which
works; the primary IP address (the address returned by gethostbyname) is
sent in the SNMP pdu.  [Rob, I've sent you the changed system.c]

The existing code was clearly incomplete, per the comment:

/* XXX  What if we have multiple addresses?  Or no addresses for that
matter?
 * XXX  Could it be computed once then cached?  Probably not worth it (not
 *                                                           used very
often).
 */

While the new get_myaddr() works, I don't know for sure if it's correct/safe
for all platforms.  It would be best if someone involved in net-snmp
development could have a look, so we can get a robust fix incorporated in
the development source base.

Russell Bell



-----Original Message-----
From: Robert Story [mailto:[EMAIL PROTECTED]
Sent: Saturday, 13 August 2005 9:21 AM
To: Russell Bell
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: how to specify source IP address / interface when sending
traps (with Solaris IP multipathing )


On Tue, 9 Aug 2005 18:04:06 +1000 Russell wrote:
RB> The problem that we are facing is that we are running in a Solaris IP
RB> multipathing network configuration, eri0 and qfe0 being the physical
RB> interfaces, and qfe0:1 being the floating IP address.   The traps being
RB> sent by snmpd are arriving at the trap recipient host with the source IP
RB> address of the eri0 interface (192.168.101.19).
RB>
RB> The 3rd party software requires that incoming traps have a source IP
RB> address that matches the floating IP address (interface qfe0:1) of the
RB> trap sender.
RB>
RB> How can we configure NetSNMP to use the floating IP address as the
source
RB> address when sending traps ?
RB>
RB> We have tried setting "clientaddr" and starting the snmpd process as
RB> "/usr/local/sbin/snmpd udp:203.52.xx.yyy", without success.

Well, those were going to be my two suggestions. The OS selects the IP
address, so you might have to dig into the kernel docs to find out how to
specify the correct source address, so that the code for clientaddr can be
updated.

Just to check, where and how did you specify clientaddr?

--
NOTE: messages sent directly to me, instead of the lists, will be deleted
      unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>

You are lost in a twisty maze of little standards, all different.



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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

Reply via email to