Re: How are device names assigned to eth devices?



Allen McIntosh <nospam@xxxxxxxxxxxxxxxx> writes:

Unruh wrote:
[trouble getting the ifname<-> hardware mapping right]
Never knew about iftab.
What progam uses it?
I had ifcfg-eth0 set up exactly the same as on the working ifcfg-eth2.
(except different eth devices of course).

What I'm going to say describes recent RedHat/Fedora systems. I haven't
used Mandriva in a while. That said, it's enough like Fedora that this
may be relevant.

I know of three ways under Fedora to try to influence the
ifname<->hardware mapping:
1) aliases in /etc/modprobe.conf (formerly modules.conf etc.)
2) /etc/iftab
3) HWADDR=FE:ED:BE:EF:00:00 in the individual startup scripts.

Of late I've found (1) to be less than reliable. In general when I have
had a system that tried to use more than one of these methods (usually
due to my ignorance of what the install scripts had done behind my back)
the result was a mess. That include symptoms like Bill's - i.e. can't
assign a device to eth0, but works fine on eth2. My current preference
is alternative (3). Just watch out for the links if you edit the files
manually.

An additional "feature" on Mandriva. I had by accident put in both an
eth131x.ko and eth131x.ko.gz file. It refused to bring up the driver ( not
surprosing) but when I looked into /etc/modprobe.conf, I found it had
changed
alias eth2 eth131x
to
alias eth2 unknown
which of course meant that even after I fixed the double module problem ,
modprobe eth2 still did not work.
(And never would have) Now what changed that line I have no idea.

.