Click here to get back home

Net::SNMP snmpv3 inform issues

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Net::SNMP snmpv3 inform issues Tanner Loa 05-17-2005
Posted by Tanner Loa on May 17, 2005, 10:18 am
Please log in for more thread options


OK - I've done my due dillegence and still can't figure this one out..
any help would be greatly appreceated.

I'm trying to write a perl script that will deliver an SNMPv3 INFORM to
a Net-SNMP server.

I can do it with snmpinform no problem:

_____________
[Client Side:]
# snmpinform -v 3 -u myuser -a MD5 -A mypassword -l authNoPriv
172.30.0.2 42 coldStart.0
Mon May 16 12:23:51
#
_____________

[Server Side]
May 16 12:14:09 snmpdserver snmptrapd[32046]: snmpdserver.localhost
[172.30.0.115]: Trap , SNMPv2-MIB::sysUpTime.0 = Timeticks: (42)
0:00:00.42, SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::coldStart.0
_____________


But everytime I try it with Net::SNMP I get the following (in debug=1
mode):


_____________
root@simian:/usr/local/sentarus/sbin# ./test3
error: [2416] Net::SNMP::__ANON__(): Received
usmStatsUnknownEngineIDs.0 Report-PDU with value 6 during discovery
error: [2498] Net::SNMP::__ANON__(): Received
usmStatsNotInTimeWindows.0 Report-PDU with value 3 during
synchronization
debug: [2533] Net::SNMP::_discovery_synchronization_cb(): discovery and
synchronization complete
Connected!
error: [2287] Net::SNMP::__ANON__(): No response from remote host
'172.30.0.2'
SNMP ERROR: No response from remote host '172.30.0.2'
_____________


The snippets of code used are:



_____________

#SNMPv3

my $error;
($session,$error) = Net::SNMP->session(
-hostname => $host,
-timeout => 3,
-version => 3,
-retries => 0,
-debug => 1,
-username => $args,
-authpassword => $args,
);
print STDERR "Connected!\n";

if ($error){
print "SNMP ERROR: $error\n";
die ("SNMP Error: $error");
}

unshift (@binded,$timeticks, TIMETICKS, "1");
unshift (@binded,$objectid, OBJECT_IDENTIFIER, $oid);

my $result;
unless ($result = $session->inform_request(
-varbindlist => \@binded,
)){
print "SNMP ERROR: ";
print $session->error();
print "\n\n";
exit;
}
_____________



Any guidence would be very much appreciated as I have no clue what to
try from here!

Thanks,

//Tanner

p.s. some more info:
-Tried 3 different snmp servers (same net-snmp but on 3 machines) with
the same results
-Using Net::SNMP version 5.1
-Using Debian Linux
-snmpinform: UCD-snmp version: 4.2.3
-perl v5.8.1



Similar ThreadsPosted
NET::SNMP December 14, 2004, 12:32 am
NET::SNMP December 14, 2004, 12:36 am
NET::SNMP December 14, 2004, 12:39 am
net::snmp November 5, 2006, 6:30 am
SNMP Set Request July 26, 2004, 8:42 pm
Looking for SNMP-5.1.1/NetSNMP-5.1.1 April 29, 2005, 3:48 pm
SNMP::Util April 6, 2006, 10:32 am
Help with SNMP get_request April 21, 2006, 3:49 pm
Net::SNMP module June 2, 2006, 10:29 am
please helpme: Net-SNMP-5.2.0 module August 29, 2006, 11:47 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap