[techtalk] Numbering of eth

Magni Onsoien magnio+lc-techtalk at pvv.ntnu.no
Wed Jul 18 14:28:08 EST 2001


Just a very quick question before I rush out to replace a firewall: My
workmate says that he is pretty sure that the network interfaces under
Linux used to be numbered (by linux) due to their ethernet address, i.e.
lowest mad-address became eth0, next one eth1 etc.

However, I have a server with 3 3c59x cards in, and the one in the first
(uppermost when counted from top of motherboard) PCI slot is eth0, the
next one eth1 and the lowest one eth2. Strange (?) thing is that this is
so even though the mac addresses are opposite - lowest mac address is
eth2, highest eth0.

My mate is a bit confused, but my idea is that this is a) because I have
Linux 2.4.3 and this kernel numbers the interfaces due to what slot they
are in, b) because this is PCI and not ISA and then any kernel numbers
them due to PCI slot and c) randomness in moon shadow.

This is very reproducable so I KNOW it's correct on this server now, the
reason why I ask is that IF this bloody firewall doesn't work I might
have to put in the old one, with a 2.0 kernel and ipfwadm. Then it's
kind of essensial that the numbering of the interfaces is right..
So, can I rely on even the 2.0-kernel to number them correctly (due to
PCI slot number, not by increasing mac address), or should I be prepared
for numbering by increasing mac addresses?



Magni, with a really bad feeling to day :(
-- 
sash is very good for you.




More information about the Techtalk mailing list