wieder mal: wlan instabil

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
Benutzeravatar
manes
Beiträge: 958
Registriert: 27.08.2007 11:26:54
Wohnort: Köln
Kontaktdaten:

wieder mal: wlan instabil

Beitrag von manes » 20.03.2009 13:44:21

liebes forum,

weil ich aus bestimmten gründen fürs wlan eine feste ip vom router brauche und den derzeit mangels zugriff nicht konfigurieren kann, habe ich den knetworkmanager runtergeworfen und mein wlan über die /etc/network/interfaces mit wpa_supplicant konfiguriert.
nun ist es so, daß die verbindung immer eine gewisse und sehr variable zeit hält und dann abbricht. die anderen (windows-)rechner im lan haben das problem nicht.
den befehl für ein händisches wiederherstellen der verbindung und die schräubchen für ein selbständiges wiederherstellen hab ich bislang nicht gefunden. letztlich bleibt mir bislang nur ein reboot. das erinnert mich an die problemlösung bei einem anderen betriebssystem und macht mich nicht froh...

weiß wer rat?
manes


/etc/network/interfaces:

Code: Alles auswählen

# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

#wlan
allow-hotplug wlan0
#mehrfachkonfiguration aktivieren:
# (the roaming interface MUST use the manual inet method)
iface wlan0 inet manual

#roaming aktivieren:
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

#iface default inet dhcp
# no id_str, 'default' is used as the fallback mapping target

#netz1:
# id_str="netz1"
iface netz1 inet static
address 192.168.2.2
netmask 255.255.255.0
gateway 192.168.2.1

#netz2:
# id_str="netz2"
iface netz2 inet dhcp

/etc/wpa_supplicant/wpa_supplicant.conf

Code: Alles auswählen

ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=0
 
network={
        ssid="netz1"
	# this id_str will notify /sbin/wpa_action to 'ifup netz1'
	id_str="netz1"
	proto=WPA
	key_mgmt=WPA-PSK
	pairwise=TKIP
	group=TKIP
        #psk="<passwort1>"
        psk=<blablabla...>
}

network={
	ssid="netz2"
	# this id_str will notify /sbin/wpa_action to 'ifup netz2'
	id_str="netz2"
	proto=WPA
	key_mgmt=WPA-PSK
	pairwise=TKIP
	group=TKIP
	#psk="<passwort2>"
        psk=<blubblub...>
}
nach abbruch der internetverbindung: wpa_cli status

Code: Alles auswählen

Selected interface 'wlan0'
bssid=00:01:e3:c9:bb:0d
ssid=netz1
id=0
id_str=netz1
pairwise_cipher=TKIP
group_cipher=TKIP
key_mgmt=WPA-PSK
wpa_state=COMPLETED
ip_address=192.168.2.2
/var/log/syslog |grep wlan

Code: Alles auswählen

Mar 20 13:17:48 t42-lenny avahi-daemon[3408]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::205:4eff:fe4c:c761.
Mar 20 13:17:48 t42-lenny avahi-daemon[3408]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.2.2.
Mar 20 13:19:17 t42-lenny kernel: [   40.445318] udev: renamed network interface ath0 to wlan0
Mar 20 13:19:18 t42-lenny avahi-daemon[2773]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::205:4eff:fe4c:c761.
Mar 20 13:19:18 t42-lenny avahi-daemon[2773]: New relevant interface wlan0.IPv6 for mDNS.
Mar 20 13:19:18 t42-lenny avahi-daemon[2773]: Registering new address record for fe80::205:4eff:fe4c:c761 on wlan0.*.
Mar 20 13:19:28 t42-lenny kernel: [   61.724034] wlan0: no IPv6 routers present
Mar 20 13:19:29 t42-lenny ntpd[3195]: Listening on interface #3 wlan0, fe80::205:4eff:fe4c:c761#123 Enabled
Mar 20 13:19:33 t42-lenny avahi-daemon[2773]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.2.2.
Mar 20 13:19:33 t42-lenny avahi-daemon[2773]: New relevant interface wlan0.IPv4 for mDNS.
Mar 20 13:19:33 t42-lenny avahi-daemon[2773]: Registering new address record for 192.168.2.2 on wlan0.IPv4.
Mar 20 13:24:30 t42-lenny ntpd[3195]: Listening on interface #6 wlan0, 192.168.2.2#123 Enabled
/var/log/wpa_action.wlan0.log

