Normalize Interface Names in "LLDP Neighbors" Tab #1331

Closed
opened 2025-12-29 16:31:31 +01:00 by adam · 4 comments
Owner

Originally created by @bdlamprecht on GitHub (Oct 18, 2017).

Issue type

[X] Feature request

Environment

  • NetBox version: 2.2.1

Description

Currently, the "LLDP Neighbors" tab marks interfaces that don't match exactly with what NAPALM returns from the device as red (or incorrect).

On 'ios' devices, this is not helpful as the NAPALM (currently)[1] only supports returning the "short-name" of the interface.

This can be seen in the following screenshot:
netbox lldp neighbors

Even though the interfaces ARE correct, but the names don't match exactly, which causes some confusion and second-guessing to occur.

[1] This all may be a moot point since apparently NAPALM has a proposal for Hackathon 2017 to enable the option to return the normalized interface name

Originally created by @bdlamprecht on GitHub (Oct 18, 2017). ### Issue type [X] Feature request <!-- Requesting the implementation of a new feature --> ### Environment * NetBox version: 2.2.1 ### Description Currently, the "LLDP Neighbors" tab marks interfaces that don't match **_exactly_** with what NAPALM returns from the device as red (or incorrect). On 'ios' devices, this is not helpful as the NAPALM (currently)[1] only supports returning the "short-name" of the interface. This can be seen in the following screenshot: ![netbox lldp neighbors](https://user-images.githubusercontent.com/7783306/31739240-838a6184-b40a-11e7-8573-fbaf35f1eb3d.png) Even though the interfaces **ARE** correct, but the names don't match exactly, which causes some confusion and second-guessing to occur. [1] This all may be a moot point since apparently NAPALM has a proposal for [Hackathon 2017](https://github.com/napalm-automation/hackathon-2017/issues/5) to enable the option to return the normalized interface name
adam added the type: feature label 2025-12-29 16:31:31 +01:00
adam closed this issue 2025-12-29 16:31:31 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 19, 2017):

The root issue seems to be that NAPALM only returns the port ID and not the full name. Here's what we see on a device:

Neighbour Information:
Chassis type       : Mac address
Chassis ID         : 88:5a:92:4e:12:ff
Port type          : Interface name
Port ID            : Te1/49
Port description   : TenGigabitEthernet1/49
System name        : cisco-switch

Here's what NAPALM reports:

"xe-0/0/4": [
    {
        "hostname": "cisco-switch",
        "port": "Te1/49"
    }
]

I think it would be sufficient for our purposes to also return the port description. Then, we could consider the neighbor "correct" so long as one of the two matches the local interface defined in NetBox.

@jeremystretch commented on GitHub (Oct 19, 2017): The root issue seems to be that NAPALM only returns the port ID and not the full name. Here's what we see on a device: ``` Neighbour Information: Chassis type : Mac address Chassis ID : 88:5a:92:4e:12:ff Port type : Interface name Port ID : Te1/49 Port description : TenGigabitEthernet1/49 System name : cisco-switch ``` Here's what NAPALM reports: ``` "xe-0/0/4": [ { "hostname": "cisco-switch", "port": "Te1/49" } ] ``` I think it would be sufficient for our purposes to also return the port description. Then, we could consider the neighbor "correct" so long as one of the two matches the local interface defined in NetBox.
Author
Owner

@jeremystretch commented on GitHub (Oct 19, 2017):

I've tweaked the LLDP validation Javascript a bit in 81ca6f7. It should now accept short forms reported via LLDP which match a configured long form (e.g. Gi0/1 matches GigabitEthernet0/1). Please try it out and report back.

@jeremystretch commented on GitHub (Oct 19, 2017): I've tweaked the LLDP validation Javascript a bit in 81ca6f7. It should now accept short forms reported via LLDP which match a configured long form (e.g. `Gi0/1` matches `GigabitEthernet0/1`). Please try it out and report back.
Author
Owner

@bdlamprecht commented on GitHub (Oct 20, 2017):

Yes, this change did fix the matching the "short-name" returned by Cisco IOS. Thanks for the fix!

@bdlamprecht commented on GitHub (Oct 20, 2017): Yes, this change **did** fix the matching the "short-name" returned by Cisco IOS. Thanks for the fix!
Author
Owner

@jeremystretch commented on GitHub (Jan 5, 2018):

It seems that some Cisco IOS platforms return the full interface name and some return the abbreviated form. I'll need to adapt the row-highlighting Javascript to match either case.

@jeremystretch commented on GitHub (Jan 5, 2018): It seems that some Cisco IOS platforms return the full interface name and some return the abbreviated form. I'll need to adapt the row-highlighting Javascript to match either case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1331