FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-31-2011, 06:36 AM
Matt Richardson
 
Default dreaded ethernet device renaming

On Wed, Mar 30, 2011 at 9:23 PM, <briand@aracnet.com> wrote:
> I mean really, why does the system still do stupid sh*t like this.
>
> *renamed network interface eth0 to eth3
>
> Why oh why ! *It was already eth0, what possible reason could it have
> to go rename it.
>
> oh and by the way, just to be maximally annoying, it most certainly
> decieds to name it something else every once in a while...
>
> Regardless, here's my udev line which does NOT work.
>
> KERNEL=="eth*",SUBSYSTEM=="net",ATTR{address}=="ma caddress",NAME="eth0"
>
> I've triple-checked the mac address.
>
> Nor does the instructions in the wiki page work:
>
> KERNEL==”eth*”, SYSFS{address}==”00:12:34:fe:dc:ba”, NAME=”eth0″
>


This works on a Dell PowerEdge 2950 that presents the network
interfaces to the OS backwards:

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:11:22:33:44:55", NAME="eth0"

The syntax you used worked for me with Lenny, but udev changes in
Squeeze need this syntax.

--
Matt


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTinkiyDurXkk1BWPZXCcMjE3xDL_yzXNiRTN4FpR@mail .gmail.com">http://lists.debian.org/AANLkTinkiyDurXkk1BWPZXCcMjE3xDL_yzXNiRTN4FpR@mail .gmail.com
 
Old 03-31-2011, 08:37 AM
David Goodenough
 
Default dreaded ethernet device renaming

On Thursday 31 March 2011, briand@aracnet.com wrote:
> I mean really, why does the system still do stupid sh*t like this.
>
> renamed network interface eth0 to eth3
>
> Why oh why ! It was already eth0, what possible reason could it have
> to go rename it.
>
> oh and by the way, just to be maximally annoying, it most certainly
> decieds to name it something else every once in a while...
>
> Regardless, here's my udev line which does NOT work.
>
> KERNEL=="eth*",SUBSYSTEM=="net",ATTR{address}=="ma caddress",NAME="eth0"
>
> I've triple-checked the mac address.
>
> Nor does the instructions in the wiki page work:
>
> KERNEL==”eth*”, SYSFS{address}==”00:12:34:fe:dc:ba”, NAME=”eth0″
>
> SYSFS is wrong...
> My guess is that NAME doesn't work either, but I can't figure out what
> to use in it's place
>
> Could some kind soul put me on the path to enlightenment ?
>
> Thank you,
>
> Brian
have a look at /etc/udev/rules.d/70-persistent-net.rules. This file
tries to make sure that network adapters are always named in the same
way in whatever order they are started. The problem comes when you replace a
network adapter. To get the system to accept the new adapter as the original
simply remove this file and reboot. Udev will then recreate the file using
the now installed adapters.

David


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201103310937.57099.david.goodenough@btconnect.com" >http://lists.debian.org/201103310937.57099.david.goodenough@btconnect.com
 
Old 03-31-2011, 11:00 AM
Stephen Powell
 
Default dreaded ethernet device renaming

On Thu, 31 Mar 2011 04:37:57 -0400 (EDT), David Goodenough wrote:
> have a look at /etc/udev/rules.d/70-persistent-net.rules. This file
> tries to make sure that network adapters are always named in the same
> way in whatever order they are started. The problem comes when you replace a
> network adapter. To get the system to accept the new adapter as the original
> simply remove this file and reboot. Udev will then recreate the file using
> the now installed adapters.

That works fine on machines that have only one network adapter (not counting lo).
But if your machine has more than one network adapter, it is a good idea to
rename the file, rather than erase it. Make sure the new version of the
file does not end in .rules, so that it won't take effect. After a
shutdown and reboot, a new version of /etc/udev/rules.d/70-persistent-net.rules
will be generated. You can then compare the old version of the file with
the new version of the file and figure out which MAC address was replaced
with which MAC address. Then, edit the old version of the file and
change the old MAC address to the new MAC address. Save the changes,
exit the editor, erase the new version of the file (the one you didn't
edit), rename the old version of the file to the production name, shutdown
and reboot. The new network adapter will now have the interface name of
the old adapter.

--
.'`. Stephen Powell
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 784722820.1842838.1301569205778.JavaMail.root@md01 .wow.synacor.com">http://lists.debian.org/784722820.1842838.1301569205778.JavaMail.root@md01 .wow.synacor.com
 
Old 03-31-2011, 02:34 PM
 
Default dreaded ethernet device renaming

On Thu, 31 Mar 2011 07:00:05 -0400 (EDT)
Stephen Powell <zlinuxman@wowway.com> wrote:

> On Thu, 31 Mar 2011 04:37:57 -0400 (EDT), David Goodenough wrote:
> > have a look at /etc/udev/rules.d/70-persistent-net.rules. This file
> > tries to make sure that network adapters are always named in the
> > same way in whatever order they are started. The problem comes
> > when you replace a network adapter. To get the system to accept
> > the new adapter as the original simply remove this file and
> > reboot. Udev will then recreate the file using the now installed
> > adapters.
>
> That works fine on machines that have only one network adapter (not
> counting lo). But if your machine has more than one network adapter,
> it is a good idea to rename the file, rather than erase it. Make
> sure the new version of the file does not end in .rules, so that it
> won't take effect. After a shutdown and reboot, a new version
> of /etc/udev/rules.d/70-persistent-net.rules will be generated. You
> can then compare the old version of the file with the new version of
> the file and figure out which MAC address was replaced with which MAC
> address. Then, edit the old version of the file and change the old
> MAC address to the new MAC address. Save the changes, exit the
> editor, erase the new version of the file (the one you didn't edit),
> rename the old version of the file to the production name, shutdown
> and reboot. The new network adapter will now have the interface name
> of the old adapter.
>

Thanks to everyone who responded !

That explains everything. I changed motherboards out from under the
system. So it appended the new eth to the old ones.

It seems to me that this is a really ugly user trap, even if it's a
trap you get into replacing the old motherboard.

Brian


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110331073432.7823fafb@windy.deldotd.com">http://lists.debian.org/20110331073432.7823fafb@windy.deldotd.com
 
Old 04-01-2011, 12:06 AM
Stephen Powell
 
Default dreaded ethernet device renaming

On Thu, 31 Mar 2011 10:34:32 -0400 (EDT), briand@aracnet.com wrote:
>
> Thanks to everyone who responded !
>
> That explains everything. I changed motherboards out from under the
> system. So it appended the new eth to the old ones.
>
> It seems to me that this is a really ugly user trap, even if it's a
> trap you get into replacing the old motherboard.

Yes, if the motherboard contains a built-in network interface, as
many of them do, then replacing the motherboard has the same effect
on network interface name assignments as if you had replaced a NIC card.
The built-in network interface has a different MAC address than the old
one, and that's how udev assigns interface names: by MAC address. You
can get rid of your home-made udev rule. This can also occur if you
(1) move the hard drive from one machine to another, (2) backup from
one computer and restore to another, etc. It seems that everyone
gets burned by this at least once. But once you find the solution,
you never forget it.

--
.'`. Stephen Powell
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1138274593.1862612.1301616411202.JavaMail.root@md0 1.wow.synacor.com">http://lists.debian.org/1138274593.1862612.1301616411202.JavaMail.root@md0 1.wow.synacor.com
 
Old 04-01-2011, 02:39 AM
 
Default dreaded ethernet device renaming

On Thu, 31 Mar 2011 20:06:51 -0400 (EDT)
Stephen Powell <zlinuxman@wowway.com> wrote:

> On Thu, 31 Mar 2011 10:34:32 -0400 (EDT), briand@aracnet.com wrote:
> >
> > Thanks to everyone who responded !
> >
> > That explains everything. I changed motherboards out from under the
> > system. So it appended the new eth to the old ones.
> >
> > It seems to me that this is a really ugly user trap, even if it's a
> > trap you get into replacing the old motherboard.
>
> Yes, if the motherboard contains a built-in network interface, as
> many of them do, then replacing the motherboard has the same effect
> on network interface name assignments as if you had replaced a NIC
> card. The built-in network interface has a different MAC address than
> the old one, and that's how udev assigns interface names: by MAC
> address. You can get rid of your home-made udev rule. This can also
> occur if you (1) move the hard drive from one machine to another, (2)
> backup from one computer and restore to another, etc. It seems that
> everyone gets burned by this at least once. But once you find the
> solution, you never forget it.
>

lol, that's for sure !

Brian


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110331193940.51a24543@windy.deldotd.com">http://lists.debian.org/20110331193940.51a24543@windy.deldotd.com
 

Thread Tools




All times are GMT. The time now is 01:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org