Modify '' to fix neighbours problem on Extreme Networks EXOS switch

Tags: #<Tag:0x00007fe224aa7ba8>


I am new here and first time to post. I come form Macao. I work at a company where are many Extreme switches. I am testing and plan to deploy LibreNMS if boss accept. Before then, I found there a bug about neighbours tab disappear or cannot recognized remote port, even two switches connected each other and added to LibreNMS. I have found the bug and tested in physical switches. The end, I fixed it by adding codes to ‘’.

PHP File: Modified

To reproduce, I tested again with Extreme official VM image, and two VM switches were added to LibreNMS and connected between with their port 1.
IMG: switch-1 ports ht-tps://
IMG: switch-2 ports ht-tps://

The bug is caused by SNMP polling switch-1 with ifIndex to DB (associate ifIndex when adding switch), the port “1” is “1001”. Another switch-2 discover the switch-1 port “1” by LLDP is “1” (after LiberNMS get this information). Two values are not equal (“1001” != “1”). If I change to use ifName associate when adding device, because ifName is “1:1”, so it can not equal to LLDP too (“1:1” != “1”).
IMG: DB ports.ifIndex != links.remote_port (LLDP Port Id) ht-tps://
IMG: Ports table from SNMP ht-tps://
IMG: LLDP details from two swtiches ht-tps://

As above photo, the LLDP advertise ‘Port ID’ is a number (store as string), and it also advertise “Port description” after I set 'configure port 1 display-string “XXXXX” '.
IMG: LLDP port description after configure … display-string ht-tps://

To my company switches, many of switches are stacking, the port ID from LLDP will be “1:1”, ifIndex still 1001. (VM does not support stacking, and I am not able to provide physical switch photo, sorry!) So, if I use ifName to associate when adding switch, it may work on stacking switch (doesn’t work on non-stacking switch). On the other hand, I can configure ‘display-string’ to get LLDP “Port description” same as ifDescr from SNMP, and associate with iDescr when adding switch. It also not good because much work and maybe typo (every switch and ports much configure ‘display-string’. So, I choose to add code to LibreNMS to convert LLDP Port id value to equal to ifIndex.

As a result, ‘links’ table get the right ‘remote_port’ value, equal to ifIndex. ‘Neighbours’ tab appear and recognized remote ports.
IMG: DB ports.ifIndex == links.remote_port ht-tps://
IMG Neighbours tab appear and recognized remote port

Further, map appear correct.
IMG: Map also appear ht-tps://




First, thank you for your post.

You can actually pull request that code to be inserted in the main code:


OK, I will try tomorrow.