in reply to net::snmp module sendtrap but change originating node name

The -agentaddr      => $ipaddress, seems to be designed for exactly the purpose you are using it for.

Please try that and post your results. The alternative is ugly - create a seperate $session object for each agent you are proxying for.

     "There are only two truly infinite things. The universe and stupidity, and I'm not too sure about the universe"- Albert Einstein

  • Comment on Re: net::snmp module sendtrap but change originating node name

Replies are listed 'Best First'.
Re^2: net::snmp module sendtrap but change originating node name
by bengmau (Beadle) on Jun 28, 2005 at 14:14 UTC
    yea.. my concern with the documentation for
    -agentaddr => $ipaddress
    is that the notation must be in IP dot notation and I can't just throw a hostname which I could with the -localaddr however yes you are right.. I don't want to keep creating new sessions..
Re^2: net::snmp module sendtrap but change originating node name
by bengmau (Beadle) on Jun 29, 2005 at 16:03 UTC
    neither solution works well if I try to put a nodename in either localaddr or agentaddr no trap is generated. localaddr actually tries to resolve an IP from the hostname and appears that agentaddr requires an IP not hostname as per the documentation.. so I can't fake the source hostname with virtual node name. anyone have a solution for this?