Bug 192084 - eth0 and eth1 are confused
Summary: eth0 and eth1 are confused
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: udev
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-17 14:51 UTC by Martin Wyser
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-06-01 11:00:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Martin Wyser 2006-05-17 14:51:29 UTC
Description of problem: eth0 and eth1 are confused.


Version-Release number of selected component (if applicable): udev-084-13


Steps to Reproduce:
1. Machine with two Ethernet interfaces x and y, onboot=no
2. Some order in /etc/modprobe.conf (alias eth0 x-driver ...)
3. Boot, interfaces are now down, but drivers are already loaded (that is order
of eth-names is already fixed!).
4. ifup ethx
  
Actual results:

eth-y comes up if udev (by chance) loaded drivers in another order than given in
modprobe.conf


Expected results:

eth-x up, udev should respect order in modprobe.conf.

Additional info:

Comment 1 Stefan Neufeind 2006-05-30 14:22:44 UTC
For me eth0 (fixed) and eth1 (wirerless) are also loaded in the wrong order -
not as defined in modprobe.conf. Is a "dirty quickfix" possible somehow?

Comment 2 Stefan Neufeind 2006-05-30 14:51:57 UTC
Load-order can be fixed with udev-rules. That helped me out:
http://wiki.archlinux.org/index.php/Udev#Mixed_Up_Devices.2C_Sound.2FNetwork_Cards_Changing_Order_Each_Boot

Though I think this bug is still valid (should honour modprobe.conf-information)
this works for now.

Comment 3 Harald Hoyer 2006-05-31 12:55:37 UTC
I would bind the interface name to the MAC Address.. Either with
system-config-network or by hand with the HWADDR parameter.

Comment 4 Martin Wyser 2006-05-31 15:02:23 UTC
Both interfaces are down, and "ifup eth0" causes eth1 to come up, and eth0 to
stay down - this is definitely a bug.

You probably mean setting HWADDR=... in
/etc/sysconfig/network-scripts/ifcfg-eth*, by hand or with
system-config-network.  But this method will set the HWADDR of the interface,
and will not influence the order in which the interfaces are named!  In fact, in
the initial installation, the configuration was like this, and a 3com and an
Intel interface would come up with HWADDRs swapped - very confusing, but most
importantly, does not work reliably. The word "bind" is ambiguous here.

I tried using netdev= kernel parameters, but this did not work.  I also tried
the /etc/udev/rules.d/10-network.rules implied by the archlinux wiki link
(thanks Stefan), but to no avail.  I have not tried the MODULES method, due to
lack of rc.conf.

I am not quite sure if the bug is in udev, but I am sure it is a bug.

Comment 5 Harald Hoyer 2006-06-01 11:00:33 UTC
if "binding" does not work, then initscripts are to be blamed. This worked in
FC3, FC4 and I am pretty sure, it should work in FC5 also.

Comment 6 ginn wang 2006-06-02 07:26:06 UTC
(In reply to comment #4)
> Both interfaces are down, and "ifup eth0" causes eth1 to come up, and eth0 to
> stay down - this is definitely a bug.
> You probably mean setting HWADDR=... in
> /etc/sysconfig/network-scripts/ifcfg-eth*, by hand or with
> system-config-network.  But this method will set the HWADDR of the interface,
> and will not influence the order in which the interfaces are named!  In fact, 
in
> the initial installation, the configuration was like this, and a 3com and an
> Intel interface would come up with HWADDRs swapped - very confusing, but most
> importantly, does not work reliably. The word "bind" is ambiguous here.
> I tried using netdev= kernel parameters, but this did not work.  I also tried
> the /etc/udev/rules.d/10-network.rules implied by the archlinux wiki link
> (thanks Stefan), but to no avail.  I have not tried the MODULES method, due to
> lack of rc.conf.
> I am not quite sure if the bug is in udev, but I am sure it is a bug.

try this rule 
SUBSYSTEM=="pci", SYSFS{class}=="0x020000",             OPTIONS="ignore_device"
in /etc/udev/rules.d/10-local.rules

Comment 7 Martin Wyser 2006-06-06 14:54:36 UTC
Yes, this works, thanks Ginn.

These solutions worked for me (different cards have different drivers):

1. probe driver for eth0 in rc.sysinit before udev is started
2. have udev ignore network cards (ifup will probe in right order)
3. use netdev=irq,io,eth0 and netdev=...,eth1 kernel parameters
4. HWADDR in ifcfg-eth...

3. and 4. will probably also work if the different cards use the same driver.

I have at least one machine where I cannot predict what eth0 and eth1 will be,
unless one of the methods above is used.  But if Harald thinks this is not a
bug, I won't spend more time.


Note You need to log in before you can comment on or make changes to this bug.