Skip to contentSkip to conversation

The magical mystical changing ethernet interface order

DISCUSSION Jean Tourrilhes 4 participants 5 messages May 8, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines · Russell King

Does anyone know if there's a reason that the ethernet driver initialisation order has changed again in 2.5?

Its rather annoying when your dhcpd starts on the wrong interface.

David S. Miller wrote

Quoted 1 line

Any reliance on link ordering is broken and needs to be fixed.

I fully agree with David, this problem goes beyond the link
order.
Since 97, I've been figthing this issue with my laptop. I've
got various Pcmcia card (Ethernet and Wireless), as well as PCI and ISA Ethernet cards in the docking station. Depending on which configuration the laptop is started in, eth0 could be any Pcmcia card or any ISA/PCI card in the docking station.
With USB in the picture, things are even more dynamic. And no
careful kernel link order mechanism will ensure that eth0 is the same device.
So, let's get rid of the link order "fix", because this
address only a small subset of the problem. Let's fix the real problem which is that eth0 can't map any specific hardware device, and the device name is totally arbitrary and meaningless.

Quoted 4 lines · Randy.Dunlap

An alternative is to use 'nameif' to associate MAC addresses with interface names. See here for mini HOWTO:

http://www.xenotime.net/linux/doc/network-interface-names.txt

Currently this feels like a kludge, because not fully
inegrated, but goes in the right direction.
Actually, it's pretty funny that the original Pcmcia package
got it right since the beggining (and Win2k as well), but distributions took a step backward from that when integrating Pcmcia.
My belief is that configuration scripts should be specified in
term of MAC address (or subset) and not in term of device name. Just like the Pcmcia scripts are doing it.
And let's go the extra mile : ifconfig should accept a MAC
address as the argument instead of a device name. And in the long term, just get rid of device name from the user view.

	Have fun...

	Jean
#1 lore raw

Jean Tourrilhes wrote:
[snip]

Quoted 8 lines
Quoted 4 lines · Randy.Dunlap

An alternative is to use 'nameif' to associate MAC addresses with interface names. See here for mini HOWTO:

http://www.xenotime.net/linux/doc/network-interface-names.txt

Quoted 11 lines

Currently this feels like a kludge, because not fully
inegrated, but goes in the right direction.
Actually, it's pretty funny that the original Pcmcia package
got it right since the beggining (and Win2k as well), but distributions took a step backward from that when integrating Pcmcia.
My belief is that configuration scripts should be specified in
term of MAC address (or subset) and not in term of device name. Just like the Pcmcia scripts are doing it.
And let's go the extra mile : ifconfig should accept a MAC
address as the argument instead of a device name. And in the long term, just get rid of device name from the user view.

Some network devices do not have a mac address on power-up and must be supplied one.

Eli
--------------------. "If it ain't broke now,
Eli Carter \ it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------

#2 lore raw
Quoted 22 lines · Eli Carter

Jean Tourrilhes wrote:
[snip]

Quoted 8 lines
Quoted 4 lines · Randy.Dunlap

An alternative is to use 'nameif' to associate MAC addresses with interface names. See here for mini HOWTO:

http://www.xenotime.net/linux/doc/network-interface-names.txt

Quoted 11 lines

Currently this feels like a kludge, because not fully
inegrated, but goes in the right direction.
Actually, it's pretty funny that the original Pcmcia package
got it right since the beggining (and Win2k as well), but distributions took a step backward from that when integrating Pcmcia.
My belief is that configuration scripts should be specified in
term of MAC address (or subset) and not in term of device name. Just like the Pcmcia scripts are doing it.
And let's go the extra mile : ifconfig should accept a MAC
address as the argument instead of a device name. And in the long term, just get rid of device name from the user view.

Quoted 4 lines

Some network devices do not have a mac address on power-up and must be supplied one.

Eli

For those devices there is little difference conceptually
between using ifname to bind them to a known name and using ifconfig to set the MAC address : you need to set the MAC address prior to any operation, and when it's done, you have a MAC address so you can deal with it like any other device.
Anyway, those devices are so rare that I would not optimise
for them, and I would tradeof a bit more sanity for usual device in exchange to a few complications for unusual devices.
And I'm also perfectly well aware that some devices such IrDA
devices and PPP devices doesn't have a fixed 48bit address so can't be handled with the scheme I propose. But those devices are usually handled in their own way.

	Have fun...

	Jean
#3 lore raw
In reply to Jean Tourrilhes
Quoted 6 lines · Jean Tourrilhes

My belief is that configuration scripts should be specified in
term of MAC address (or subset) and not in term of device name. Just like the Pcmcia scripts are doing it.
And let's go the extra mile : ifconfig should accept a MAC
address as the argument instead of a device name. And in the long term, just get rid of device name from the user view.

Current Red Hat supports naming interfaces by their mac address. That keeps most people happy except some sparc and embedded users who have one mac per host not per card (and yes that *is* allowed by the 802.x spec)

#4 lore raw

On 08 May 2003 22:46:26 +0100 Alan Cox <[email protected]> wrote:

| On Iau, 2003-05-08 at 20:32, Jean Tourrilhes wrote:
| > 	My belief is that configuration scripts should be specified in
| > term of MAC address (or subset) and not in term of device name. Just
| > like the Pcmcia scripts are doing it.
| > 	And let's go the extra mile : ifconfig should accept a MAC
| > address as the argument instead of a device name. And in the long
| > term, just get rid of device name from the user view.
| 
| Current Red Hat supports naming interfaces by their mac address. That
| keeps most people happy except some sparc and embedded users who have
| one mac per host not per card (and yes that *is* allowed by the
| 802.x spec)

Yep, found it in IEEE Std 802-2001. It's just not the recommended method for device address assignment.

--
~Randy