From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Borzenkov Date: Sun, 22 Nov 2009 11:24:19 +0000 Subject: Re: udev and persistent-net.rules Message-Id: <200911221424.22669.arvidjaar@mail.ru> MIME-Version: 1 Content-Type: multipart/mixed; boundary="nextPart2921900.L0cDAzNvbS" List-Id: References: <20091122125332.ahg6l9d3z4cc88ko@inbox.dv.lv> In-Reply-To: <20091122125332.ahg6l9d3z4cc88ko@inbox.dv.lv> To: linux-hotplug@vger.kernel.org --nextPart2921900.L0cDAzNvbS Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sunday 22 of November 2009 13:53:32 Jancs wrote: > Dear Sirs, >=20 > I am sure the question i have is nothing new, but i cannot find an > answer on it: >=20 > I have many DIY routers having 2 or more NICs and what drives me > crazy is udev's > stubborn enumeration of NICs to rules or features unknown to me. So, > every time after power cycle of after a long uptime and reboot, I get > eth0 and eth1 swapped. >=20 > Some time ago I just trashed udev as buggy thing, but now too many > things relies on it so I want to finally get some ideas on how to for > udev to use enumerations I need or how to disable enumeration of NIC > by udev to bee free to enumerate them accordind to my needs. >=20 > Regards- > Janis Eisaks >=20 > P.S. I use Slack64-13 >=20 I do not know about your particular distribution, but stock udev creates=20 rules in /etc/udev/rules.d to assign interface names based on MAC=20 address, like SUBSYSTEM=3D=3D"net", ACTION=3D=3D"add", DRIVERS=3D=3D"?*",=20 ATTR{address}=3D=3D"00:1d:09:5e:47:5b", ATTR{type}=3D=3D"1", KERNEL=3D=3D"e= th*",=20 NAME=3D"eth0" So if interface names change for you that could be anything of =2D your distribution does not generate those rules =2D those rules cannot be preserved (e.g. root is read-only, so udev=20 cannot commit them to stable storage) =2D interface renaming on startup does not work One more possibility is that at some point those rules *were* generated=20 but with names that you do not like. What is wrong with using interface names as udev likes them? --nextPart2921900.L0cDAzNvbS Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAksJH2MACgkQR6LMutpd94wCAwCgkkaVHDtBvV6jw1b001Jgserm BZMAniUmO2WOvfKlYh0aYvS4pfMkleIF =B3Ns -----END PGP SIGNATURE----- --nextPart2921900.L0cDAzNvbS--