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

Re: Re: Controlling eth0,eth1,... assignment order?



The solution given below has been working for some time now, until udev
0.085-1 from Feb 19 was installed. Then the behaviour is wrong again,
eth0 is associated to the 8139too driver and eth1 is associated to the
3c59x driver. What has changed in the udev functionality? The
file /etc/udev/static-nic.rules linked
to /etc/udev/rules.d/025_static-nic.rules does not seem to be run at
startup anymore :-( This issue should probably be an FAQ by now. Any
pointers??

Thanks,
Svante

On Tue, 2006-01-03 at 12:10 +0100, Svante Signell wrote:
> Thank you for your advice and scripts. 
...
>  On
> the desktop I have packet filtering and the rules are depending on the
> interface names, eth0 external I/F and eth1 internal I/F.
> 
> > On Fri, 30 Dec 2005 00:52:26 +0100
> > Svante Signell <svante.signell@telia.com> wrote:
> > 
> > > With the new way of device creation and module loading (udev, discover
> > > etc) my ethernet modules (3c59x,8139too) are loaded in different order
> > > with kernels 2.6.12 and 2.6.14. For 2.6.14 3c59x is loaded first
> > > corresponding to eth0 and then 8139too corresponding to eth1. With
> > > kernel 2.6.12 they are loaded in reverse order, giving the wrong names
> > > on my interfaces, and the interfaces defined in /etc/network/interfaces
> > > becomes wrong. How to bind modules to eth interface numbers? Any hints
> > > on which of the /etc/modules, /etc/modules.conf etc should be used, and
> > > which are obsolete?
> > 
> > An explanation I saw in another post explained that with newer kernels
> > in Debian hardware is initialized asynchronously so you never know which
> > card will become eth0 and which eth1 and this matches what I
> > experienced with my cards. 
> > 
...
> > 
> > If you need a specific card to be eth0 or eth1 (in my case firestarter
> > requires this) then instead of the above you would create a udev rule.
> > 
> > Based on previous posts on the list I created a file in /etc/udev/
> > named static-nic.rules with the contents:
> > 
> > # /etc/udev/static-nic.rules
> > #
> > # Set permission to 0644  'chmod 0644 static-nic.rules', then symlink
> > #'ln -s static-nic.rules rules.d/025_static-nic.rules'
> > #
> > # Purpose:
> > # Mapping specific MAC address to specific device names for cases where
> > #  that is expected.
> > #
> > # SYSFS{address}="MAC address" - MAC address should be the machine
> > # address of the network card the rule is for.
> > #
> > # NAME="name" - name is the device name you want used for the interface.
> > # These could be standard names eth0, wlan0, etc... or if you prefer
> > # something more descriptive lan, internet, wireless, whatever...
> > 
> > KERNEL="eth*", SYSFS{address}="00:00:00:00:00:00", NAME="eth0"
> > KERNEL="eth*", SYSFS{address}="11:11:11:11:11:11", NAME="eth1"
> > 
> > #end
> > 
> > : This way eth0 is always mapped to my wireless card and eth1 is always
> > mapped to my ethernet card.
> > 
> > Later, Seeker
> > 
> > 



Reply to: