[techtalk] Numbering of eth

Brian Sweeney bsweeney at physics.ucsb.edu
Wed Jul 18 12:28:06 EST 2001


Also, if you're saucy enough to load everything in modules (which you should
be doing, 'cause you can),  you can control what numbers are assigned by
what order you load the modules in if you're doing it manually.  Or, I
believe if you change the (in RedHat, at least) modules.conf aliases of ethx
to point to whatever drivers you're interested in, that'll do it as well.
But I'm not sure on that one; it's theory, not practice.

Good luck on the firewall front; I've just completed the creation of a gig
firewall here with 2 interfaces using iptables and 2.4.6.  Seems to work
well so far...

-Brian

> -----Original Message-----
> From: techtalk-admin at linuxchix.org
> [mailto:techtalk-admin at linuxchix.org]On Behalf Of Malcolm Tredinnick
> Sent: Wednesday, July 18, 2001 6:39 AM
> To: techtalk at linuxchix.org
> Subject: Re: [techtalk] Numbering of eth
>
>
> On Wed, Jul 18, 2001 at 02:28:08PM +0200, Magni Onsoien wrote:
> > 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.
>
> No, this is not correct. It numbers them in the order they are detected,
> which is more low-level hardware stuff. I can't be more concrete than
> that because it's all a mystery to me down at that level.
>
> > 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.
>
> Your item (c) has a lot to do with it, in practice. :-)
>
> > 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?
>
> I'm not really sure what your concern is here. The ordering is
> deterministic: that is, from reboot to reboot, it will stay the same. So
> why can't you boot the box once, look at which ethernet card gets which
> ethX value and then away you go? You generally only deal with an
> ethernet card as ethX at startup. Once they have IP numbers assigned you
> can use those and forget their interface names. So even if they come up
> in a different order, it shouldn't be that big a deal, should it?
>
> Cheers,
> Malcolm
>
> --
> Bills travel through the mail at twice the speed of cheques.
>
> _______________________________________________
> techtalk mailing list
> techtalk at linuxchix.org
> http://www.linux.org.uk/mailman/listinfo/techtalk
>





More information about the Techtalk mailing list