Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize Interface Names in "LLDP Neighbors" Tab #1621

Closed
bdlamprecht opened this issue Oct 18, 2017 · 4 comments
Closed

Normalize Interface Names in "LLDP Neighbors" Tab #1621

bdlamprecht opened this issue Oct 18, 2017 · 4 comments
Labels
type: feature Introduction of new functionality to the application

Comments

@bdlamprecht
Copy link
Contributor

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

@jeremystretch
Copy link
Member

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 added a commit that referenced this issue Oct 19, 2017
@jeremystretch
Copy link
Member

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 jeremystretch added the type: feature Introduction of new functionality to the application label Oct 19, 2017
@bdlamprecht
Copy link
Contributor Author

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

@jeremystretch
Copy link
Member

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 jeremystretch reopened this Jan 5, 2018
funzoneq added a commit to openfibernet/netbox that referenced this issue Feb 6, 2018
* Fixes netbox-community#1765: Improved rendering of null options for model choice fields in filter forms

* Fixes netbox-community#1802: Typo in ldap.md

* Fixes netbox-community#1621: Tweaked LLDP interface name evaluation logic

* Fixes netbox-community#1807: Populate VRF from parent when creating a new prefix

* Fixes netbox-community#1809: Populate tenant assignment from parent when creating a new prefix

* Closes netbox-community#1824: Add virtual machine count to platforms list

* Fixes netbox-community#1818: InventoryItem API serializer no longer requires specifying a null value for items with no parent

* Evaluate device_id rather than pulling entire device (DB optimization)

* added statement and exaple for using ForeignKey ID's in write actions

* Closes netbox-community#1828: Added warning about media directory permissions

* fixed duplicate api docs example and grammar

* Closes netbox-community#1835: Consistent position of previous/next rack buttons

* Fixes netbox-community#1845: Correct display of VMs in list with no role assigned

* Closes netbox-community#1406: Display tenant description as title text in object tables

* Closes netbox-community#1366: Enable searching for regions by name/slug

* Cleaned up InventoryItem add/edit/delete links and return URL

* Closes netbox-community#1073: Include prefixes/IPs from all VRFs when viewing the children of a container prefix in the global table

* Closes netbox-community#144: Implemented list and bulk edit/delete views for InventoryItems

* Added report results to the home page

* Fixes netbox-community#1850: Fix TypeError when attempting IP address import if only unnamed devices exist

* Added warning message about automatically deleting child inventory items

* Release v.2.2.9
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants