Re: Is it possible to set the L3 source interface IP address in atrap packet? - SNMP

This is a discussion on Re: Is it possible to set the L3 source interface IP address in atrap packet? - SNMP ; Zhouhuai Shen wrote: > Hi Jan, > > Thanks a lot for the patch. It fixed the agent address inside the UDP > payload. > > The '[snmp] clientaddr 192.168.1.1' in my snmpd.conf doesn't fix > the IP address in ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Is it possible to set the L3 source interface IP address in atrap packet?

  1. Re: Is it possible to set the L3 source interface IP address in atrap packet?

    Zhouhuai Shen wrote:
    > Hi Jan,
    >
    > Thanks a lot for the patch. It fixed the agent address inside the UDP
    > payload.
    >
    > The '[snmp] clientaddr 192.168.1.1' in my snmpd.conf doesn't fix
    > the IP address in the UDP packet in my case. For example, the
    > outgoing interface IP for the trap is 172.16.1.1, but I expect the ip
    > address in the UDP packet of the trap to be 192.168.1.1. Even if I
    > configured with '[snmp] clientaddr 192.168.1.1', I can see that the
    > source IP is still 172.16.1.1. I wonder it might be the snmp.conf file
    > is not defined.
    >
    > Is there a easy way to get around with this?

    There was bug, which caused snmpd to ignore the clientaddr option in the
    config file, but this should be already fixed by patch #1775124 - please
    try latest version of net-snmp, i.e. net-snmp-5.4.2.rc1. You snmpd.conf
    looks OK, snmp.conf is not necessary.

    Jan



    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


  2. Re: Is it possible to set the L3 source interface IP address in atrap packet?

    2008/9/2 Zhouhuai Shen :
    > I wonder if both the 'v1trapaddress' and 'clientaddr' could be binded into
    > one, such as 'trapsrcaddr HOST' in the future release. As they are basically
    > doing the same job.


    But they are *not* doing the same job.

    'clientaddr' is a general-purpose directive, which can be used
    by any Net-SNMP application, to set the IP address used for
    actually sending an SNMP request (GET, SET, TRAP, etc)

    'v1trapaddress' is a very specific directive, used only by the agent,
    to set an internal field within the trap request.

    It might be sensible for the agent to use the 'clientaddr' value by
    default (i.e. if it hasn't been given a 'v1trapaddress' value to use).
    That's certainly something we've talked about.

    But it would not be right to merge these two directives into one.

    Dave

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-coders mailing list
    Net-snmp-coders@lists.sourceforge.net
    https://lists.sourceforge.net/lists/...et-snmp-coders


+ Reply to Thread