LLDP: recognize cabling correctness via switchport mac #4569

Closed
opened 2025-12-29 18:37:44 +01:00 by adam · 3 comments
Owner

Originally created by @FlorianHeigl on GitHub (Feb 15, 2021).

Environment

  • Python version: 3.8
  • NetBox version: current nextbox-docker ba83c86505b3 (v2.10.4)

Proposed Functionality

The LLDP Neighbors page has a column labeled LLDP Interface.
It is matched on the name of the remote interface to validate cabling.
A remote device can also send the MAC address instead of the interface name.
Currently that MAC address is not used for the matching, only the name.
I suggest it would also be used for matching.
currently, i get a false positive on this connection.

Interface Configured Device Configured Interface LLDP Device LLDP Interface
ge-0/0/0 ers Port 2 ers 00:1f:46:ab:cd:ef
ge-0/0/3 sw01 GigabitEthernet1/0/3 sw01 GigabitEthernet1/0/3

for linux you can force the expected behaviour by setting up a /etc/lldpd.d/portid.conf containing
configure lldp portidsubtype ifname followed by a restart of lldpd.

Use Case

A user has a linux host running a stock setup of lldpd or i.e. an older Avaya switch.
netbox will show them this connection in red, although it is correctly plugged.
They'll be able to know that netbox correctly recognizes the link.

For the record, to me it seems the most successful strategy would be to reference mac, port id, port descr.

Database Changes

I think the data is there and just needs to be referenced,
Likely it needs massaging so both mac address formats are of same upper/lower casing.

External Dependencies

quite certain this has no depedencies :-)

Originally created by @FlorianHeigl on GitHub (Feb 15, 2021). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for proposing specific new features or enhancements. If you have a general idea or question, please start a discussion instead: https://github.com/netbox-community/netbox/discussions NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.8 * NetBox version: current nextbox-docker ba83c86505b3 (v2.10.4) <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality The LLDP Neighbors page has a column labeled LLDP Interface. It is matched on the name of the remote interface to validate cabling. A remote device can also send the MAC address instead of the interface name. Currently that MAC address is not used for the matching, only the name. I suggest it would also be used for matching. currently, i get a false positive on this connection. |Interface | Configured Device | Configured Interface | LLDP Device | LLDP Interface| |-- | -- | -- | -- | --| |ge-0/0/0 | ers | Port 2 | ers | 00:1f:46:ab:cd:ef| |ge-0/0/3 | sw01 | GigabitEthernet1/0/3 | sw01 | GigabitEthernet1/0/3| for linux you can force the expected behaviour by setting up a `/etc/lldpd.d/portid.conf` containing `configure lldp portidsubtype ifname` followed by a restart of `lldpd`. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case A user has a linux host running a stock setup of `lldpd` or i.e. an older Avaya switch. netbox will show them this connection in red, although it is correctly plugged. They'll be able to know that netbox correctly recognizes the link. For the record, to me it seems the most successful strategy would be to reference mac, port id, port descr. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes I think the data is there and just needs to be referenced, Likely it needs massaging so both mac address formats are of same upper/lower casing. <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies quite certain this has no depedencies :-)
adam added the plugin candidatepending closure labels 2025-12-29 18:37:44 +01:00
adam closed this issue 2025-12-29 18:37:44 +01:00
Author
Owner

@DanSheps commented on GitHub (Feb 15, 2021):

Thank you for submitting your idea. Although the proposed functionality falls outside the current scope of NetBox's core feature set, it may make a good candidate for a NetBox plugin, and we encourage you to pursue its development and a standalone project. Please reach out via our mailing list or Slack channel if you need any assistance.

@DanSheps commented on GitHub (Feb 15, 2021): Thank you for submitting your idea. Although the proposed functionality falls outside the current scope of NetBox's core feature set, it may make a good candidate for a [NetBox plugin](https://netbox.readthedocs.io/en/stable/plugins/), and we encourage you to pursue its development and a standalone project. Please reach out [via our mailing list or Slack channel](https://github.com/netbox-community/netbox/wiki) if you need any assistance.
Author
Owner

@stale[bot] commented on GitHub (Mar 19, 2021):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@stale[bot] commented on GitHub (Mar 19, 2021): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Author
Owner

@FlorianHeigl commented on GitHub (Mar 30, 2021):

¯\_(ツ)_/¯

@FlorianHeigl commented on GitHub (Mar 30, 2021): `¯\_(ツ)_/¯`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4569