Subject: | Cisco Catalyst 3850/IOS 15 wrong device type |
Date: | Fri, 5 Jul 2013 10:16:55 +0100 |
To: | bug-snmp-info [...] rt.cpan.org |
From: | Christopher Causer <christopher.causer [...] it.ox.ac.uk> |
Hello SNMP::Info maintainers,
I was having some difficulty using our instance of Netdisco, which was
not recognizing native vlans for a port for some of our switches. Digging
through the source, I noticed that switches that did have native vlans
for ports were all Cisco Catalyst 3750s whereas the one I was troubleshooting
was a 3850. Digging further, I saw that there was a regex to match a 3750
to a device type SNMP::Info::Layer3::C6500.
The sysdesc of the offending 3850 switch is
-------------------------------------->8------
"Cisco IOS Software, Catalyst L3 Switch Software
(CAT3K_CAA-UNIVERSALK9-M), Version 15.0(1)EX1, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport Copyright (c)
1986-2013 by Cisco Systems, Inc. Compiled Wed 20-Mar-13 17:10 by pro"
-------------------------------------->8------
which means it is palmed off to SNMP::Info::Layer3::Cisco by the
function &SNMP::Info::device_type. In the SNMP::Info::Layer3::Cisco
module, &i_vlan returns {} for this particular switch, which is why
netdisco thinks that the switch has no access ports for any vlans.
However, if I added a regex into the device_type function mentioned above
to try to coerce this switch into a C6500, everything worked fine (or at
least it fixed the problem we were experiencing.)
-------------------------------------->8------
diff --git a/Info.pm b/Info.pm
index 5860be3..48388fd 100644
--- a/Info.pm
+++ b/Info.pm
@@ -1454,6 +1454,11 @@ sub device_type {
$objtype = 'SNMP::Info::Layer3::C6500'
if ( $desc =~ /cisco/i and $desc =~ /3750/ );
+ # IOS 15 on a Catalyst 3850
+ $objtype = 'SNMP::Info::Layer3::C6500'
+ if ( $desc =~ /cisco/i and $desc =~ /CAT3K/ );
+
# Cisco 2970
$objtype = 'SNMP::Info::Layer3::C6500'
if ( $desc =~ /(C2970|C2960)/ );
-------------------------------------->8------
This diff is against the latest stable release downloaded from CPAN.
I will be the first to admit my limited skills with SNMP, Cisco IOS and
pretty much everything inbetween. As such, if I have omitted anything
from this bug report please let me know and I will try my best to
answer.
--
Christopher Causer IT Services, University of Oxford
Network Support and Development Officer 13 Banbury Road, Oxford, OX2 6NN