Send Netdot-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://osl.uoregon.edu/mailman/listinfo/netdot-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-users digest..."
Today's Topics:
1. bug in SNMP::Info::CiscoStpExtensions (Wim Vandersmissen)
----------------------------------------------------------------------
Message: 1
Date: Sat, 10 Nov 2012 00:54:34 +0100
From: Wim Vandersmissen <[email protected]>
Subject: [Netdot-users] bug in SNMP::Info::CiscoStpExtensions
To: [email protected],
[email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi,
(crosspost to netdot-users (I can't be the only one using c2960's?))
First time user of SNMP::Info (needed because of recent netdot installation)
I think I found a bug in detecting STP on some cisco devices
(c2960/c4900M running 15.x or 12.2(50)+)
Output of running $info->stp_ver() on line 16
SNMP::Info::_global(stp_ver) NOSUCHINSTANCE at s.pl line 16
Seems like that oid doesn't exist anymore.
Quick fix below (works for me)
--Wim
--- snmp/SNMP-Info-2.08/Info/CiscoStpExtensions.pm
+++ /usr/lib/perl5/vendor_perl/5.8.8/SNMP/Info/CiscoStpExtensions.pm
@@ -75,7 +75,7 @@ $VERSION = '2.08';
sub stp_ver {
my $self = shift;
my $stp_ver = $self->SUPER::stp_ver();
- if ( $stp_ver eq 'unknown' ){
+ if ( ( $stp_ver eq 'unknown' ) || !defined($stp_ver)){
if ( defined $self->stpx_stp_type() ){
$stp_ver = $self->stpx_stp_type();
}
Whole test output/script below
---
SNMP::Info::_global layers : sysServices.0
SNMP::Info::_global description : sysDescr.0
SNMP::Info::_global id : sysObjectID.0
SNMP::Info 2.06
SNMP::Info::device_type() layers:00000110 id:9 sysDescr:"Cisco IOS
Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE, RELEASE
SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc. Compiled Sat 28-Jul-12
00:29 by prod_rel_team"
SNMP::Info::specify() - Changed Class to SNMP::Info::Layer3::C6500.
SNMP::Info::_global name : sysName.0
SNMP::Info::_global stp_ver : dot1dStpProtocolSpecification.0
SNMP::Info::_global(stp_ver) NOSUCHINSTANCE at s.pl line 16
use SNMP::Info;
my $info = new SNMP::Info(
# Auto Discover more specific Device Class
AutoSpecify => 1,
Debug => 1,
# The rest is passed to SNMP::Session
DestHost => '1.2.3.4',
Community => 'public',
Version => 2
) or die "Can't connect to device.\n";
my $err = $info->error();
$name = $info->name();
$class = $info->class();
print $info->stp_ver();
------------------------------
_______________________________________________
Netdot-users mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-users
End of Netdot-users Digest, Vol 48, Issue 6
*******************************************