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

Re: eth0 - eth1 confusion vs. local network



In <[🔎] 20100210084608.GU14264@think.homelan>, Andrei Popescu wrote:
>On Tue,09.Feb.10, 23:06:08, Stan Hoeppner wrote:
>> I don't know anything about these scripts.  When do they run?

Udev is a daemon, started fairly early in the boot process.  It communicates 
with the kernel.  It evaluates the rules each time the kernel notifies it of 
new hardware.

Udev may not be a panacea, but it is better than a static /dev (what we had in 
the bad old days) or even devfs (which the administrator couldn't really 
control).  They assigned persistent names to devices only because the kernel 
hardware probing was synchronous and slow.  Of course, that didn't prevent a 
USB key from turning into /dev/hda if you booted with it inserted.

Once the 2.6 line introduced asynchronous hardware probing, something like 
udev was critically needed.  It allows the user to assign persistent names 
based on attributes the kernel detects, in a fairly generic fashion.  For the 
most part it is devfs compatible, since in the absence of rule it uses the 
"kernel device name".  Most of the problems blamed on udev are not because of 
udev, but rather because of changes in the way the kernel probes hardware -- 
which changes the order devices are discovered in.  If you were using devfs or 
static /dev you would experience the same "name-changing" behavior, you just 
couldn't fix it without a kernel patch.

>> And are
>> they supposed to pin a mac addr to eth* name?  That obviously didn't work
>> if that's the case.  Both these NICs have hard MAC addresses, as is
>> required by the 802 standard for any add-in ethernet card.  It seems clear
>> that the cause of the UDEV device naming problem was me swapping cards
>> around.
>
>Yes, the rule is supposed to pin by MAC. There were some issues with
>built-in nvidia adapters which had a different MAC on each reboot (some
>firmware bug, but I might be wrong)

I had this issue (maybe still have).  I have /etc/network/interfaces set my 
MAC addresses as the interfaces are brought up, as otherwise the hardware 
reports invalid MACs and the kernel randomizes them.  I have my own udev rules 
that use names based on PCI address.

I remember I got up to eth8/9 before I figured out how to fix it.

Using the MAC addresses seems like a good solution most of the time.  It does 
normally mean that replacing a NIC results in a new name, but it handles the 
case of PCMCIA / USB / Bluetooth NICs quite well.
-- 
Boyd Stephen Smith Jr.                   ,= ,-_-. =.
bss@iguanasuicide.net                   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'
http://iguanasuicide.net/                    \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: