Re: How to avoid systemd/udev unpredictable NIC names
On Tue, Aug 31, 2021 at 12:27:57AM +0300, IL Ka wrote:
> >
> > This gives unpredictable results if the system has more than one
> > ethernet interface, or more than one wireless interface.
> >
> > It's fine on systems that have 0-1 ethernet and 0-1 wireless NICs.
> >
>
> Isn't that what the topic starter asked about?:)
I sincerely hope that the OP will tell us how many ethernet interfaces
their "server" has, so we can stop the hypothetical tennis match.
> To make names predictable one can either leave everything as-is and let
> `systemd-udev` do its job, or create custom naming scheme using "link"
> files:
>
> https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html
> https://systemd.io/PREDICTABLE_INTERFACE_NAMES/
> https://www.freedesktop.org/software/systemd/man/systemd.link.html
I advocated creating the .link files in my original message. I even
gave examples.
I do *not* advocate "letting systemd-udevd do its job", because it's
absolutely unqualified for duty. The names it chooses are *not*
predictable. The OP knew this. I can tell by their wording.
I do *not* advocate using "net.ifnames=0" *unless* the system is known
to have fewer than 2 ethernet interfaces *and* fewer than 2 wireless
interfaces.
Reply to: