Netbox does not allow multiple interfaces to share the same MAC address #10788

Closed
opened 2025-12-29 21:35:55 +01:00 by adam · 2 comments
Owner

Originally created by @leomarssilva on GitHub (Feb 20, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.2.3

Python Version

3.12

Steps to Reproduce

  1. Create a device or virtual machine
  2. Create two or more interfaces
  3. Create a new MAC address
  4. Try to add it to more than one interface

Expected Behavior

Multiple interfaces can have the same MAC address, as discussed on https://github.com/netbox-community/netbox/discussions/7706

For example, before v4.2.0:
Image

Observed Behavior

After the changes of https://github.com/netbox-community/netbox/issues/4867, a MAC address can only be added to one interface at the time

Originally created by @leomarssilva on GitHub (Feb 20, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.2.3 ### Python Version 3.12 ### Steps to Reproduce 1. Create a device or virtual machine 2. Create two or more interfaces 3. Create a new MAC address 4. Try to add it to more than one interface ### Expected Behavior Multiple interfaces can have the same MAC address, as discussed on https://github.com/netbox-community/netbox/discussions/7706 For example, before v4.2.0: <img width="590" alt="Image" src="https://github.com/user-attachments/assets/da6fa6ff-d2d9-46c5-90c0-02fc62bf451a" /> ### Observed Behavior After the changes of https://github.com/netbox-community/netbox/issues/4867, a MAC address can only be added to one interface at the time
adam closed this issue 2025-12-29 21:35:55 +01:00
Author
Owner

@sleepinggenius2 commented on GitHub (Feb 20, 2025):

I had the same concern, but it was pointed out that there is no unique constraint on the MAC address field, so you can just create a new one for each interface, even if they share the same address.

@sleepinggenius2 commented on GitHub (Feb 20, 2025): I had the same concern, but it was pointed out that there is no unique constraint on the MAC address field, so you can just create a new one for each interface, even if they share the same address.
Author
Owner

@jeremystretch commented on GitHub (Feb 20, 2025):

After the changes of https://github.com/netbox-community/netbox/issues/4867, a MAC address can only be added to one interface at the time

Yes; this is an intentional change stemming from the introduction of the new MACAddress model. If you'd like to propose a change to this behavior, please do so by submitting a feature request citing your justification and use case.

@jeremystretch commented on GitHub (Feb 20, 2025): > After the changes of https://github.com/netbox-community/netbox/issues/4867, a MAC address can only be added to one interface at the time Yes; this is an intentional change stemming from the introduction of the new MACAddress model. If you'd like to propose a change to this behavior, please do so by submitting a [feature request](https://github.com/netbox-community/netbox/issues/new?template=01-feature_request.yaml) citing your justification and use case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10788