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"


In reply to Perl scripted get_bulk_request versus command line snmpbulkget by cubicalmonkey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.