Bulk Update MAC Address #2248

Closed
opened 2025-12-29 17:24:06 +01:00 by adam · 6 comments
Owner

Originally created by @thefathacker on GitHub (Dec 28, 2018).

Environment

  • Python version: 3.6.7
  • NetBox version: 2.5.2

Proposed Functionality

Bulk Update MAC Addresses for Device Interfaces

Use Case

Allows Quicker MAC Address Assignment when creating Switch Devices

Database Changes

Not Required Functionality/Data Already Exists

External Dependencies

Not Required Functionality/Data Already Exists

Originally created by @thefathacker on GitHub (Dec 28, 2018). ### Environment * Python version: 3.6.7 * NetBox version: 2.5.2 ### Proposed Functionality Bulk Update MAC Addresses for Device Interfaces ### Use Case Allows Quicker MAC Address Assignment when creating Switch Devices ### Database Changes Not Required Functionality/Data Already Exists ### External Dependencies Not Required Functionality/Data Already Exists
adam added the status: acceptedtype: feature labels 2025-12-29 17:24:06 +01:00
adam closed this issue 2025-12-29 17:24:06 +01:00
Author
Owner

@DanSheps commented on GitHub (Dec 30, 2018):

I think a better way to do it, on a purely graphical level, is to have a "base" mac and the increment accordingly.

@DanSheps commented on GitHub (Dec 30, 2018): I think a better way to do it, on a purely graphical level, is to have a "base" mac and the increment accordingly.
Author
Owner

@thefathacker commented on GitHub (Dec 31, 2018):

Why would you need to increment the MAC address of L2/Access Switches?

@thefathacker commented on GitHub (Dec 31, 2018): Why would you need to increment the MAC address of L2/Access Switches?
Author
Owner

@DanSheps commented on GitHub (Jan 3, 2019):

Generally a switch will have a base mac address, which all other interfaces (virtual, physical, etc) are derived from.

Lets say your base mac on a cisco switch is 0001.aade.3200

Eth1/0/1 would be 0001.aade.3200
Eth1/0/2 would be 0001.aade.3201

and so on.

I am almost 99% of the cases, you won't be a in a situation where each interface will have the exact same mac address. Only pseudo interfaces (subinterfaces, etc) will share a mac address.

@DanSheps commented on GitHub (Jan 3, 2019): Generally a switch will have a base mac address, which all other interfaces (virtual, physical, etc) are derived from. Lets say your base mac on a cisco switch is 0001.aade.3200 Eth1/0/1 would be 0001.aade.3200 Eth1/0/2 would be 0001.aade.3201 and so on. I am almost 99% of the cases, you won't be a in a situation where each interface will have the exact same mac address. Only pseudo interfaces (subinterfaces, etc) will share a mac address.
Author
Owner

@jeremystretch commented on GitHub (Jan 4, 2019):

The MAC address field was omitted from the bulk update feature since MAC addresses are typically unique. Do you have a use case where you need to assign the same MAC address to multiple interfaces?

I think a better way to do it, on a purely graphical level, is to have a "base" mac and the increment accordingly.

While I agree with the use case, this would be pushing the limited logic of the bulk update function a bit too far. Any programmatic changes are better handled via the API.

@jeremystretch commented on GitHub (Jan 4, 2019): The MAC address field was omitted from the bulk update feature since MAC addresses are typically unique. Do you have a use case where you need to assign the same MAC address to multiple interfaces? > I think a better way to do it, on a purely graphical level, is to have a "base" mac and the increment accordingly. While I agree with the use case, this would be pushing the limited logic of the bulk update function a bit too far. Any programmatic changes are better handled via the API.
Author
Owner

@thefathacker commented on GitHub (Jan 5, 2019):

I use ubnt edgeswitches as access switches, they only list one MAC address which they also uses as a Serial#. If they do use port unique MAC addresses, they are not easily visable.

@thefathacker commented on GitHub (Jan 5, 2019): I use ubnt edgeswitches as access switches, they only list one MAC address which they also uses as a Serial#. If they do use port unique MAC addresses, they are not easily visable.
Author
Owner

@jeremystretch commented on GitHub (Jan 17, 2019):

There's not really any harm in enabling this functionality, and there's a use case for at least being able to nullify existing MAC addresses.

@jeremystretch commented on GitHub (Jan 17, 2019): There's not really any harm in enabling this functionality, and there's a use case for at least being able to nullify existing MAC addresses.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2248