Problem mit /etc/networc/interfaces und Vigor510

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
Benutzeravatar
minimike
Beiträge: 5616
Registriert: 26.03.2003 02:21:19
Lizenz eigener Beiträge: neue BSD Lizenz
Wohnort: Köln
Kontaktdaten:

Problem mit /etc/networc/interfaces und Vigor510

Beitrag von minimike » 21.07.2007 16:25:58

Hi

Ich tu mir grad Wlan im Heimnetzwerk an. Auf dem Bastelrouter habe ich ein Vigor510 USB Dongle gesteckt. Die Konfiguration erfolgt beim Laden des Treibers mittels UDEV über die Dateien in /etc/wlan

Code: Alles auswählen

#=======USER MIB SETTINGS=============================
# You can add the assignments for various MIB items
#  of your choosing to this variable, separated by
#  whitespace.  The wlan-ng script will then set each one.
# Just uncomment the variable and set the assignments
#  the way you want them.

#USER_MIBS="p2CnfRoamingMode=1 p2CnfShortPreamble=mixed"

#=======WEP===========================================
# [Dis/En]able WEP.  Settings only matter if PrivacyInvoked is true
lnxreq_hostWEPEncrypt=true     # true|false
lnxreq_hostWEPDecrypt=true     # true|false
dot11PrivacyInvoked=true        # true|false
dot11WEPDefaultKeyID=0          # 0|1|2|3
dot11ExcludeUnencrypted=true    # true|false, in AP this means WEP is required.

# If PRIV_GENSTR is not empty, use PRIV_GENTSTR to generate
#  keys (just a convenience)
# add-ons/ in the tarball contains other key generators.
PRIV_GENERATOR=/sbin/nwepgen    # nwepgen, Neesus compatible
PRIV_KEY128=false               # keylength to generate
PRIV_GENSTR=""

# or set them explicitly.  Set genstr or keys, not both.
dot11WEPDefaultKey0=01:02:03:04:05:06:07:08:09:10:11:12:13
dot11WEPDefaultKey1=            #         xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
dot11WEPDefaultKey2=            #  e.g.   01:20:03:40:05   or
dot11WEPDefaultKey3=            #         01:02:03:04:05:06:07:08:09:0a:0b:0c:0d
#=======SELECT STATION MODE===================
IS_ADHOC=y                      # y|n, y - adhoc, n - infrastructure

#======= INFRASTRUCTURE STATION  ===================
# What kind of authentication?
AuthType="sharedkey"            # opensystem | sharedkey (requires WEP)

#======= ADHOC STATION ============================
BCNINT=100                      # Beacon interval (in Kus)
CHANNEL=6                       # DS channel for BSS (1-14, depends
                                #   on regulatory domain)
BASICRATES="2 4"                # Rates for mgmt&ctl frames (in 500Kb/s)
OPRATES="2 4 11 22"             # Supported rates in BSS (in 500Kb/s)
dann noch ein schnelles ifconfig IP Adresse fertig

Wenn ich das aber in /etc/networc/interfaces eintrage

Code: Alles auswählen

iface wlan0 inet static
       address 192.168.2.2
       netmask 255.255.255.0
       network 192.168.2.0
       broadcast 192.168.2.255


wird die Karte resettet und zwar so das man das mittels wlanctl-ng nicht mehr beheben kann. Die Karte wechselt sodann vom ad-hoc in den managed Modus sowie auch die ESSID und versucht sich dann an Nachbers Access Point zu verbinden. Und ab da kann ich es nicht mehr rückgängig machen weil alles mit wlanctl-ng ignoriert wird. Alle Versuche per Hand oder EIntragungen in ~/interfaces bleiben fruchtlos, die Karte will sich an dem fremden Access Point verbinden und es folgt der Neustart. Ohne Eintrag in /etc/network/interfaces klappt es ja mittels ifconfig

Code: Alles auswählen

iface wlan0 inet static
        pre-up modprobe prism2-usb
        pre-up wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
        pre-up wlanctl-ng wlan0 lnxreq_autojoin ssid=linuxheimnetz authtype=sharedkey
        pre-up wlanctl-ng wlan0  dot11req_mibset  mibattribute=dot11WEPDefaultKeyID=0
        pre-up wlanctl-ng wlan0  dot11req_mibset  mibattribute=dot11ExcludeUnencrypted=true
        pre-up wlanctl-ng wlan0  dot11req_mibset  mibattribute=dot11PrivacyInvoked=true
        pre-up wlanctl-ng wlan0  dot11req_mibset  mibattribute=dot11WEPDefaultKey0=01:02:03:04:05:06:07:08:09:10:11:12:13
        address 192.168.2.2
        netmask 255.255.255.0
        network 192.168.2.0
        broadcast 192.168.2.255
"Lennart Poettering is one of those typical IT leaders..." "like Linus Torvalds and Theo de Raadt?" "more like Bozo the Clown" After all, now a good employee of Microsoft

gms
Beiträge: 7798
Registriert: 26.11.2004 20:08:38
Lizenz eigener Beiträge: MIT Lizenz

Beitrag von gms » 22.07.2007 00:27:54

da hat sich ja einiges getan, seit ich das letztemal wlan-ng verwendet habe. Damals mußte alles über diese pcmcia-Scripts konfiguriert werden.

Eigentlich solltest du jetzt aber alles direkt in der /etc/network/interfaces konfigurieren können.
also so ähnlich wie hier:

Code: Alles auswählen

iface wlan0 inet static 
       address 192.168.2.2 
       netmask 255.255.255.0 
       network 192.168.2.0 
       broadcast 192.168.2.255
       wireless-essid linuxheimnetz
       wireless_mode Ad-Hoc
       wireless-channel 6 # wegen ad-hoc muss ein channel gesetzt sein
       wireless_enc on
       wlan_ng_priv_key128 false
       wlan_ng_key0=01:02:03:04:05:06:07:08:09:10:11:12:13
# hier noch einige ad-hoc settings aus /usr/share/doc/linux-wlan-ng/README.Debian.gz
# Beacon interval (in Kus)
#       wlan_ng_bcint 100
# Rates for mgmt&ctl frames (in 500Kb/s)
#       wlan_ng_basicrates 2 4
# Supported rates in BSS (in 500Kb/s)
#       wlan_ng_oprates 2 4 11 22
#
# You can set arbitrary MIB items with this directive, separated by
# whitespace. Each will then be set.
#       wlan_ng_user_mibs p2CnfRoamingMode=1

Gruß
gms

Antworten