[Techtalk] NIC modules under Debian

Maria Blackmore mariab at cats.meow.at
Wed Mar 12 16:34:00 EST 2003


On Wed, 12 Mar 2003, Hamster wrote:

> Hello!

Hi :)

> In one machine I have three networking cards. 
> 
> Under RedHat/Mdk I can specify aliases to those cards in /etc/modules.conf in
> the format of:
> 
> alias eth0 tulip
> alias eth1 3c59x
> alias eth2 epic100

fair enough

> Under debian, I have used (as per instructions) the file /etc/modules to tell
> deb to load those three modules, which it is doing perfectly. The file simply
> looks like: (/etc/modules)
> 
> tulip
> 3c59x
> epic100

mm, hmm, pretty normal, but you won't need this :)

> However in deb, it appears to be assigning the ethX aliases in the order in
> which it scans the cards upon boot. (or something along those lines)

the aliases aren't being assigned ..., aliases are assigned by a human
bean, you are right that the devices are being assigned to the cards in
the order that the PCI bus is scanned

> Is there anyway of telling deb that I want eth0 to be the tulip, eth1 the 3com
> etc??? In other words, is there a deb equivalent to the "alias" command
> available under RH/Mdk? I tried re-ordering the listing in/etc/modules, but
> that didnt seem to have any effect.

What you need to do is create a file called /etc/modutils/network

in that file, put this :-


----- cut here -----
alias eth0 tulip
alias eth1 3c59x
alias eth2 epic100
----- cut here -----

write the file (as root) 

next, remove the tulip, 3c59x, epic100 lines from /etc/modules and then
run (again as root) update-modules the update-modules utility will
regenerate the /etc/modules.conf file with the correct entries.

hey presto, your network interfaces will once again be in the correct
places :)

You'll need to stop all the networking with "/etc/init.d/networking stop",
unload the modules, then run "/etc/init.d/networking start" to make it
take effect.  You can also do it on a per interface basis with ifup(8) and
ifdown(8).

you don't need to force the modules to be loaded, since that will happen
automagically as the network interfaces are brought up with the info from
/etc/network/interfaces

tada!

have fun :)

Maria



More information about the Techtalk mailing list