Re: Editing udev rules Was: More on Re: Really changing the hostname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, 15 Feb 2013, Les Mikesell wrote:

> On Fri, Feb 15, 2013 at 2:09 PM,  <me@xxxxxxxxxx> wrote:
>>>
>>> Oh, and if you're changing the MAC, don't forget, as of CentOS 6, to edit
>>> /etc/udev/rules.d/70-persistent-net.rules. If you don't, you're hosed.
>>
>> That has not been my experience? We have a bunch of mini-itx machines with
>> realtek cards in them that have a high failure rate. I have been swapping
>> them for intel cards. I have never messed with the udev rules. All I do is
>> edit the HWADDR line in /etc/sysconfig/network-scripts/ifcfg-eth* to show the
>> new MAC. I then shutdown the machine, replace the NIC and restart.
>>
>> These are headless C-6 machines built from a ks.cfg file. Metworkmangler
>> never gets installed.
>>
>> What is messing with udev rules supposed to be necessary?
>
> You should have a line in /etc/udev/rules.d/70-persistent-net.rules
> that associates the MAC address with the eth? name for each of your
> NICs.   Certain things (like removing the file, and maybe some
> hardware changes) will make it be reconstructed during boot and if you
> only have one NIC you wouldn't have much chance of it being wrong.
> But, if the name set there doesn't match the name of the
> /etc/sysconfig/network-scripts/ifcfg-eth* file with the correct MAC
> address, that interface should not start.

Empirical evidence seems to suggest that if the correct udev entry is missing
udev will create the entry on its own.

FWIW, the cards I am changing out have 3 ports on them
and again after doing 15 of these, I have never messed with udev.

I did not even know about this "problem" until I read about it on this list.

Interestingly enough, I just looked at the udev file and it contains not only
the new mac addresses but also the old ones.

For example the entries for eth1 looks like the following:

# PCI device 0x10ec:0x8167 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:18:a9:e4:ad", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x1076 (e1000) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:18:a4:eb:d0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

I did not put any of these entries in there and I wonder what
"external tool" is providing the "custom name"?

Is there anyone here who actually knows how this is supposed to work?

Regards,

-- 
Tom			me@xxxxxxxxxx		Spamtrap address	 		me123@xxxxxxxxxx
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux