I''m building routers. It''s difficult to tell in advance which NIC will be assigned eth0 and which will assigned eth1 when using two NICs. Ping testing usually clears up this simple problem. The identification problem gets worse when adding a third NIC, after sorting out the first two NICs. Frequently the eth0 or eth1 assignments for the first two NICs change. Of course adding a fourth and fifth NIC multiplies the identification problem. Yes, some of my routers are supporting five network segments. My question is, what''s the algorithm for assigning Ethernet designations? I know it not placement order in the PCI bus, and I know its not the NIC data-link address. So what is it? Thanks ...John -- John Telford - Owner JohnTelford.com LLC 503-292-6865 - fax:503-292-3094 john@johntelford.com - www.johntelford.com
On Tue, 9 Jul 2002, John Telford wrote:> I''m building routers. It''s difficult to tell in advance which NIC will > be assigned eth0 and which will assigned eth1 when using two NICs. Ping > testing usually clears up this simple problem. > > The identification problem gets worse when adding a third NIC, after > sorting out the first two NICs. Frequently the eth0 or eth1 assignments > for the first two NICs change. > > Of course adding a fourth and fifth NIC multiplies the identification > problem. Yes, some of my routers are supporting five network segments. > > My question is, what''s the algorithm for assigning Ethernet > designations? I know it not placement order in the PCI bus, and I know > its not the NIC data-link address. > > So what is it?Almost random. However, there''s some evidence to suggest: order of probing of device drivers order of I/O addresses Unfortunately, in systems with identical cards that are configured using plug-and-play methods such as those used by PCI random is the best shot you have... Doei, Arthur. -- /\ / | arthurvl@sci.kun.nl | Work like you don''t need the money /__\ / | A friend is someone with whom | Love like you have never been hurt / \/__ | you can dare to be yourself | Dance like there''s nobody watching
Arthur van Leeuwen wrote:>Unfortunately, in systems with identical cards that are configured using >plug-and-play methods such as those used by PCI random is the best shot you >have... > >''Deterministic'' is more accurate. It seems to be random, on first boot. But it will almost never change after that unless you make hardware changes, in my experience. -- Michael T. Babcock CTO, FibreSpeed Ltd.
On Tue, 9 Jul 2002, Michael T. Babcock wrote:> Arthur van Leeuwen wrote: > > >Unfortunately, in systems with identical cards that are configured using > >plug-and-play methods such as those used by PCI random is the best shot you > >have... > > > > > ''Deterministic'' is more accurate. It seems to be random, on first boot. > But it will almost never change after that unless you make hardware > changes, in my experience.Not in mine. Every time the PCI bus settings (can''t recall the name right now, have been playing with a fixed hardware platform for quite a while) get reset there will probably be a different assignation. Yeah, it''ll probably be deterministic *somehow*, but you''ll be hard pressed to come up with any rules. Doei, Arthur. -- /\ / | arthurvl@sci.kun.nl | Work like you don''t need the money /__\ / | A friend is someone with whom | Love like you have never been hurt / \/__ | you can dare to be yourself | Dance like there''s nobody watching
On Tue, Jul 09, 2002 at 02:14:05PM -0700, John Telford wrote:> I''m building routers. It''s difficult to tell in advance which NIC will > be assigned eth0 and which will assigned eth1 when using two NICs. Ping > testing usually clears up this simple problem. > > The identification problem gets worse when adding a third NIC, after > sorting out the first two NICs. Frequently the eth0 or eth1 assignments > for the first two NICs change.There are tricks to configure based on the MAC address of your interface instead of on its place in the probe. Perhaps googling on that will help. Regards, bert -- http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
Thus spake bert hubert:> On Tue, Jul 09, 2002 at 02:14:05PM -0700, John Telford wrote: > > I''m building routers. It''s difficult to tell in advance which NIC will > > be assigned eth0 and which will assigned eth1 when using two NICs. Ping > > testing usually clears up this simple problem. > > > > The identification problem gets worse when adding a third NIC, after > > sorting out the first two NICs. Frequently the eth0 or eth1 assignments > > for the first two NICs change. > > There are tricks to configure based on the MAC address of your interface > instead of on its place in the probe. Perhaps googling on that will help.A script to rename interfaces with "ip link ... set name ..." after modprobe according to their hw addresses should suffice. I never tried this because in my experience order of detection was always consistant between reboots assuming there are no hardware chasnges.
On Wed, Jul 10, 2002 at 04:38:55PM +0400, Vladimir B. Savkin wrote:> A script to rename interfaces with "ip link ... set name ..." after > modprobe according to their hw addresses should suffice. > > I never tried this because in my experience order of detection was always > consistant between reboots assuming there are no hardware chasnges.If you turn on APIC you are in for a surprise I gather :-) Regards, bert -- http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk http://lartc.org Linux Advanced Routing & Traffic Control HOWTO