omfg! (eth0 becomes eth1, eth1 become eth2 and eth2 becomes eth0!!?!)

ME dugan at passwall.com
Mon Nov 5 00:52:47 PST 2001


On Mon, 5 Nov 2001, Jake wrote:
> So I finally (i hope) found where eth0, eth1, eth2 can be changed into other
> devices, however eth0 is tulip and so is eth1? How can those be the same
> devices?

Not the same devices, but the same driver. (tulip)

> Is there any other  place that has configuration files for setting up the
> alias of eth0 => hardware?

Yep.

One place is /etc/lilo.conf (and then running it) with an append
directive. You can explicitly tell the kernel what ethernet interfaces
reside on what physical interface based on IRQ and IO like:
append="ether=5,0x240,eth00 ether=3,0x260,eth1 ether=2,0x300,eth2" where
there are 3 arguements for each "ether" atatement. Multiple "ether="
statements are fine so long as the last arg for each is unique. First arg
to the ether= is the IRQ, the second is the io port in hex, and the last
is the interface name. include as many as you have interfaces. (The
arguements you would use would of course map to your cards, and would
likely not be the same as the above.)

Other places? When you load the module, you can often specify the io port
and irq for which one should be first assigned, but I dont generally use
this method - instead opting for the lilo.conf method. (The lilo.conf
method also seems to work with LOAADLIN.EXE btw)

It is a good idea to see what you can do about PnP devices (esp PCI) to
lock their resources down and not let them change. The risk of course is
obvious. One place to do this is in some config tools (often run in DOS
from a DOS boot floppy) or with your motherboard (not all support this
kind of resource locking.)

Yet another method (I have not played with since I generally compile my
own kernels with the ethernet driver's as built-in and need the lilo
method anyway) would be to modify your /etc/modules.conf:

-
options tulip io=0x260,0x240 irq=5,3
-

where the first io and first irq map to the first eth of that driver type,
and the second io and irq map to the next eth.
(You wuld of course need your own resources assigned - likely not the same
as the above... _

Not being explicit with every single device, and using different drivers
may lead to unpredictable results. From experience (not docs here) I
notice on-board/integrated PCI ethernet adapters found first and assigned
to eth0, and then other on-board pci cards based on bus/slot location in
sequence (often top to bottom or bottom to top or left to right or right
to left however you have your board placed) and then EISA registered PnP
devices and last ISA devices (not touching/mentioning of VLB, MCA, etc).
This is probably (likely) not a reliable universal rule. I would not rely
upon it for my servers.

> How could I have done this?

Not sure.

Could be a PnP issue with resources having migrated between boots. Could
be some changes made to modules.conf by another application. I don't play
with redhat much so I dont have a complete idea on what kinds of thins
play with your modules, loading and config files in use.

Maybe buggy board for resource probing and priority. (? not likely)

Adding new devices could cause a change in assigned PnP resources.

Others here may have more suggestions.

-ME

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++ 
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ !PGP
t at -(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html
     Systems Department Operating Systems Analyst for the SSU Library




More information about the talk mailing list