Re: Loading eth1 module before eth0 ?

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

 



On Wed, Jan 24, 2001 at 10:33:42AM -0500, Paul Gortmaker wrote:
> > Nothing more precise ?
> 
> The general idea IIRC, was that selecting a particular card based on the
> name ethN would never be reliable - consider the case where you have
> three of the same cards - so
> 
> alias eth0 eepro100
> alias eth1 eepro100
> alias eth2 eepro100
> 
> and you do modprobe eth1 - which physical card is now eth1?  To ensure 
> you get the same card, even after physically adding or removing other
> cards, the best bet is to go by the unique hardware address of each card,
> and use that to assign the network parameters.  You can get the hwaddr
> from ifconfig and parse it with awk/sed/whatever, or use a small bit of
> code to be used from within your scripts - e.g.

> /*
>  *	Prints out hardware address of supplied "ethN" interfaces.
>  *	Compile: gcc -s -Wall hwaddr.c -o hwaddr
>  *	Usage: hwaddr eth0 [eth1 eth2 eth3 ...]
>  */


While searching, I came upon nameif.c at
ftp://ftp.firstfloor.org:/pub/ak/smallsrc/ (hm, does not answer right now,
but did 2 days ago).

Did not look at it, but according to the description made on the list (ie.
change the iface so that we know which MAC corresponds to which iface), it
looks helpful to solve the problem.

Using ifupdown, we should just have to specify in pre-up commands for a
particular iface "modprobe ethN" followed by "nameif whatever its arguments
are".

This could even possibly be made part of ifupdown itself, so that we can
always be sure there is no problem.

What do you think ?
-- 
Yann Dirson    <ydirson@altern.org> |    Why make M$-Bill richer & richer ?
debian-email:   <dirson@debian.org> |   Support Debian GNU/Linux:
                                    | Cheaper, more Powerful, more Stable !
http://ydirson.free.fr/             | Check <http://www.debian.org/>
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux