Posted on 2009-01-22 07:38:08-08 by buschti
Howto Disable DNS Lookup for Net::SNMP->Session
Hello, I use Net::SNMP to send a SNMP-Trap in a corporate Network. By using
my ($session, $error) = Net::SNMP->session( -hostname => configuration->getWDConfigValue(constants->HOST_IP_ADDRESS), -community => configuration->getCommunity(), -port => configuration->getWDConfigValue(constants->SNMP_PORT), -domain => 'udp' );
Where hostname is a IP-Adress (10.1.10.162)
I get the error: Unable to resolve UDP/IPv4 address '"10.1.10.162"'
There is no real DNS in this network. An nslookup fails also.
I think that during creation of the session a DNS Lookup is done. Is there a possibility to disable this lookup?
any answers are kindly appreciated
kind regards
Timo
Direct Responses: 9784 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.