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

Network interface improvements #363

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

ribetm
Copy link
Collaborator

@ribetm ribetm commented Jan 20, 2025

  • Add 2 new options (defaults unchanged):
    • primary MAC: use either the permanent or temporary MAC address
    • network identifier: currently netbox-agent lookups NICs by their name + MAC (if available) to know which API object to update. This means you can't update either of these fields and lose metadata if one of these fields changes. Now it is configurable to be either device name or MAC (using the primary MAC from previous option)

New features:

  • Update MAC address, if it is not used as the device identifier (Fix Update MAC address on pre-existing interfaces #166)
  • Update interface name, if it is not used as the device identifier
  • Netbox 4.2 compatibility (multiple / primary MAC address). Currently only one MAC will be set but we will expand this in the future
  • Disable NICs if their link is known to be down
  • Set speed & duplex mode

Fixed

  • MAC and name changes were lost
  • MAC comparison must use upper case
  • IP was reassigned to interface on every run
  • Virtual devices (except for tap/tun and LAGs) were tagged as Other
  • Ethernet type speed (eg. 1000base-T) used the current speed instead of the max speed supported

netbox_agent/network.py Outdated Show resolved Hide resolved
@ribetm ribetm force-pushed the nic_improvements branch 2 times, most recently from 0eeedc7 to 0c234c5 Compare January 21, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update MAC address on pre-existing interfaces
2 participants