[nSLUG] NIC detection order

Peter Cordes peter at llama.nslug.ns.ca
Thu Jan 15 20:20:16 AST 2004

 I have two tulip NICs in one machine, which are detected as eth0 and eth1.
(One is an old Cogent EM100 tulip that I can't change without telling
eastlink the new MAC address, and one is a new ADMtek Comet-based Linksys
(NC100), which does a better job at autonegotiation.   I used to have two
Cogent cards in the machine, but I replaced one with the new NIC, and
shuffled around my PCI cards for better airflow.)

 I want them to be detected in the other order, but I don't want to put
them in different PCI slots.  They use the same driver module, so I can't
control it by loading one or the other first.

 I thought I remembered seeing a mention of a tool that could rename an
interface, so you could do  ethsomething rename eth0 eth2, etc.  I can't
find anything of the sort.

 Ideas?  Do I have to hack the code to do the detecting in the reverse order?

In the kernel code, dev_alloc_name gets a mask which can include %d or not,
I haven't yet figured out if ethernet driver modules can be convinced to
pass a given string, like eth1, rather than eth%d, to it.  If they passed a
user-supplied string, it would work (or fail if the name was taken)...


#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter at cor , des.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BC

More information about the nSLUG mailing list