Re: interface naming (eth[x], wlan[x], etc)
- From: Mihai Osian <zzz@xxxxxxx>
- Date: Mon, 30 Oct 2006 21:47:36 +0100
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
.
- References:
- interface naming (eth[x], wlan[x], etc)
- From: spip_yeah
- interface naming (eth[x], wlan[x], etc)
- Prev by Date: Online Linux Books
- Next by Date: Re: getting sshd to work on vector linux
- Previous by thread: interface naming (eth[x], wlan[x], etc)
- Next by thread: Client to connect to a chat server
- Index(es):
Relevant Pages
|