You are not logged in.

#1 2013-01-17 23:44:57

x-yuri
Member
Registered: 2013-01-06
Posts: 157

[SOLVED] systemd-udevd renames network interfaces

During install I enabled dhcpcd service like this:

systemctl enable dhcpcd@eth0.service

Seems perfectly valid, eh? But after reboot network I've got the following messages:

[ TIME ] Timed out waiting for device sys-subsystem-net-devices-eth0.device.
[DEPEND] Dependency failed for dhcpcd on eth0.
dmesg | less
...
systemd-udevd[111]: renamed network interface eth0 to enp0s3
...

It appears systemd changes network interface names. But then I suppose dhcpcd@.service is to be removed:

[Unit]
Description=dhcpcd on %I
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=forking
PIDFile=/run/dhcpcd-%I.pid
ExecStart=/usr/sbin/dhcpcd -q -w %I
ExecStop=/usr/sbin/dhcpcd -x %I

[Install]
Alias=multi-user.target.wants/dhcpcd@eth0.service

Last edited by x-yuri (2014-12-16 10:10:49)

Offline

#2 2013-01-17 23:50:45

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] systemd-udevd renames network interfaces

Have you tried

systemctl enable dhcpcd@enp0s3

See: https://bbs.archlinux.org/viewtopic.php?id=156254


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-01-18 00:05:57

x-yuri
Member
Registered: 2013-01-06
Posts: 157

Re: [SOLVED] systemd-udevd renames network interfaces

Sure, take a closer look at /usr/lib/systemd/system/dhcpcd@.service file. AFAIR it creates symbolic link with the name dhcpcd@eth0.service no matter what.

Offline

#4 2013-01-18 00:06:45

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,592
Website

Re: [SOLVED] systemd-udevd renames network interfaces

Somone already opened a bug report about this I think... search the tracker.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2013-01-18 00:11:57

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,751
Website

Re: [SOLVED] systemd-udevd renames network interfaces

You can manually create/rename the symlink to have the correct name, but yes, it's a bug.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#6 2013-01-18 00:12:31

x-yuri
Member
Registered: 2013-01-06
Posts: 157

Re: [SOLVED] systemd-udevd renames network interfaces

graysky, yes, it appears so

Last edited by x-yuri (2013-01-18 00:13:36)

Offline

#7 2013-01-18 00:36:30

slytux
Member
From: New York
Registered: 2010-09-25
Posts: 129

Re: [SOLVED] systemd-udevd renames network interfaces

That's lame, good thing I'm using netcfg@alias on my test server.  It's pretty simple for a dhcp setup.

#Copy the dhcp example one level up and rename it or create a symlink to it
cp /etc/network.d/examples/ethernet-dhcp /etc/network.d/dhcp
# Modify the 'NETWORKS' line in /etc/conf.d/netcfg by substituting the name of that file
# Enable service in systemd
systemctl enable netcfg@dhcp

Offline

#8 2013-01-18 17:37:47

billf
Member
Registered: 2013-01-18
Posts: 1

Re: [SOLVED] systemd-udevd renames network interfaces

old to Linux new to archLinux

jasonwryan -thanks!

Your post helped me figure it out why my Ethernet interface name was changed to enp0s3 and why - I like the old naming convention ethx easier for me to remember.  So went the route with custom rules in /etc/udev/rules.d 

Here is what I used.

70-my-net-names.rules
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="08:00:27:3b:f3:cd", NAME="eth0"

Offline

Board footer

Powered by FluxBB