PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : wlan* und eth* durcheinander!



Baahl
20.03.07, 18:26
Hallo

Ich benutze ein aktuelles Suse10.2. Als Wlanadapter kommt ein D-Link DWL-122 (Modul ist prism2_usb) zum Einsatz und als Ethnet eine Onboardkarte (läuft mit dem Modul sk98lin). Ansich laufen die devs ohne Probleme aber....

beim Systemstart werden die immer zufällig auf wlan0, wlan1, wlan2 oder eth0, 1, 2 ect. gelinkt. Es kann also wirklich sein, dass mein echtes eth0-Gerät eben nicht auf eth0 gelinkt wird, sondern auf wlan2! Das selbe gilt für den D-Linkadapter! Selten werden die auch garniergends hin getan und dann hab ich weder wlan* noch eth* Adapter! Ist echt nervig!

Ich weiss nicht was ich für Logs ect. posten soll. Drum sagts mir einfach wenn ihr etwas sehen wollt!

Gruss und besten Dank ;)

pita
20.03.07, 20:41
bei ubuntu (und debian) kannst du den mac-adressen der einzelnen devices einen namen (eth*..) zuweisen

das geschieht über einträge in der datei /etc/iftab

hier ein link dazu:
http://www.linuxmanpages.com/man5/iftab.5.php

greetz

Ede
20.03.07, 20:56
Schau dir /etc/udev/rules.d an.
Ich habe nie an den Device-Namen rumgespielt, weil bis jetzt zum Glück alles funktioniert hat. Wenn ich da was machen wollte, würde ich als erstes folgendes lesen.

Zitat von /usr/share/doc/packages/sysconfig/README.Persistent_Interface_Names
Persistent Network Interface Names
==================================


Why do we need this?
^^^^^^^^^^^^^^^^^^^^
The kernel interface names are generated in the order of network interface
registration. If we could ensure that interfaces of network devices were always
registered in the same order, the interface names would never change. But we
cannot guarantee this. Sometimes a new driver may behave different to the old
one, two devices were initialized at nearly the same time or devices were
hotplugged.

Even if we have means to use persistent descriptions of network interfaces (e.g.
id-00:11:25:42:3e:3d, see getcfg) it is way more convenient if we can rely on
interface names.

Persistent names would be easy to achive if we would use another namespace then
the kernel. Let's say we would call interfaces now en<N> instead of eth<N>. Or
if the kernel would use en<N> and we could rename them to eth<N>. But both the
users and the kernel developers wanted to changed their habits.


The tricky solution
^^^^^^^^^^^^^^^^^^^
To rename a set of interfaces inside a given namespace, we have to rename them
first to temporary names until the target names become free. At first we try to
rename them directly. If that fails because the target name is used we rename
the interface and wait some time until the renaming to the target names
succeeds. This can of course only work, if _all_ interfaces of a given namespace
(e.g. eth<N>) are treataed this way.

Further rcnetwork start must not set up interfaces that are in or before the
process of renaming.


The script and the configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There is /sbin/rename_netiface that does exactly the job described above. It is
called via udev rules for every network interface. But it does only handle
interfaces with names in eth*, ath*, wlan* and ra*.

If there is a rule in /etc/udev/rules.d/30-net_persistent_names.rules that
matches a certain interface, rename_netiface will be called with a new name for
this interface. You may change the names in this rules, but make sure a name
does not occur twice. (A name may only occur twice if you have two different
network devices which are never plugged at the same time. E.g. PCMCIA cards in
the office and at home.)

If there is no such rule, because this interface was registered
the first time, rename_netiface will be called from a generic rule in
/etc/udev/rules.d/31-net_create_names.rules. It will then determine a free
persistent name, rename the interface and write an individual rule into
/etc/udev/rules.d/30-net_persistent_names.rules.

If you want to disable this mechanism you may choose FORCE_PERSISTENT_NAMES=no
in /etc/sysconfig/network/config. You may also delete the rules in 3*-net* or
delete the whole files, but then rcnetwork will take some seconds longer. So
better disable via FORCE_PERSISTENT_NAMES=no or much better use it.


System Update
^^^^^^^^^^^^^
If you made an update fron an older version of SUSE Linux and you were using
PERSISTENT_NAME in ifcfg-* files, then please remove them and set your preferred
name in /etc/udev/rules.d/30-net_persistent_names.rules. This wont be done
automatically.


Device Idnentification By Path
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you want to identify your network interfaces by path, e.g. pci slot, then you
have to create these rules manually. But always add them to
/etc/udev/rules.d/30-net_persistent_names.rules. And add only one rule per
device. Have a look at man udev for details about udev rules.

Baahl
21.03.07, 16:57
merci, ich schaus mir an; heute hab ich ein wlan0 und ein wlan13 ^^

edit: hat funktioniert!!