Code: Alles auswählen

########## 13:18:00  2009-03-20 ##########
IFACE=wlan0 ACTION=stop
########## 13:19:33  2009-03-20 ##########
IFACE=wlan0 ACTION=CONNECTED
WPA_ID=0 WPA_ID_STR=netz1
WPA_CTRL_DIR=/var/run/wpa_supplicant
Mapping logical interface via id_str: netz1
ifup wlan0=netz1
Configuring interface wlan0=netz1 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/050madwifi
run-parts: executing /etc/network/if-pre-up.d/uml-utilities
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant

ifconfig wlan0 192.168.2.2 netmask 255.255.255.0                up
 route add default gw 192.168.2.1  wlan0
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/openvpn
run-parts: executing /etc/network/if-up.d/uml-utilities
run-parts: executing /etc/network/if-up.d/wpasupplicant
bssid=00:01:e3:c9:bb:0d
ssid=netz1
id=0
id_str=netz1
pairwise_cipher=TKIP
group_cipher=TKIP
key_mgmt=WPA-PSK
wpa_state=COMPLETED
ip_address=192.168.2.2

/var/log/wpa_supplicant.wlan0.log

Code: Alles auswählen

Failed to initiate AP scan.
Failed to initiate AP scan.
Sometimes you have a programming problem and it seems like the best solution is to use regular expressions; now you have two problems.
David Mertz

Benutzeravatar
minimike
Beiträge: 5616
Registriert: 26.03.2003 02:21:19
Lizenz eigener Beiträge: neue BSD Lizenz
Wohnort: Köln
Kontaktdaten:

Re: wieder mal: wlan instabil

Beitrag von minimike » 22.03.2009 17:18:49

Ich habe auch ab und mal so ein Problem. Mein Workaround war es bisher: Netwerk stoppen. den Treiber zu entladen. Treiber laden, Netzwerkstarten. Hmm was sagt wpa_cli wenn so ein Problem auftritt?
"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

Benutzeravatar
manes
Beiträge: 958
Registriert: 27.08.2007 11:26:54
Wohnort: Köln
Kontaktdaten:

Re: wieder mal: wlan instabil

Beitrag von manes » 23.03.2009 02:04:27

minimike hat geschrieben:Netwerk stoppen. den Treiber zu entladen. Treiber laden, Netzwerkstarten. Hmm was sagt wpa_cli wenn so ein Problem auftritt?
hallo minimike,

wpa_cli status:

Code: Alles auswählen

Selected interface 'wlan0'
wpa_state=DISCONNECTED
dann netzwerk aus mit

Code: Alles auswählen

/etc/init.d/networking stop
wlan-modul entladen und neu laden:

Code: Alles auswählen

modprobe -r ath_pci
modprobe ath_pci
und dann wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

Code: Alles auswählen

