From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Karl O. Pinc" Date: Thu, 23 Jul 2009 15:56:15 +0000 Subject: Re: How to disable persistent network device names? Message-Id: <1248364575l.22056l.0l@mofo> List-Id: References: <4A684053.5070403@bio.ifi.lmu.de> In-Reply-To: <4A684053.5070403@bio.ifi.lmu.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On 07/23/2009 05:49:55 AM, Frank Steiner wrote: > Hi, > after switching from SLES 10 to 11 I saw that I couldn't use > FORCE_PERSISTENT_NAMES=no anymore. > > How can we prevent persistent network device names? There are some > problems with this: > > 1) If 70-persistent-net.rules is removed, it is recreated with totally > strange values. E.g. I have file with > > SUBSYSTEM="net", ACTION="add", DRIVERS="?*", > ATTR{address}="00:1b:21:0e:3e:68", ATTR{type}="1", KERNEL="eth*", > NAME="eth0" > > Now I remove the file (we have a diskless environment where those > files > can get removed due to a local disk change) and call "udevadm > trigger". > The new 70-persistent-net.rules now contains: > > SUBSYSTEM="net", ACTION="add", DRIVERS="?*", > ATTR{address}="00:1b:21:0e:3e:68", ATTR{type}="1", KERNEL="eth*", > NAME="eth_s6_0" Here your mac addresses are probably changing. Are you using the forcedeth driver? (See below.) > 2) When a mainboard is exchanged, the MACs change. But on the next > boot > I still want the new NICs to be eth0 and eth1, in the order > in which they are recognized by the bios. > It doesn't make sense if those new cards become eth2 and eth3 > because the old, non-existing NICs are listed in the rules file > with > their MACs. > > So how can we prevent this? Why was the FORCE_PERSISTENT_NAMES option > removed? > > Persistent device names might be nice for laptops with wlan or usb > network devices. > For our site with 120 PCs and Servers with it's bad because I can't > care about 120 > rules file to make sure they all are always ok before the next boot. I > just want to > get rid of the feature :-) This is the standard recommendation from the debian irc channel. You may need to modify just how much of the mac address you keep and how much you wildcard. Note that there may be a more appropriate technique, this just leapt to mind. ---------------------------------------- dpkg(~dpkg@dpkg.bot.oftc.net)] forcedeth is probably the open-source nVidia Ethernet driver, for nForce motherboards. Found in 2.4.23 and later kernels. Ask me about . See also , . [msg(dpkg)] forcedeth mac [dpkg(~dpkg@dpkg.bot.oftc.net)] If you're using the driver and your network card keeps changing its name each time (eth0, then eth1, then eth2, etc), edit /etc/udev/rules.d/70-persistent-net.rules (Lenny) or /etc/udev/rules.d/z25_persistent-net.rules (Etch), remove all but one entry, and replace the MAC address with "00:00:6c:*". See also . Karl Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein