[Bug 212480] [NEW PORT] sysutils/ethname: boot-time (re)naming of ethernet devices by MAC address.
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Sep 8 05:08:45 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212480
Bug ID: 212480
Summary: [NEW PORT] sysutils/ethname: boot-time (re)naming of
ethernet devices by MAC address.
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: freebsd-ports-bugs at FreeBSD.org
Reporter: eborisch+FreeBSD at gmail.com
I've put together a rc.d script [1] for renaming ethernet devices at boot time,
keeping MAC address <-> devname mappings consistent.
This isn't typically needed on PCIe systems, but for systems with multiple USB
ethernet (ue) devices, which seem to like to come up in non-deterministic
order, it is very helpful; doubly so when the system in question is a router /
firewall where the network config and security concerns vary wildly from one
device to the next.
It could also be of use for traditional NICs (PCIe) when adding a new card to a
system, for example, and ensuring that the existing, previously configured
device sticks to the MAC address, and not having to worry about which ends up
/dev/xxxN vs /dev/xxxM.
The script inserts itself before netif, waits an adjustable delay for the
expected devices to appear, and then renames them as requested by the user. All
of the device configuration, pf, etc., can be written with the new names. It
does not attempt to automatically handle devices added after boot.
Perhaps there is some other (pre-existing) way to handle this, but all of the
Google-fu I've thrown at it returns "you could write a script to rename then at
boot" ... so I did. If there is a simple knob I've missed, please point me at
it close this at.
It came up recently [2] in freebsd-stable, and a suggestion was made to file a
PR for either base / port inclusion, so here we are.
Having never gone through the process here before, please let me know if there
are any changes I can make on my end to accommodate this. As the installation
is placement of a single rc.d script, I don't have any installation scripts
currently in place.
[1] https://github.com/eborisch/ethname
[2]
https://lists.freebsd.org/pipermail/freebsd-stable/2016-September/085479.html
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list