Search of MAC addresses #1132

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

Originally created by @jvanderaa on GitHub (Jul 27, 2017).

Issue type: Feature Request

Python version: 3.5
NetBox version: 2.1

Would like to see the ability to search for MAC addresses that are input into Netbox. After spending some time loading the MACs into the tool, it would be helpful to search them in case the need arises to see where a MAC address lives. Such as a script to map out without the use of CDP/LLDP based on the mac address table.

Originally created by @jvanderaa on GitHub (Jul 27, 2017). <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type: Feature Request <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version: 3.5** **NetBox version: 2.1** <!-- If filing a bug, please record the exact steps taken to reproduce the bug and any errors messages that are generated. If filing a feature request, please precisely describe the data model or workflow you would like to see implemented, and provide a use case. --> Would like to see the ability to search for MAC addresses that are input into Netbox. After spending some time loading the MACs into the tool, it would be helpful to search them in case the need arises to see where a MAC address lives. Such as a script to map out without the use of CDP/LLDP based on the mac address table.
adam added the type: feature label 2025-12-29 16:29:17 +01:00
adam closed this issue 2025-12-29 16:29:17 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 28, 2017):

MAC address search is already supported. What specific functionality are you requesting?

@jeremystretch commented on GitHub (Jul 28, 2017): MAC address search is already supported. What specific functionality are you requesting?
Author
Owner

@jvanderaa commented on GitHub (Jul 28, 2017):

Perhaps I am doing something wrong in there.

What I have done is go to a device that I have the MAC address for, copy the MAC address from an interface, then paste into the search bar. It comes back with no results found. The search format is nn:nn:nn:nn:nn:nn that I am using to search. The MAC address that I'm using as well is one from an interface.

Detailed python version is 3.5.2.

@jvanderaa commented on GitHub (Jul 28, 2017): Perhaps I am doing something wrong in there. What I have done is go to a device that I have the MAC address for, copy the MAC address from an interface, then paste into the search bar. It comes back with no results found. The search format is nn:nn:nn:nn:nn:nn that I am using to search. The MAC address that I'm using as well is one from an interface. Detailed python version is 3.5.2.
Author
Owner

@mlorentz75 commented on GitHub (Aug 1, 2017):

Netbox 2.1 / Python 2.7.5 (stock CentOS 7) here. Also can't find a way to search for MAC addresses, or interface descriptions. Couldn't find mention of interfaces in SEARCH_TYPES in netbox/netbox/views.py - is this included in global search at all?

@mlorentz75 commented on GitHub (Aug 1, 2017): Netbox 2.1 / Python 2.7.5 (stock CentOS 7) here. Also can't find a way to search for MAC addresses, or interface descriptions. Couldn't find mention of interfaces in SEARCH_TYPES in netbox/netbox/views.py - is this included in global search at all?
Author
Owner

@mlorentz75 commented on GitHub (Aug 2, 2017):

@vanderaaj There's actually a way to search for MAC addresses, it's just not included in global search. MACs can be searched for on the Devices list. There is a dedicated input field on the bottom of the search box to the right of that page.

@jeremystretch Shouldn't MAC addresses, or other interface attributes like the description field, be included in global search? Personally I found it somewhat irritating that global search does not provide search results for interface attributes. What do you think?

@mlorentz75 commented on GitHub (Aug 2, 2017): @vanderaaj There's actually a way to search for MAC addresses, it's just not included in global search. MACs can be searched for on the Devices list. There is a dedicated input field on the bottom of the search box to the right of that page. @jeremystretch Shouldn't MAC addresses, or other interface attributes like the description field, be included in global search? Personally I found it somewhat irritating that global search does not provide search results for interface attributes. What do you think?
Author
Owner

@jeremystretch commented on GitHub (Aug 2, 2017):

I've enabled this functionality. It does introduce a noticeable delay when searching globally, but the query is only extended to look at MAC addresses if the given value is a valid MAC address, so it's probably fine. Searching using the dedicated MAC filter is much faster, of course.

@jeremystretch commented on GitHub (Aug 2, 2017): I've enabled this functionality. It does introduce a noticeable delay when searching globally, but the query is only extended to look at MAC addresses if the given value is a valid MAC address, so it's probably fine. Searching using the dedicated MAC filter is much faster, of course.
Author
Owner

@jkrauska commented on GitHub (Oct 23, 2017):

Q: Is this functionality NOT in 2.2.1?

It doesn't appear to work for me -- the dcim/filters.py code looks quite similar, but slightly different -- wondering if anyone can assist/confirm.

@jkrauska commented on GitHub (Oct 23, 2017): Q: Is this functionality NOT in 2.2.1? It doesn't appear to work for me -- the dcim/filters.py code looks quite similar, but slightly different -- wondering if anyone can assist/confirm.
Author
Owner

@jkldgoefgkljefogeg commented on GitHub (Jan 18, 2018):

@jeremystretch I can't get MAC search to work in git master either. Searching for interface MAC (AA:BB:CC:DD:EE:FF format) in top right search box does not work. What is the dedicated MAC filter you mentioned?

@jkldgoefgkljefogeg commented on GitHub (Jan 18, 2018): @jeremystretch I can't get MAC search to work in git master either. Searching for interface MAC (AA:BB:CC:DD:EE:FF format) in top right search box does not work. What is the dedicated MAC filter you mentioned?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1132