I have a problem doing a get_bulk_request in a perl where its to not fully incrementing the last part of the OID. I suspect this is Arris not doing somethign properly but was wondering if anyone has encountered a similar situation and if they had any solutions to work around? Running the snmpbulkget from the command line returns all the OIDs properly and it what I’m hoping to accomplish in my perl script.
use Net::SNMP; use Net::SNMP::Util; my @testoid = ( '1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2' ); my ($snmp, $error) = Net::SNMP->session( -hostname => "$host", -community => "$Community", -timeout => 60, -nonblocking => 1, -debug => 0, -maxmsgsize => 65535, -version => 'snmpv2c' ); if (!defined $snmp) { print STDERR "ERROR: %s.\n", $error; exit 1; } my $ret = $snmp->get_bulk_request( -callback => [\& table_cb, {}], -maxrepetitions => 10, -varbindlist => [@testoid] ); sub table_cb { my $everything = shift; print Dumper($everything); }
Print Dumper $everything Returns the following and doesn’t jump from .10008 to .10101 so I’m missing arrisRouterWPAPreSharedKey.10101 and arrisRouterWPAPreSharedKey.10102
'1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2.10001' => 'TopSecret', '1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2.10002' => 'BPP8EX50', '1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2.10003' => 'BPP8EX50', '1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2.10004' => 'BPP8EX50', '1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2.10005' => 'BPP8EX50', '1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2.10006’ => 'BPP8EX50', '1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2.10007' => 'BPP8EX50', '1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2.10008’ => 'BPP8EX50',
Running snmpbulkget from the command line off the same box, I return all the OIDs I’m looking for.
snmpbulkget -v2c -mall -cpublic x.x.x.x 1.3.6.1.4.1.4115.1.20.1.1.3.26.1.2
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10001 = STRING: "TopSecret"
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10002 = STRING: "BPP8EX50"
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10003 = STRING: "BPP8EX50"
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10004 = STRING: "BPP8EX50"
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10005 = STRING: "BPP8EX50"
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10006 = STRING: "BPP8EX50"
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10007 = STRING: "BPP8EX50"
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10008 = STRING: "BPP8EX50"
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10101 = STRING: "SuperTopSecret"
ARRIS-ROUTER-DEVICE-MIB::arrisRouterWPAPreSharedKey.10102 = STRING: "BPP8EX50"
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |