On 10/09/2005 01:43 PM, Michael W Cocke wrote:
On Sun, 09 Oct 2005 16:39:17 +0200, you wrote:
I have two network cards, configured with different (both local) IP addresses: 192.168.x.x and 10.x.x.x. Usually the first one is eth0 and the second one is eth1, but sometimes (I think 2 such cases happened), interface names are reversed. Is it normal ? Or is something wrong ? Shouldn't interface names be fixed ? I use basic Suse firewall defined in Yast, so it probably adjusts names correctly when starting, but if I would like to write firewall script manually and use interface names directly ? Is it some exploit ?
I have SUSE Professional 9.3.
Thanks for any help, Roman
It's normal behaviour, but only because there's a bug in the assignment of logical device names. There are two solutions, google should have both of them, but here's the one I use: http://www.catherders.com/tikiwiki-1.9.1/tiki-read_article.php?articleId=36
In /etc/sysconfig/hotplug, HOTPLUG_PCI_QUEUE_NIC_EVENTS="yes" or HOTPLUG_PCI_QUEUE_NIC_EVENTS="wait" Alternatively, use a PERSISTENT_NAME in each of the files /etc/sysconfig/network/ifcfg-eth-id*. The only restriction on these I am aware of is that they may not begin with "eth". This seems to be the most common approach, as far as I can tell. Just add a line "PERSISTENT_NAME=blah" to each file.
(And there's at least one person who claims that it's not a bug - opinions vary. I call it a huge honking security issue that can potentially expose your intranet to the internet under the wrong set of circumstances.) It is possible for two PCI devices to finish initializing at powerup at roughly the same time, even though the BIOS does call them in specific order (first PCI slot first, and so on). If the kernel does not queue PCI events, they are configured by the operating system on a FIFO basis -- hence the first NIC card to report will become eth0, and that order is not fixed. If those events are queued, the kernel will configure PCI cards in a fixed specific order (first PCI slot first), and the NIC cards will be assigned logical names in the same order on every boot.
Is this a bug, design flaw (some would say these are the same thing anyway), or simply something we haven't yet become accustomed to? I don't know, but to me it isn't much different than having poor security simply because one does not take the time to configure a decent firewall. What I -do- know is that the PERSISTENT_NAME feature is not well-documented at all; I cannot find it documented anywhere on my system, though I did give up in frustration before searching all the possibilities. It is not mentioned at all in the SuSE database. I finally found it in the forums at http://www.suselinuxsupport.de. The only thing of any significance I did find on my system is in /etc/sysconfig/hotplug, in the commentary to the "queue events" variable: if the persistent name feature is used, the NIC events need not be queued (variable left at "no").