Multiple lldp neighbors returned for interface #2890

Closed
opened 2025-12-29 18:23:09 +01:00 by adam · 1 comment
Owner

Originally created by @qwertiko on GitHub (Sep 20, 2019).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.4

When viewing LLDP neighbours, LLDP Device and LLDP Interface sometimes show incorrect settings due to multiple neighbours returned by the lldp request and only the first being used.
As en example:
some lldp port return multiple neighbours, with every neighbour except the last being empty.
I propose a change to always use the last returned lldp neighbor.

Steps to Reproduce

  1. Click on any device configured with napalm
  2. Click on LLDP Neighbours

Devices and ports of the lldp neighbours are shown correctly

Some devices are not shown properly since since lldp neighbours returned multiple object and only the first is being used

Proposed change in "netbox/templates/dcim/device_lldp_neighbors.html"

- var neighbor = neighbors[0];
+ var neighbor = neighbors[neighbors.length-1];

Originally created by @qwertiko on GitHub (Sep 20, 2019). ### Environment * Python version: 3.6.8 * NetBox version: 2.6.4 When viewing LLDP neighbours, LLDP Device and LLDP Interface sometimes show incorrect settings due to multiple neighbours returned by the lldp request and only the first being used. As en example: some lldp port return multiple neighbours, with every neighbour except the last being empty. I propose a change to always use the last returned lldp neighbor. ### Steps to Reproduce 1. Click on any device configured with napalm 2. Click on LLDP Neighbours <!-- What did you expect to happen? --> Devices and ports of the lldp neighbours are shown correctly <!-- What happened instead? --> Some devices are not shown properly since since lldp neighbours returned multiple object and only the first is being used Proposed change in "netbox/templates/dcim/device_lldp_neighbors.html" `- var neighbor = neighbors[0];` `+ var neighbor = neighbors[neighbors.length-1];`
adam added the type: feature label 2025-12-29 18:23:09 +01:00
adam closed this issue 2025-12-29 18:23:09 +01:00
Author
Owner

@DanSheps commented on GitHub (Sep 23, 2019):

some lldp port return multiple neighbours, with every neighbour except the last being empty.

This would be vendor specific LLDP implementation functionality

I propose a change to always use the last returned lldp neighbor.

I don't feel this would be a reasonable change, the current functionality of using the first neighbor makes the most sense. I could see altering this to include all neighbors on a port, however this might require significant code changes.

As it stands right now, the LLDP functionality is sufficient for most needs.

@DanSheps commented on GitHub (Sep 23, 2019): > some lldp port return multiple neighbours, with every neighbour except the last being empty. This would be vendor specific LLDP implementation functionality > I propose a change to always use the last returned lldp neighbor. I don't feel this would be a reasonable change, the current functionality of using the first neighbor makes the most sense. I could see altering this to include all neighbors on a port, however this might require significant code changes. As it stands right now, the LLDP functionality is sufficient for most needs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2890