[systemd-devel] How to disable Predictable Network Interface Names using a drop-in?

Lennart Poettering lennart at poettering.net
Mon Feb 6 20:56:30 UTC 2017


On Sat, 21.01.17 21:20, Marc Haber (mh+systemd-devel at zugschlus.de) wrote:

> On Fri, Jan 20, 2017 at 02:51:00PM +0000, Patrick Schleizer wrote:
> > I've learned about the kernel parameter and symlink ways to disable
> > predictable network interface names.
> 
> What would be the "symlink way"?

Linking the relevant .link file to /dev/null in /etc.

> Will predictable network names still play nice with the old udev
> way?

Well, if you have configuration, it's honoured.

> I cannot make my brain remember that my notebook has enp0s25 and
> wlp3s0, and would like to have eth0 and wlan0 again (or net0 and net1,
> or wired0 and wless0, if it is a bad idea to move the interfaces back
> to the kernel namespaces), while keeping the advantage of having
> predictable network names for USB network interfaces that I regularly
> plug in as well.
> 
> Will placing a /etc/udev/rules.d/70-persistent-network.rules
> that renames enp0s25 to wired0 and wlp3s0 to wless0 play nice, it is
> that asking for trouble?

Well, if you use names from the kernel's own namespace (i.e. ethXYZ or
wlanXYZ), yes, you#d be asking for trouble, since you#d be racing
against the kernel's naming.

However, if you pick your own names outside of the kernel's
namespaces, then all is good, and that's actually what we
recommend. (Though I'd do it by dropping in some .link files with the
right [Match] sections to make this happen, not bother with udev
rules, but either works)

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list