Re: [systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
Hi, On Mon, Feb 20, 2017 at 05:42:19PM +0100, Lennart Poettering wrote: > On Mon, 20.02.17 17:38, Lennart Poettering (lenn...@poettering.net) wrote: > > Consider naming the file 50-lanc0.link or so, so that it takes > > precedence over 99-default.link if that's shipped by your distro. If > > it isn't, please contact your downstream distro for help (see above). > > BTW, all of the above is documented in systemd.link(5). My > recommendation is always to check the documentation first. Just to put and end to this, with proper numbering things are just fine now. Having this part ot systemd working in lexical order was just a surprise, I didn't expect that. Btw, the word "link" is multiply used in IT, so one can expect people to think of the wrong meaning of the word if one uses it without more explanation. Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
On Sun, 19.02.17 12:54, Marc Haber (mh+systemd-de...@zugschlus.de) wrote: > On Mon, Feb 06, 2017 at 09:56:30PM +0100, Lennart Poettering wrote: > > On Sat, 21.01.17 21:20, Marc Haber (mh+systemd-de...@zugschlus.de) wrote: > > > On Fri, Jan 20, 2017 at 02:51:00PM +, 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. > > What if there is no .link file and the Interfaces just come up as > enp8s0 and wlp2s0 We ship a default fallback .link file in systemd upstream: /usr/lib/systemd/network/99-default.link If your distro removes that, then I'd recommend contacting your distro for help, as they are clearly deviating from upstream defaults, and I have no idea where the naming is enforced then. > > 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) > > [2/5147]mh@swivel:~ $ cat /etc/systemd/network/lanc0.link Consider naming the file 50-lanc0.link or so, so that it takes precedence over 99-default.link if that's shipped by your distro. If it isn't, please contact your downstream distro for help (see above). Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
On Mon, 20.02.17 17:38, Lennart Poettering (lenn...@poettering.net) wrote: > On Sun, 19.02.17 12:54, Marc Haber (mh+systemd-de...@zugschlus.de) wrote: > > > On Mon, Feb 06, 2017 at 09:56:30PM +0100, Lennart Poettering wrote: > > > On Sat, 21.01.17 21:20, Marc Haber (mh+systemd-de...@zugschlus.de) wrote: > > > > On Fri, Jan 20, 2017 at 02:51:00PM +, 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. > > > > What if there is no .link file and the Interfaces just come up as > > enp8s0 and wlp2s0 > > We ship a default fallback .link file in systemd upstream: > > /usr/lib/systemd/network/99-default.link > > If your distro removes that, then I'd recommend contacting your distro > for help, as they are clearly deviating from upstream defaults, and I > have no idea where the naming is enforced then. > > > > 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) > > > > [2/5147]mh@swivel:~ $ cat /etc/systemd/network/lanc0.link > > Consider naming the file 50-lanc0.link or so, so that it takes > precedence over 99-default.link if that's shipped by your distro. If > it isn't, please contact your downstream distro for help (see above). BTW, all of the above is documented in systemd.link(5). My recommendation is always to check the documentation first. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
On Mon, Feb 06, 2017 at 09:56:30PM +0100, Lennart Poettering wrote: > On Sat, 21.01.17 21:20, Marc Haber (mh+systemd-de...@zugschlus.de) wrote: > > On Fri, Jan 20, 2017 at 02:51:00PM +, 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. What if there is no .link file and the Interfaces just come up as enp8s0 and wlp2s0 > 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) [2/5147]mh@swivel:~ $ cat /etc/systemd/network/lanc0.link [Match] MACAddress=f0:de:f1:b0:03:20 [Link] Name=lanc0 [3/5148]mh@swivel:~ $ ip --oneline link show | grep f0:de:f1:b0:03:20 2: enp0s25: mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000\link/ether f0:de:f1:b0:03:20 brd ff:ff:ff:ff:ff:ff [4/5149]mh@swivel:~ $ My ethernet is still enp0s25, what am I doing wrong? Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
On Fri, 20.01.17 14:51, Patrick Schleizer (patrick-mailingli...@whonix.org) wrote: > Hi, > > I've learned about the kernel parameter and symlink ways to disable > predictable network interface names. However, as a Debian derivative, it > would be much cleaner using a drop-in to disable it. > > Is there some drop-in directory foo.service.d that can be used to > disable it? ln -s /dev/null /etc/systemd/network/99-default.link Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
On Sat, 21.01.17 21:20, Marc Haber (mh+systemd-de...@zugschlus.de) wrote: > On Fri, Jan 20, 2017 at 02:51:00PM +, 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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
On Fri, Jan 20, 2017 at 02:51:00PM +, 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"? Will predictable network names still play nice with the old udev way? 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? Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
20.01.2017 17:51, Patrick Schleizer пишет: > Hi, > > I've learned about the kernel parameter and symlink ways to disable > predictable network interface names. However, as a Debian derivative, it > would be much cleaner using a drop-in to disable it. > > Is there some drop-in directory foo.service.d that can be used to > disable it? > You may try to override 99-default.link with [Link] NamePolicy= As I understand, having another file earlier in sorting order should do it as well. This should effectively disable name generation. Unfortunately, as opposed to units, it is not possible to selectively override specific key - first matching rule file is used entirely. This could lead to missing changes in default link file on updates. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
How about /etc/default/grub.d/ for the kernel parameter drop in file. That's how I do it at least. I don't think it's super well documented tho and I forget the suffix it expects offhand (*.cfg?). Follow the chain of the update-grub scripts and you should find it. Cheers, Brian On Fri, Jan 20, 2017, 08:53 Patrick Schleizer < patrick-mailingli...@whonix.org> wrote: > Hi, > > I've learned about the kernel parameter and symlink ways to disable > predictable network interface names. However, as a Debian derivative, it > would be much cleaner using a drop-in to disable it. > > Is there some drop-in directory foo.service.d that can be used to > disable it? > > Best regards, > Patrick > ___ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/systemd-devel > ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] How to disable Predictable Network Interface Names using a drop-in?
Hi, I've learned about the kernel parameter and symlink ways to disable predictable network interface names. However, as a Debian derivative, it would be much cleaner using a drop-in to disable it. Is there some drop-in directory foo.service.d that can be used to disable it? Best regards, Patrick ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel