On Jan 14, 2012, at 4:02 AM, Dave Shield <d.t.shi...@liverpool.ac.uk> wrote:

> On 11 January 2012 09:13,  <nitin.cher...@wipro.com> wrote:
>> It is found that NET-SNMP Agent sets the first UP and RUNNING interface IP
>> address as the AgentAddress in the trap message send from the Agent to the
>> SystemManager, instead of the IP address of the actual interface that is
>> connected to the SystemManager.
> 
>   [snip]
> 
>> snmptrapd (NET-SNMP Version:  5.3.1) captures the trap message send from the
>> Agent to the SystemManager using the below command. snmptrapd runs on the
>> monitoring machine, for e.g SystemManager.
> 
> Which version of snmpd are you using?
> If that is also 5.3.1, can you please try with the current version.
> 
> I've a feeling that this behaviour has been addressed sometime in the last
> few years, so you might find a newer version of the agent works better.

No, it still uses get_myaddr(), which really inefficiently discovers the first 
up interface.

There's a really nice trick (open a UDP socket, connect() it, then use 
getsockname() ) to figure out the outgoing address, but I couldn't figure out 
how to fit that in with the transport abstraction -- who says the transport 
even has an IP address?

You can set the address explicitly with the following lines in snmpd.conf:


[snmp] clientaddr x.x.x.x:0
v1trapaddress x.x.x.x

(The second one is obviously only relevant to SNMPv1 traps, but that is also 
the code that uses get_myaddr().)

  Bill

> 
> Dave
> 
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Mar 27 - Feb 2
> Save $400 by Jan. 27
> Register now!
> http://p.sf.net/sfu/rsa-sfdev2dev2
> _______________________________________________
> 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

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
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