From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2A7A2198005 for ; Sat, 16 Mar 2013 18:08:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8E03AE05F5; Sat, 16 Mar 2013 18:08:27 +0000 (UTC) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E8AC3E003C for ; Sat, 16 Mar 2013 18:08:25 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id ge1so3644321lbb.15 for ; Sat, 16 Mar 2013 11:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=OaWHvczJjqqBf9aK1uHlmQCNF4WapteSu3jFWpd8D34=; b=AAvo9+fpd/T9dIb4vjOc76Zp4m4Q3bwWzazdwld0BGsnPms2sZ+lMd5s58CcCveSHl P6wkChx97ZGMMresc/wE+qqCGQ3tHUaUNOHL0LURV2Q0NZFEYkVvtVHmo9HF4tGJ3qw5 qUmHSEJRsJFISxexLWQRpqNxtLw1FLJlsgbOBmbmXkHyfg2UO6II+k+mD1Au0PAC/uqp CJ795WM+0+Q1hkVcqOqt7390tCAiaqSjk3N9vY+J1J9AtbjbLo/zb/5I1r9PBDhyBAzP yUeOpOV19zkEttHAb2Ql1Cqmgi7//ZgrvISGDe7F9URhLgGYXcIOg5OisvGQnSkvPIlN I0Wg== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.112.41.101 with SMTP id e5mr4059800lbl.120.1363457304125; Sat, 16 Mar 2013 11:08:24 -0700 (PDT) Received: by 10.114.69.242 with HTTP; Sat, 16 Mar 2013 11:08:23 -0700 (PDT) In-Reply-To: <1435275.X1LWAPJTBc@queen> References: <2684742.xaYK2yrzKb@queen> <51447605.8090904@gentoo.org> <1435275.X1LWAPJTBc@queen> Date: Sat, 16 Mar 2013 12:08:23 -0600 Message-ID: Subject: Re: [gentoo-user] Re: udev upgrade renames eth-interfaces From: =?UTF-8?B?Q2FuZWsgUGVsw6FleiBWYWxkw6lz?= To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 408bd775-b409-40de-9f3f-d9b65953c61e X-Archives-Hash: 1b40d5132b40c1bccdf098d01aa9e327 On Sat, Mar 16, 2013 at 11:03 AM, Dan Johansson wrot= e: > On Saturday 16 March 2013 09.39:17 Jonathan Callen wrote: >> > Hello, >> > >> > Today I upgraded udev on one of my boxes (after hesitating a long >> > time). Even if I have /etc/udev/rules.d/80-net-name-slot.rules and >> > my old 70-persistent-net.rules in place, my interfaces gets renamed >> > (eth0 gets swapped with eth1) which then messes up my whole >> > configuration (routing tables and firewall rules). Any suggestion >> > how to keep my old names and order? >> Udev, as of version 187, will now refuse to rename a network interface >> to the name of a network interface that already exists -- which, due >> to race conditions, can be the case if you are attempting to rename a >> network device to a name the kernel will later use to name the next >> enumerated device. The fix for this issue is to *not* use names that >> match "eth[0-9]*", "wlan[0-9]*", etc. and instead use a name that the >> kernel would *not* automatically assign. Unfortunately, that means >> that you *cannot* keep your old names and order (upstream claims that >> the means used to ensure those names were used was unreliable and >> prone to race conditions anyway, which, looking at the code, I can >> believe). > This is great... > (I hope you can hear the irony) > > OK, so I removed the two udev rules (70-persistent-net and 80-net-name-sl= ot) files, thinking if this is the way the "upstream devs" are going then I= have to check it out. That's the smart thing to do. > After removing the udev-rules and rebooting I got my two new network inte= rfaces called enp0s4 and enp0s5 (no idea what that is supposed to mean). http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfac= eNames http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_= id.c Basically, "en" is for "ethernet", "p" is for "PCI bus", and "0s4" and "0s5" is for the topology of the cards in your machine: the cards are in the PCI bus number 0, slot number 4 and 5. In other words, if you do "find /sys -name enp0s4", I'm betting you will get something like: /sys/devices/pci0000:00/0000:00:1c.1/0000:00:004.0/net/enp0s4 The "0000:00:004.0" is the part that determines the naming of yout device. This naming is deterministic: as long as you don't move the cards from PCI slot, they will be named like that always. > 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 > Now I could start the two network interfaces (/etc/init.d/net.enp0s[45] s= tart). > BUT, as soon as I try to start some service (sshd, ntpd, ...) that is us= ing 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. > What have I missed??? Do you have net.eth0 or net.eth1 in /etc/rc.conf? Regards. --=20 Canek Pel=C3=A1ez Vald=C3=A9s Posgrado en Ciencia e Ingenier=C3=ADa de la Computaci=C3=B3n Universidad Nacional Aut=C3=B3noma de M=C3=A9xico