I have been troubleshooting lldp links with my Nortel/Avaya/(Now Extreme) switches and have discovered that the way they denote lldpLocPortId and lldpRemPortId is with a MAC address that does not seem to exist anywhere else.
It looks like the lldpLocPortId is not stored in the ports table. I would think it would make it easier to link ports if it was stored as it is what lldp is telling the remote side what the id is.
Currently links are made by trying to matching based on ifDescr, ifName, and then ifAlias. As seen below that will never match on these switches. ifDescr has "Avaya Virtual Services Platform 7024XLS Module - " prepended so lldpRemPortDesc will not match ifDescr and it feels hacky to match on “%lldpRemPortDesc”.
So I was wondering if there was a reason lldpLocPortId is not stored in the ports tables. And if not do you accept database changes in pull requests.
I am proposing adding lldpLocPortId to the ports table and then try linking lldpLocPortId with lldpRemPortId first and then fall back to the current methods.
I do not know if this is a valid method for other lldp supported platforms, but it seems like it would as long as those platforms support the lldpLocPortId and lldpRemPortId.
The SNMP for the lldpLocPortId for this example port:
lldpLocPortId[23] = "A0 12 90 70 05 17 "
The Array from discovery for the link:
array (
‘lldpRemChassisIdSubtype’ => ‘4’,
‘lldpRemChassisId’ => ‘A0 12 90 6D E1 00’,
‘lldpRemPortIdSubtype’ => ‘3’,
‘lldpRemPortId’ => ‘A0 12 90 6D E1 17’,
‘lldpRemPortDesc’ => ‘Port 23’,
‘lldpRemSysName’ => ‘NOC-Core-7k’,
‘lldpRemSysDesc’ => ‘Virtual Services Platform 7024XLS HW:08 FW:10.3.1.5 SW:v10.3.3.000’,
‘lldpRemSysCapSupported’ => ‘28’,
‘lldpRemSysCapEnabled’ => ‘20’,
‘lldpRemManAddr’ => ‘10.0.5.51’,
),
The links table row for that link:
MariaDB [librenms]> select * from links where id = 69;
id 69
local_port_id 2602
local_device_id 43
remote_port_id NULL
active 1
protocol lldp
remote_hostname NOC-Core-7k
remote_device_id 45
remote_port A0 12 90 6D E1 17
remote_platform NULL
remote_version Virtual Services Platform 7024XLS HW:08 FW:10.3.1.5 SW:v10.3.3.00
The ports table entry for the port on the remote side:
MariaDB [librenms]> select port_id,ifDescr,ifName,portName,ifIndex,ifAlias,ifPhysAddress from ports where port_id =2378;
port_id 2378
ifDescr Avaya Virtual Services Platform 7024XLS Module - Port 23
ifName ifc23 (Slot: 1 Port: 23)
portName NULL
ifIndex 23
ifAlias IST to DF-7k-Core 1
ifPhysAddress a012906de100