No network configuration found for the current AP
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with 00:00:00:00:00:00
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-SCAN-RESULTS
Trying to associate with 00:01:e3:c9:bb:0d (SSID='netz1' freq=2412 MHz)
Associated with 00:01:e3:c9:bb:0d
WPA: Key negotiation completed with 00:01:e3:c9:bb:0d [PTK=TKIP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:01:e3:c9:bb:0d completed (auth) [id=0 id_str=netz1]
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-RESULTS
und dann passiert nix mehr, ohne daß der prompt erschiene...

grüße
manes
Sometimes you have a programming problem and it seems like the best solution is to use regular expressions; now you have two problems.
David Mertz

Benutzeravatar
minimike
Beiträge: 5616
Registriert: 26.03.2003 02:21:19
Lizenz eigener Beiträge: neue BSD Lizenz
Wohnort: Köln
Kontaktdaten:

Re: wieder mal: wlan instabil

Beitrag von minimike » 23.03.2009 02:44:03

Das scheint ein anderes Problem zu sein. Und du bist anscheinend nicht der einzige :twisted:

hmm bei "lsmod lsmod ath5k" taucht dann der Treiber ath5k auf? Der Verdacht kommt sofort auf beim Wörtchen "wlan0" Denn mit Madwifi sollte die Karte "ath0" heissen. Wenn dem so sei hau mal den ath5k runter, erstmal mit rmmod. Dann noch nochmal den ath_pci entladen und wieder laden. Könnte sein das sich der ath5k Treiber die Karte vorher geschnappt hat. Evtl den ath5k mal blacklisten. Beim nächsten Start kontrollieren das der nicht geladen wurde.

Wenn das Problem weiterhin besteht. Debian kompiliert Wpasupplicant nicht mit Madwifiunterstützung.Begründung: wext ist gut genug für alle(stimmt meiner Meinung nach nicht), Madwifi soll vom ath5k abgelöst werden (Muhahaha, bis der wirklich taugt besser noch mal raus aus den Kernel) Ich habe das passend parat. Sogar als DEB mit Support für:

Code: Alles auswählen

drivers:
  wext = Linux wireless extensions (generic)
  madwifi = MADWIFI 802.11 support (Atheros, etc.)
  atmel = ATMEL AT76C5XXx (USB, PCMCIA)
  wired = wpa_supplicant wired Ethernet driver
  ralink = Ralink Wireless Client driver
Wobei madwifi und ralink Bonbons sind.
"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

Benutzeravatar
manes
Beiträge: 958
Registriert: 27.08.2007 11:26:54
Wohnort: Köln
Kontaktdaten:

Re: wieder mal: wlan instabil

Beitrag von manes » 24.03.2009 00:53:48

hallo minimike,

jetzt sitze ich hier mal nicht zu hause, sondern in "netz2", und was soll ich sagen: die kiste läuft. am ende ein problem mit dem doofen siemens-router zu hause oder was?

anyway. lsmod | grep ath:

Code: Alles auswählen

ath5k                  87264  0
mac80211              139680  1 ath5k
cfg80211               21576  2 ath5k,mac80211
damals mit etch hab ich noch mit dem module-assistant das kernelmodul gebastelt, damit die atheroskarte funktioniert und die hieß ath0. ich hab keine ahnung, wann sie ihren namen geändert hat. irgendwann war ich halt zu testing gewechselt.

nun, ich versuchs mal ohne ath5k:

ge-blacklist-et in /etc/modprobe.d/madwifi:

Code: Alles auswählen

## ath5k (mac80211)
## Comment out the following line, and uncomment all of the
## madwifi modules below to use the athk module
blacklist ath5k

## madwifi (non-free)
#blacklist ath_hal
#blacklist ath_pci
#blacklist ath_rate_amrr
#blacklist ath_rate_onoe
#blacklist ath_rate_sample
#blacklist wlan
#blacklist wlan_acl
#blacklist wlan_ccmp
#blacklist wlan_scan_ap
#blacklist wlan_scan_sta
#blacklist wlan_tkip
#blacklist wlan_wep
#blacklist wlan_xauth
in der /etc/modules ist nix drin:

Code: Alles auswählen

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

loop
aktuelles lsmod | grep ath:

Code: Alles auswählen

ath_rate_sample        11008  1
ath_pci               202104  0
wlan                  193040  5 wlan_tkip,wlan_scan_sta,ath_rate_sample,ath_pci
ath_hal               300672  3 ath_rate_sample,ath_pci
mal sehen, ob der ath5k der böse war. ich gebe laut. und danke für deine hilfe und anteilnahme :)

grüße
manes

edit: typo
Sometimes you have a programming problem and it seems like the best solution is to use regular expressions; now you have two problems.
David Mertz

Antworten