Re: interface naming (eth[x], wlan[x], etc)



spip_yeah@xxxxxxxxx wrote:
Hello,

I have a few questions that I'm hoping I can get answered. I'll number
them for easier reference in potential replies.

1) Is interface naming controlled by the kernel, i.e. does the kernel
assign names to devices as it detects them? Although eth0, eth1, etc,
are often used in /etc/network/interfaces, this is not what creates the
interfaces, correct? This only refers to specific interfaces (eth0,
eth1, etc) if they have been created by the kernel, right?

2) What about order? If you have multiple NICs in your system, are you
garanteed that they will always be detected in the same order?

3) Also, in most of the wireless HOWTOs I've come across, it is often
assumed that the wireless interface will be wlan0. However, on my linux
distro (ubuntu 6) I'm using ndiswrapper with a broadcom native win
driver (don't know if this has anything to do with it), and the
wireless interface is always eth1. However if I examine
/var/log/messages, I see diagnostic messages referencing wlan0.

Thank you,
spip



Hi,

I've been monitoring your message,because I am interested in these subjects, too. Since nobody else answers, here is what I can tell you:

Subject 1: I don't know. I suspect that the "eth" prefix is related to the hardware class of the network device (ethernet). The lowest-level tool that I know is "/usr/sbin/ip". You can use it to list your devices like this: "ip link show". More info available at http://lartc.org/howto/

Subject 2: The order depends on the scanning order of the PCI bus (or whatever bus the network device is attached to). If you change your kernel for example or if you have a detachable PCMCIA card (like me), the scanning order might be different. In Debian you can fix the names using the "mapping" stanza of /etc/network/interfaces. Do a "man interfaces" to find out more. Or look at my configuration file - I use the MAC address of the network cards:

#########################################################
auto lo
iface lo inet loopback

auto eth0
mapping eth0 eth1
script /etc/network/scripts/get-mac-address.sh
map 00:30:B4:00:00:00 wifi
map 00:09:5B:E6:44:17 wifi
map 00:0A:E4:48:B0:85 fixed

iface wifi inet dhcp
wireless-essid MYSSID
wireless-channel 6
wireless-key restricted XXX-my-wep-key-XXX

iface fixed inet dhcp
#####################################################

Subject 3: Sorry, I don't know.

Hope this helps,
Mihai
.



Relevant Pages

  • Re: [Fwd: FC9 Network Config]
    ... eth0: negotiated 100baseTx-HD, link ok ... eth1: no link ... eth2 is no link... ... Shutting down interface eth0: ...
    (Fedora)
  • Re: Wireless interface stopped working in Etch
    ... The rt2500 modules seem identical on the working system and the fresh install. ... I have begun again with a new fresh install, so the wireless interface has been autmatically named 'eth1'. ...
    (Debian-User)
  • Re: Re: Controlling eth0,eth1,... assignment order?
    ... wireless and ethernet access but interface naming is not important. ... eth0 external I/F and eth1 internal I/F. ... > interface and don't have a reason to care which card is designated eth0 ...
    (Debian-User)
  • [SOLVED!!] Re: can i completely delete and recreate my network interfaces?
    ... PCI-E Fast Ethernet Controller ... recipe to restore my eth0 interface? ... i have just as little success trying to restore the wlan0 wireless ...
    (Fedora)
  • Re: FC6 Wireless on Thinkpad T43
    ... I should be able to set various wireless ... Now, in the Network manager, the "Hardware" tab shows the the eth0 ... interface is the T-43's built-in Broadcom 10/100 Ethernet card, ... I'm think that Anaconda incorrectly set up both interfaces, eth0 and eth1, ...
    (Fedora)