You are not logged in.

#1 2014-03-25 09:52:56

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Persistent devices names of network interface not reliable.

In my system my wired interface is usually named enp3s0, which follow the persistent device name of the new systemd. From time to time, this device is named eth0 with no apparent reason. My understanding is that the file responsible for this is: /usr/lib/udev/rules.d/80-net-setup-link.rules. I suspect a race condition somewhere in the boot process but my knowledge stops here. Any suggestion? Anyone having seen a similar problem?

Offline

#2 2014-03-25 15:57:19

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Persistent devices names of network interface not reliable.

is that a rule file that you added ?

Also you can choose to setup net.ifnames=0 on your kernel line to disable predictable naming which will always give you eth0 as the name of your ethernet interface.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2014-03-25 16:13:00

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Persistent devices names of network interface not reliable.

Check your journal for clues - in particular, compare the entries created by a successful renaming with those created when it fails.

Offline

#4 2014-03-26 07:20:30

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Persistent devices names of network interface not reliable.

OK, here is what I could get from the journal. I think udev tried to rename the interface at the same time dhcpcd configure it which could fail. A correct dependency should be added but aI am a little lost here. I know the basic systemd service dependencies but here we have to specify a dependency of a systemd service and a udev rule. On this system aI have only one network interface so I could simply disable to renaming of the interface (but I think it is a nice feature if we could get to work properly).

Mar 26 07:49:37 pcolivier kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar 26 07:49:37 pcolivier dhcpcd[192]: forked to background, child pid 221
Mar 26 07:49:37 pcolivier systemd-udevd[167]: error changing net interface name eth0 to enp3s0: Device or resource busy
Mar 26 07:49:37 pcolivier systemd[1]: Started dhcpcd on all interfaces.
Mar 26 07:49:37 pcolivier systemd[1]: Starting Multi-User System.

Offline

#5 2014-03-26 08:13:46

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Persistent devices names of network interface not reliable.

I agree it's a nice feature for certain use cases, but IMO it's an unnecessary complication on single-interface systems - I'd recommend you turn it off. I don't use it on any of my systems.

That said - the udev rule is applied when the systemd-udevd service is run, so just make sure dhcpcd runs after that.

Offline

#6 2014-03-26 08:40:48

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: Persistent devices names of network interface not reliable.

tomk wrote:

That said - the udev rule is applied when the systemd-udevd service is run, so just make sure dhcpcd runs after that.

That doesn't necessarily work. the udev service may find the network device at a later time when it has been running a while, right?
systemd-udev runs before sysinit.target, dhcpcd during multi-user.target which only starts after sysinit.target.

If you want to use persistent interface names and dhcpcd on all interfaces you should prevent it from binding to the kernel names with e.g. this in the dhcpcd.conf:

denyinterfaces wlan[0-9]* eth[0-9]*

Last edited by progandy (2014-03-26 08:45:19)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB