30 Oct
2015
30 Oct
'15
5:26 a.m.
Mark,
On 2015-10-27 09:24, Tom Laermans wrote:
- a fallback mechanism which tries to find a match on an interface's MAC address produces a wrong match, because typically all ports on larger switches have the same MAC address and the heuristics just picks the first match, which is almost always wrong. In case of multiple matches the matching on MAC should just fail, which at least would not produce a senseless match causing operators to scratch their heads and wonder who crossed the cables. The comment in lldp-mib.inc.php : // Find the device by MAC address, still matches multiple ports sometimes, we use the first one and hope we're lucky if very much misguided, as all port MAC addresses on a switch are typically the same, at least on all device types that I checked.
This worked for quite a number of devices I've checked, which all had different MACs per port. Indeed I have one that sees at least one other port as "port 1", and was planning on looking into that, pretty convinced it had to do with this too. I'll see later if this fixes it :-)
My mismatch actually DID have to do with that multiple hits. LACP bonding sets bonded NICs to all have the same MAC. I've committed a fix in r7138 to not link wrongly anymore when multiple ports have the same MAC.
Thanks for the pointer!
Tom