Pinning assigned interfaces to MAC address

Started by CJ, May 27, 2023, 09:30:28 PM

Previous topic - Next topic
Since BSD doesn't have the udev rules for naming that Linux does, everything gets named and numbered in the order it's encountered on boot.  This means that I spent far too long rearranging interface assignments and renaming VLANs because I swapped out one of my 1G NICs for a 2.5G NIC.

Can we add some sort of option to pin interfaces to the MAC addresses?  That way when swapping hardware, we don't have to completely rearrange everything and OPNSense will automatically associate the correct interface with the correct physical port even if the name changed.

I second this. My configuration just nuked itself completely an interface was removed and readded.
Reassigning the configuration manually is tideous - especially when the whole IP configuration and interface names get deleted.
The interfaces set with "Prevent interface removal" were not visible in the UI and we could not assign them back.
The only way to get it back to working is by restoring a backup.

Please pin the assignments to MAC adresses or any stable value so that they stay consistent - even in the case of interfaces getting removed. Thanks!