Skip Menu |

This queue is for tickets about the SNMP-Info CPAN distribution.

Report information
The Basics
Id: 88929
Status: resolved
Priority: 0/
Queue: SNMP-Info

People
Owner: OLIVER [...] cpan.org
Requestors: Matthew.L.Dailey [...] Dartmouth.EDU
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 3.07



Subject: Cisco NX-OS 6.x Breaks ipAddrTable Indexes
Date: Tue, 24 Sep 2013 09:10:01 -0400
To: bug-SNMP-Info [...] rt.cpan.org
From: "Matthew L. Dailey" <matthew.l.dailey [...] dartmouth.edu>
Greetings. We just upgraded one of our routers from version 5.2 to version 6.1 or NX-OS, and it appears that Cisco has decided to stop following the MIB for ipAddrTable. At this version they are inserting a '4' in the index, making the index of this table different from ipAdEntAddr. For programs that assume (correctly) that these should be the same, this causes problems. Here is example output from the NX-OS 6.1 router: $ snmpwalk -v2c -cmystring 192.168.90.13 .1.3.6.1.2.1.4.20.1.1 IP-MIB::ipAdEntAddr.4.10.20.208.1 = IpAddress: 10.20.208.1 IP-MIB::ipAdEntAddr.4.10.80.0.69 = IpAddress: 10.80.0.69 IP-MIB::ipAdEntAddr.4.10.80.1.1 = IpAddress: 10.80.1.1 IP-MIB::ipAdEntAddr.4.10.80.1.129 = IpAddress: 10.80.1.129 <snip> Therefore, the results of ip_table() look like this: SNMP::Info::_global layers : SNMPv2-MIB::sysServices.0 : .1.3.6.1.2.1.1.7.0 SNMP::Info::_global description : SNMPv2-MIB::sysDescr.0 : .1.3.6.1.2.1.1.1.0 SNMP::Info::_global id : SNMPv2-MIB::sysObjectID.0 : .1.3.6.1.2.1.1.2.0 SNMP::Info 3.05 SNMP::Info::device_type() layers:01000110 id:9 sysDescr:"Cisco NX-OS(tm) n7000, Software (n7000-s1-dk9), Version 6.1(4), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Compiled 3/11/2013 23:00:00" SNMP::Info::specify() - Changed Class to SNMP::Info::Layer3::Nexus. SNMP::Info determined this device to fall under subclass : SNMP::Info::Layer3::Nexus SNMP::Info::_load_attr ip_table : IP-MIB::ipAdEntAddr : .1.3.6.1.2.1.4.20.1.1 $VAR1 = { '4.10.80.26.1' => '10.80.26.1', '4.10.80.3.1' => '10.80.3.1', '4.172.20.149.2' => '172.20.149.2', '4.10.80.12.1' => '10.80.12.1', <snip> Is there any way to add a workaround in the SNMP::Info::Layer3::Nexus code? My guess is that since this part of the MIB is deprecated, Cisco is instead focusing on ipAddressTable, and this is likely not to be reverted. Thanks and please let me know if you have any questions or need any other information. Best, Matthew L. Dailey Systems Administrator Thayer School of Engineering Dartmouth College
Thanks for the bug report. I have written the following untested patch in a branch which might address the issue: http://sourceforge.net/p/snmp-info/code/ci/f31dd2df3caa2a99685878442f561d3bd4e3175b/ It would be great if you are able to test this and let us know what you find. We also hope to test, but not for at least a week or so. regards, oliver.
Subject: Re: [rt.cpan.org #88929] Cisco NX-OS 6.x Breaks ipAddrTable Indexes
Date: Wed, 25 Sep 2013 16:25:45 -0400
To: <bug-SNMP-Info [...] rt.cpan.org>
From: "Matthew L. Dailey" <Matthew.L.Dailey [...] Dartmouth.EDU>
Hi Oliver, Thanks for your quick work on this. Unfortunately, the patch you proposed doesn't work: SNMP::Info::_global layers : SNMPv2-MIB::sysServices.0 : .1.3.6.1.2.1.1.7.0 SNMP::Info::_global description : SNMPv2-MIB::sysDescr.0 : .1.3.6.1.2.1.1.1.0 SNMP::Info::_global id : SNMPv2-MIB::sysObjectID.0 : .1.3.6.1.2.1.1.2.0 SNMP::Info 3.05 SNMP::Info::device_type() layers:01000110 id:9 sysDescr:"Cisco NX-OS(tm) n7000, Software (n7000-s1-dk9), Version 6.1(4), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Compiled 3/11/2013 23:00:00" SNMP::Info::specify() - Changed Class to SNMP::Info::Layer3::Nexus. SNMP::Info determined this device to fall under subclass : SNMP::Info::Layer3::Nexus SNMP::Info::_load_attr ip_table : IP-MIB::ipAdEntAddr : .1.3.6.1.2.1.4.20.1.1 Can't use string ("10.80.26.1") as a HASH ref while "strict refs" in use at /usr/local/share/perl/5.10.1/SNMP/Info.pm line 3159. Looking at the code, it seems that this new munge subroutine is getting called at the end of _load_attr() and is getting passed each value, rather than the whole hash. And, unfortunately, the issue here is with the indexes, not the data. The actual data returned by this new NX-OS in ipAdEntAddr is fine, but all the indexes within ipAddrTable have this extra '4'. So, the munge would have to actually munge the indexes of any data returned from this part of the MIB. I hope this helps. Let me know if you have questions or any other code to test. Best, Matt
You're right, I must have been a bit sleepy or something when I wrote that patch. Thanks for testing and letting me know what you found. I'll look into how to get the indexes fixed (I'm not an SNMP::Info guru but I want to help and learn a bit more in the process). regards, oliver. On Wed Sep 25 16:26:24 2013, Matthew.L.Dailey@Dartmouth.EDU wrote: Show quoted text
> Hi Oliver, > > Thanks for your quick work on this. Unfortunately, the patch you > proposed doesn't work: > > SNMP::Info::_global layers : SNMPv2-MIB::sysServices.0 : > .1.3.6.1.2.1.1.7.0 > SNMP::Info::_global description : SNMPv2-MIB::sysDescr.0 : > .1.3.6.1.2.1.1.1.0 > SNMP::Info::_global id : SNMPv2-MIB::sysObjectID.0 : > .1.3.6.1.2.1.1.2.0 > SNMP::Info 3.05 > SNMP::Info::device_type() layers:01000110 id:9 sysDescr:"Cisco NX- > OS(tm) n7000, Software (n7000-s1-dk9), Version 6.1(4), RELEASE > SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Compiled > 3/11/2013 23:00:00" > SNMP::Info::specify() - Changed Class to SNMP::Info::Layer3::Nexus. > SNMP::Info determined this device to fall under subclass : > SNMP::Info::Layer3::Nexus > SNMP::Info::_load_attr ip_table : IP-MIB::ipAdEntAddr : > .1.3.6.1.2.1.4.20.1.1 > Can't use string ("10.80.26.1") as a HASH ref while "strict refs" in > use at /usr/local/share/perl/5.10.1/SNMP/Info.pm line 3159. > > Looking at the code, it seems that this new munge subroutine is > getting called at the end of _load_attr() and is getting passed each > value, rather than the whole hash. And, unfortunately, the issue here > is with the indexes, not the data. The actual data returned by this > new NX-OS in ipAdEntAddr is fine, but all the indexes within > ipAddrTable have this extra '4'. So, the munge would have to actually > munge the indexes of any data returned from this part of the MIB. > > I hope this helps. Let me know if you have questions or any other code > to test. > > Best, > Matt
-- regards, oliver.
Just to give you an update... Another developer has committed a fix for this in Netdisco which seems to work. However there is still some debate within the developer group as to whether this is the right way to go. regards, oliver.
RT-Send-CC: Matthew.L.Dailey [...] Dartmouth.EDU
This should be resolved in 3.07 released to CPAN today.
Subject: Re: [rt.cpan.org #88929] Resolved: Cisco NX-OS 6.x Breaks ipAddrTable Indexes
Date: Thu, 3 Oct 2013 10:54:41 -0400
To: <bug-SNMP-Info [...] rt.cpan.org>
From: "Matthew L. Dailey" <Matthew.L.Dailey [...] Dartmouth.EDU>
Greetings, I tested version 3.07 this morning against a router running NX-OS 6.1(4) and can confirm that this is fixed. Proper MIB-compliant indexes are now returned, making Netdisco much happier. Thanks for the quick fix!! Best, Matt