Closed inphobia closed 5 years ago
bonus: this also makes my cisco nexuses return correct info. without the diff port members are all over the place, even mapping portchannels as members of other port channels.
device: nexus 9332pq nx-os 7.0(3)I7(5) class: SNMP::Info::Layer3::Nexus
without the diff:
netdisco-do show -d 10.40.72.252 -e agg_ports
[756] 2019-01-12 02:41:28 info App::Netdisco version 2.040002 loaded.
[756] 2019-01-12 02:41:28 info show: [10.40.72.252]/agg_ports started at Sat Jan 12 03:41:28 2019
\ {
5 369098776,
7 369098776,
11 369098776,
12 369098776,
19 369098776,
...
6252 369098776,
6259 369098776,
6260 369098776,
6267 369098776,
369098763 369098776,
369098811 369098776,
369098812 369098776,
436215296 369098802,
436216320 369098802,
436218368 369098758,
436222464 369098792
}
a lot of this output has been snipped, but to give you an idea:
netdisco-do show -d 10.40.72.252 -e agg_ports 2>&1 | wc -l
1330
yup, 1330 lines!
with the diff: netdisco-do show -d 10.40.72.252 -e agg_ports
[1197] 2019-01-12 02:47:04 info App::Netdisco version 2.040002 loaded.
[1197] 2019-01-12 02:47:05 info show: [10.40.72.252]/agg_ports started at Sat Jan 12 03:47:05 2019
\ {
436209664 369098802,
436210176 369098802,
436210688 369098758,
436212224 369098792,
436212736 369098811,
436213248 369098812,
436214272 369098803,
436214784 369098763,
436217856 369102843,
436218368 369102843,
436220928 369102847,
436221440 369102847
}
[1197] 2019-01-12 02:47:05 info show: finished at Sat Jan 12 03:47:05 2019
[1197] 2019-01-12 02:47:05 info show: status done: Showed agg_ports response from 10.40.72.252
while the info returned now is correct, it is however not yet complete. portchannel members on fabric extenders are not yet shown.
update: the portchannels i'm missing are either not using lacp, are not in sync, or are the fabric extender uplinks. while the portchannel interface show up in dot3adAggIndex, they have no members in dot3adAggPortSelectedAggID. as such they will not be shown.
tagging @JeroenvIS we had discussed this problem before. he had also seen it on nexus 5596s, but there it seems to work if no descriptions are given to an interface.
cisco-lag-mib might have the parts needed to fill the last gaps, i'll investigate later.
works for me & noone else complained (or reported anything at all 😈 )
snmp::info::ciscoagg returns unusable mappings for cisco c3750x stacks running ios 15.0(2)SE6.
i suspect it's due to bp_index missing the needed mappings.
snmp::info class used for this device is snmp::info::layer3::c6500
Expected Behavior
according to snmp::info::ciscoagg:
expected is to get ifindex keys back.
Current Behavior
at least for the device i tested on, the keys returned are bp_index id's, not ifindex. but bp_index() is missing mappings for the returned keys.
Possible Solution
using dot3adAggPortSelectedAggID seems to be a solution for this device. based off agg_ports_pagp in snmp::info::ciscoagg:
i'm not sure where to best change or try to catch this. snmp::info::ciscoagg is used by a lot of classes, many of which i don't have access to for testing, so things might break. on the other hand, snmp::info::ciscoagg->agg_ports says it should return ifindex keys which it is currently not doing.
Steps to Reproduce (for bugs)
according to cisco: (https://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/40700-snmp-ifIndex40700.html) bp_index needs to be mapped to a vlan using a community@vlan-id construct. i found no combination that would return a mapping for 53 & 109. the config of the physical interfaces looks like:
that of the portchannel interface:
it could be that not returing dot1dBasePortIfIndex (==bp_index) for portchannel members is a cisco bug, but i found no reference to it.
notice that id's returned in step 1 are not present in ifindex (snipped a bit of output)
since https://github.com/netdisco/netdisco/blob/master/lib/App/Netdisco/Worker/Plugin/Discover/Properties.pm#L239 can't map the interfaces no portchannel members are shown for this class of devices.
Your Environment