Gentoo Archives: gentoo-user

From: Dan Johansson <Dan.Johansson@×××.nu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: udev upgrade renames eth-interfaces
Date: Sat, 16 Mar 2013 17:04:08
Message-Id: 1435275.X1LWAPJTBc@queen
In Reply to: [gentoo-user] Re: udev upgrade renames eth-interfaces by Jonathan Callen
1 On Saturday 16 March 2013 09.39:17 Jonathan Callen wrote:
2 > > Hello,
3 > >
4 > > Today I upgraded udev on one of my boxes (after hesitating a long
5 > > time). Even if I have /etc/udev/rules.d/80-net-name-slot.rules and
6 > > my old 70-persistent-net.rules in place, my interfaces gets renamed
7 > > (eth0 gets swapped with eth1) which then messes up my whole
8 > > configuration (routing tables and firewall rules). Any suggestion
9 > > how to keep my old names and order?
10 > Udev, as of version 187, will now refuse to rename a network interface
11 > to the name of a network interface that already exists -- which, due
12 > to race conditions, can be the case if you are attempting to rename a
13 > network device to a name the kernel will later use to name the next
14 > enumerated device. The fix for this issue is to *not* use names that
15 > match "eth[0-9]*", "wlan[0-9]*", etc. and instead use a name that the
16 > kernel would *not* automatically assign. Unfortunately, that means
17 > that you *cannot* keep your old names and order (upstream claims that
18 > the means used to ensure those names were used was unreliable and
19 > prone to race conditions anyway, which, looking at the code, I can
20 > believe).
21 This is great...
22 (I hope you can hear the irony)
23
24 OK, so I removed the two udev rules (70-persistent-net and 80-net-name-slot) files, thinking if this is the way the "upstream devs" are going then I have to check it out.
25 After removing the udev-rules and rebooting I got my two new network interfaces called enp0s4 and enp0s5 (no idea what that is supposed to mean).
26 My next step was to replace eth0 with enp0s5 and eth1 with enp0s4 in /etc/conf.d(net and create two new links (net.lo -> net.enp0s[45]) in /etc/init.d
27 Now I could start the two network interfaces (/etc/init.d/net.enp0s[45] start).
28 BUT, as soon as I try to start some service (sshd, ntpd, ...) that is using the network I get a lot of complains that eth0 and eth1 is not started (and can not be started) and the service wont start.
29 What have I missed???
30
31 Regards,
32 --
33 Dan Johansson, <http://www.dmj.nu>
34 ***************************************************
35 This message is printed on 100% recycled electrons!
36 ***************************************************

Replies

Subject Author
Re: [gentoo-user] Re: udev upgrade renames eth-interfaces "Canek Peláez Valdés" <caneko@×××××.com>