[opensuse] wireless access points and traditional ifup on SuSE-12.2
I am trying to force a desktop wireless connection to use a specific AP. I see in Yast network config where I can put the mac address of the AP I want to use but it doesn't seem to work and _most_ always picks one I don't want it to use. Using network manager obviously works correctly but I must use traditional ifup on this box. How can I force it to use the AP I want it too? Thanks Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Mark Hounschell wrote:
I am trying to force a desktop wireless connection to use a specific AP. I see in Yast network config where I can put the mac address of the AP I want to use but it doesn't seem to work and _most_ always picks one I don't want it to use. Using network manager obviously works correctly but I must use traditional ifup on this box. How can I force it to use the AP I want it too?
I have a /etc/sysconfig/network/ifcfg-wlan0 with this: WIRELESS_ESSID='BERGSTRASSE' I just edit the file, but there is no doubt also a way of doing it with YaST. -- Per Jessen, Zürich (10.2°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/26/2012 05:25 AM, Per Jessen wrote:
Mark Hounschell wrote:
I am trying to force a desktop wireless connection to use a specific AP. I see in Yast network config where I can put the mac address of the AP I want to use but it doesn't seem to work and _most_ always picks one I don't want it to use. Using network manager obviously works correctly but I must use traditional ifup on this box. How can I force it to use the AP I want it too?
I have a /etc/sysconfig/network/ifcfg-wlan0 with this:
WIRELESS_ESSID='BERGSTRASSE'
I just edit the file, but there is no doubt also a way of doing it with YaST.
I have a centrally located wireless router and 2 range extenders. One on each end of the house. That's 3 Access Points all with the same ESSID. They are differentiated by their mac addresses. Using networkmanager, I see all 3 and can select the one I want. Using ifup and Yast to configure it my ifcfg-wlan0 comes out like this. BOOTPROTO='static' BROADCAST='' ETHTOOL_OPTIONS='' IPADDR='172.16.10.102/24' MTU='' NAME='802.11n WLAN Adapter' NETWORK='' REMOTE_IPADDR='' STARTMODE='hotplug' USERCONTROL='no' WIRELESS_AP='20:aa:4b:b2:dd:79' ! This is the AP I want to use WIRELESS_AP_SCANMODE='1' WIRELESS_AUTH_MODE='psk' WIRELESS_BITRATE='auto' WIRELESS_CA_CERT='' WIRELESS_CHANNEL='' WIRELESS_CLIENT_CERT='' WIRELESS_CLIENT_KEY='' WIRELESS_CLIENT_KEY_PASSWORD='' WIRELESS_DEFAULT_KEY='0' WIRELESS_EAP_AUTH='' WIRELESS_EAP_MODE='' WIRELESS_ESSID='hounschell-1' WIRELESS_FREQUENCY='' WIRELESS_KEY='' WIRELESS_KEY_0='' WIRELESS_KEY_1='' WIRELESS_KEY_2='' WIRELESS_KEY_3='' WIRELESS_KEY_LENGTH='128' WIRELESS_MODE='Managed' WIRELESS_NICK='' WIRELESS_NWID='' WIRELESS_PEAP_VERSION='' WIRELESS_POWER='no' WIRELESS_WPA_ANONID='' WIRELESS_WPA_IDENTITY='' WIRELESS_WPA_PASSWORD='' WIRELESS_WPA_PSK='************' But what happens is it selects the Access Point at the other end of the house not the one specified in the config file as you can see below. wlan0 IEEE 802.11bgn ESSID:"hounschell-1" Mode:Managed Frequency:2.437 GHz Access Point: C8:D7:19:7A:AB:1E Bit Rate=150 Mb/s Tx-Power=20 dBm Retry long limit:7 RTS thr=2347 B Fragment thr:off Encryption key:off Power Management:off Link Quality=66/70 Signal level=-44 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:9 Missed beacon:0 The kernel never even tries the one specified in the config file: [ 19.876977] wlan0: authenticate with c8:d7:19:7a:ab:1e [ 19.901616] wlan0: send auth to c8:d7:19:7a:ab:1e (try 1/3) [ 19.904099] wlan0: authenticated [ 19.916679] wlan0: associate with c8:d7:19:7a:ab:1e (try 1/3) [ 19.925839] wlan0: RX AssocResp from c8:d7:19:7a:ab:1e (capab=0x411 status=0 aid=2) [ 19.925975] wlan0: associated [ 19.925988] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready This access point is at the other end of the house and even though it says its connected, it is just too far away to work and doesn't. Thanks Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Mark Hounschell wrote:
On 11/26/2012 05:25 AM, Per Jessen wrote:
Mark Hounschell wrote:
I am trying to force a desktop wireless connection to use a specific AP. I see in Yast network config where I can put the mac address of the AP I want to use but it doesn't seem to work and _most_ always picks one I don't want it to use. Using network manager obviously works correctly but I must use traditional ifup on this box. How can I force it to use the AP I want it too?
I have a /etc/sysconfig/network/ifcfg-wlan0 with this:
WIRELESS_ESSID='BERGSTRASSE'
I just edit the file, but there is no doubt also a way of doing it with YaST.
I have a centrally located wireless router and 2 range extenders. One on each end of the house. That's 3 Access Points all with the same ESSID. They are differentiated by their mac addresses.
Ah, I see. I've never worked with such a setup, sorry. If it works with network manager, it ought to work with an ifup/down style setup too. Does YaST allow you to chose the AP by MAC-address ? -- Per Jessen, Zürich (10.3°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/26/2012 07:58 AM, Per Jessen wrote:
Ah, I see. I've never worked with such a setup, sorry. If it works with network manager, it ought to work with an ifup/down style setup too. Does YaST allow you to chose the AP by MAC-address ?
Well, yes, Yast does let you enter a MAC address. And it even shows up in the/etc/sysconfig/network/ifcfg-wlan0 config file created by Yast that was included in my last email. The system/kernel doesn't seem to be using all the info in that file for some reason. Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Mark Hounschell wrote:
On 11/26/2012 07:58 AM, Per Jessen wrote:
Ah, I see. I've never worked with such a setup, sorry. If it works with network manager, it ought to work with an ifup/down style setup too. Does YaST allow you to chose the AP by MAC-address ?
Well, yes, Yast does let you enter a MAC address. And it even shows up in the/etc/sysconfig/network/ifcfg-wlan0 config file created by Yast that was included in my last email. The system/kernel doesn't seem to be using all the info in that file for some reason.
If it were me, I'd start looking through the network scripts searching for what WIRELESS_AP is being used for. Or just open a bugreport. -- Per Jessen, Zürich (10.6°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, Nov 26 08:19:35 AM Mark Hounschell wrote:
On 11/26/2012 07:58 AM, Per Jessen wrote:
Ah, I see. I've never worked with such a setup, sorry. If it works with network manager, it ought to work with an ifup/down style setup too. Does YaST allow you to chose the AP by MAC-address ?
Well, yes, Yast does let you enter a MAC address. And it even shows up in the/etc/sysconfig/network/ifcfg-wlan0 config file created by Yast that was included in my last email. The system/kernel doesn't seem to be using all the info in that file for some reason.
Mark
Read the man page for ifup. It explains the process by which the configuration gets assigned. The kernel doesn't make the association; this is being done by a combination of the network loading script & udev rules. The man page briefly describes creating persistent interface names in the context of on-the-fly devices, i.e., forcing a particular name to be associated with a particular device when more than one is possible (like with hotplugged devices) - perhaps this is your solution. Another approach: Is it possible for you to use more than one SSID? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, Nov 26 11:43:54 AM you wrote:
On Mon, Nov 26 08:19:35 AM Mark Hounschell wrote:
On 11/26/2012 07:58 AM, Per Jessen wrote:
Ah, I see. I've never worked with such a setup, sorry. If it works with network manager, it ought to work with an ifup/down style setup too. Does YaST allow you to chose the AP by MAC-address ?
Well, yes, Yast does let you enter a MAC address. And it even shows up in the/etc/sysconfig/network/ifcfg-wlan0 config file created by Yast that was included in my last email. The system/kernel doesn't seem to be using all the info in that file for some reason.
Mark
Read the man page for ifup. It explains the process by which the configuration gets assigned. The kernel doesn't make the association; this is being done by a combination of the network loading script & udev rules. The man page briefly describes creating persistent interface names in the context of on-the-fly devices, i.e., forcing a particular name to be associated with a particular device when more than one is possible (like with hotplugged devices) - perhaps this is your solution.
Another approach: Is it possible for you to use more than one SSID?
Mark, sorry I omitted . . . IIRC iwconfig can change config parameters on the fly. Take a look at the man page, there is a command to force the use of a particular AP (or SSID). If you can't get your solution with the above udev rule, you might be able to add an iwconfig line to e.g. boot.local which changes the wlan0 assignment to the AP you cant. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dennis Gallien wrote:
On Mon, Nov 26 11:43:54 AM you wrote:
On Mon, Nov 26 08:19:35 AM Mark Hounschell wrote:
On 11/26/2012 07:58 AM, Per Jessen wrote:
Ah, I see. I've never worked with such a setup, sorry. If it works with network manager, it ought to work with an ifup/down style setup too. Does YaST allow you to chose the AP by MAC-address ?
Well, yes, Yast does let you enter a MAC address. And it even shows up in the/etc/sysconfig/network/ifcfg-wlan0 config file created by Yast that was included in my last email. The system/kernel doesn't seem to be using all the info in that file for some reason.
Mark
Read the man page for ifup. It explains the process by which the configuration gets assigned. The kernel doesn't make the association; this is being done by a combination of the network loading script & udev rules. The man page briefly describes creating persistent interface names in the context of on-the-fly devices, i.e., forcing a particular name to be associated with a particular device when more than one is possible (like with hotplugged devices) - perhaps this is your solution.
Another approach: Is it possible for you to use more than one SSID?
Mark, sorry I omitted . . . IIRC iwconfig can change config parameters on the fly. Take a look at the man page, there is a command to force the use of a particular AP (or SSID). If you can't get your solution with the above udev rule, you might be able to add an iwconfig line to e.g. boot.local which changes the wlan0 assignment to the AP you cant.
If YaST supports chosing an AP and it doesn't work, it's really a bug. -- Per Jessen, Zürich (9.4°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/26/2012 12:10 PM, Per Jessen wrote:
If YaST supports chosing an AP and it doesn't work, it's really a bug.
I agree with that. But is the bug a SuSE bug or a kernel bug? Maybe there are others out there doing the same thing successfully with a different USB wireless dongle? Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Mark Hounschell wrote:
On 11/26/2012 12:10 PM, Per Jessen wrote:
If YaST supports chosing an AP and it doesn't work, it's really a bug.
I agree with that. But is the bug a SuSE bug or a kernel bug?
It's not critical, report it to openSUSE, the kernel guys here are pretty sharp. -- Per Jessen, Zürich (9.2°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/26/2012 01:40 PM, Per Jessen wrote:
Mark Hounschell wrote:
On 11/26/2012 12:10 PM, Per Jessen wrote:
If YaST supports chosing an AP and it doesn't work, it's really a bug.
I agree with that. But is the bug a SuSE bug or a kernel bug? It's not critical, report it to openSUSE, the kernel guys here are pretty sharp.
Bug 791295 has been submitted. Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 26.11.2012 17:49, schrieb Dennis Gallien:
On Mon, Nov 26 11:43:54 AM you wrote:
On Mon, Nov 26 08:19:35 AM Mark Hounschell wrote:
On 11/26/2012 07:58 AM, Per Jessen wrote:
Ah, I see. I've never worked with such a setup, sorry. If it works with network manager, it ought to work with an ifup/down style setup too. Does YaST allow you to chose the AP by MAC-address ?
Well, yes, Yast does let you enter a MAC address. And it even shows up in the/etc/sysconfig/network/ifcfg-wlan0 config file created by Yast that was included in my last email. The system/kernel doesn't seem to be using all the info in that file for some reason. [...]
The WIRELESS_AP is used only in old/static "iwconfig" setup mode (WEP, PREFER_WPA_SUPPLICANT=no), but not in WPA/EAP mode with wpa_supplicant. See also /etc/sysconfig/network/ifcfg.template.
Another approach: Is it possible for you to use more than one SSID?
Not with yast2. But yes -- it is possible: # global settings WIRELESS_AP_SCANMODE='1' # -- per network # implicit _0 suffix: #WIRELESS_PRIORITY=10 WIRELESS_AUTH_MODE='psk' WIRELESS_ESSID='network-0' WIRELESS_WPA_PSK='**************' # explicit _1 suffix: #WIRELESS_PRIORITY_1=11 WIRELESS_AUTH_MODE_1='psk' WIRELESS_ESSID_1='network-1' WIRELESS_WPA_PSK_1='**************' # explicit _2 suffix: #WIRELESS_PRIORITY_2=12 WIRELESS_AUTH_MODE_2='psk' WIRELESS_ESSID_2='network-2' WIRELESS_WPA_PSK_2='**************' This will cause to generate multiple network {} sections in wpa_supplicant.conf. You can also write your own wpa_supplicant.conf and use the WIRELESS_WPA_CONF variable to say ifup to use it, e.g.: WIRELESS_WPA_CONF="/etc/sysconfig/network/wpa-wlan0.conf" See man wpa_supplicant.conf for details.
Mark, sorry I omitted . . . IIRC iwconfig can change config parameters on the fly. Take a look at the man page, there is a command to force the use of a particular AP (or SSID). If you can't get your solution with the above udev rule, you might be able to add an iwconfig line to e.g. boot.local which changes the wlan0 assignment to the AP you cant.
I don't know at the moment, but I think in wpa_supplicant mode, wpa_supplicant chooses it itself and the iwconfig ap is ignored. I've no idea at the moment how to force wpa_supplicant to use some special ap. When there is an option, open a bug report an let me know the option name and I'll add it to the ifup-wireless script. Gruesse / Regards, Marius Tomaschewski <mt@suse.de>, <mt@suse.com> -- SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg), GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, Maxfeldstraße 5, 90409 Nürnberg, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/26/2012 12:52 PM, Marius Tomaschewski wrote:
Am 26.11.2012 17:49, schrieb Dennis Gallien:
On Mon, Nov 26 11:43:54 AM you wrote:
On Mon, Nov 26 08:19:35 AM Mark Hounschell wrote:
On 11/26/2012 07:58 AM, Per Jessen wrote:
Ah, I see. I've never worked with such a setup, sorry. If it works with network manager, it ought to work with an ifup/down style setup too. Does YaST allow you to chose the AP by MAC-address ?
Well, yes, Yast does let you enter a MAC address. And it even shows up in the/etc/sysconfig/network/ifcfg-wlan0 config file created by Yast that was included in my last email. The system/kernel doesn't seem to be using all the info in that file for some reason. [...]
The WIRELESS_AP is used only in old/static "iwconfig" setup mode (WEP, PREFER_WPA_SUPPLICANT=no), but not in WPA/EAP mode with wpa_supplicant.
See also /etc/sysconfig/network/ifcfg.template.
Another approach: Is it possible for you to use more than one SSID?
Not with yast2. But yes -- it is possible:
# global settings WIRELESS_AP_SCANMODE='1' # -- per network # implicit _0 suffix: #WIRELESS_PRIORITY=10 WIRELESS_AUTH_MODE='psk' WIRELESS_ESSID='network-0' WIRELESS_WPA_PSK='**************' # explicit _1 suffix: #WIRELESS_PRIORITY_1=11 WIRELESS_AUTH_MODE_1='psk' WIRELESS_ESSID_1='network-1' WIRELESS_WPA_PSK_1='**************' # explicit _2 suffix: #WIRELESS_PRIORITY_2=12 WIRELESS_AUTH_MODE_2='psk' WIRELESS_ESSID_2='network-2' WIRELESS_WPA_PSK_2='**************'
This will cause to generate multiple network {} sections in wpa_supplicant.conf.
You can also write your own wpa_supplicant.conf and use the WIRELESS_WPA_CONF variable to say ifup to use it, e.g.:
WIRELESS_WPA_CONF="/etc/sysconfig/network/wpa-wlan0.conf"
See man wpa_supplicant.conf for details.
Mark, sorry I omitted . . . IIRC iwconfig can change config parameters on the fly. Take a look at the man page, there is a command to force the use of a particular AP (or SSID). If you can't get your solution with the above udev rule, you might be able to add an iwconfig line to e.g. boot.local which changes the wlan0 assignment to the AP you cant.
I don't know at the moment, but I think in wpa_supplicant mode, wpa_supplicant chooses it itself and the iwconfig ap is ignored.
I've no idea at the moment how to force wpa_supplicant to use some special ap. When there is an option, open a bug report an let me know the option name and I'll add it to the ifup-wireless script.
Hi Marius, The WIRELESS_AP option appears to already be in the ifup-wireless script. # set AP address when requested in $WIRELESS_AP. # At last mac80211 based drivers need this as signal to start # scanning for an appropriate cell, so we set it to 'any' when # $WIRELESS_AP is empty in Managed and Ad-Hoc modes, except we # have the madwifi (ath_pci) driver, which does not like it... # It is required to set up the interface before doing that. case "$WIRELESS_MODE" in ([M,m]anaged|[A,a]d-[H,h]oc|"") case "${DRIVER}" in (wl) # bnc#555774, wl driver does not like it ;; (ath_pci) test -z "$WIRELESS_AP" && WIRELESS_AP='off' ;; (*) test -z "$WIRELESS_AP" && WIRELESS_AP='any' ;; esac ;; esac if test -n "$WIRELESS_AP" ; then ip link set up dev $INTERFACE 2>/dev/null run_iw_tool config ap "$WIRELESS_AP" fi Does the above make it 'any' if ${DRIVER} is not ath_pci or wl? Thanks Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/26/2012 11:43 AM, Dennis Gallien wrote:
Read the man page for ifup. It explains the process by which the configuration gets assigned. The kernel doesn't make the association; this is being done by a combination of the network loading script & udev rules. The man page briefly describes creating persistent interface names in the context of on-the-fly devices, i.e., forcing a particular name to be associated with a particular device when more than one is possible (like with hotplugged devices) - perhaps this is your solution. Another approach: Is it possible for you to use more than one SSID?
Hi Dennis, In the configuration I have the range extenders in, they have to use the same SSID as the router. It's how they know they are simply extenders of the wireless router. I went all through that. If they are not the same SSID, they are not range extenders. The dmesg output posted earlier: [ 19.876977] wlan0: authenticate with c8:d7:19:7a:ab:1e [ 19.901616] wlan0: send auth to c8:d7:19:7a:ab:1e (try 1/3) [ 19.904099] wlan0: authenticated [ 19.916679] wlan0: associate with c8:d7:19:7a:ab:1e (try 1/3) [ 19.925839] wlan0: RX AssocResp from c8:d7:19:7a:ab:1e (capab=0x411 status=0 aid=2) [ 19.925975] wlan0: associated does come from the kernel: net/mac80211/mlme.c Obviously something in userland "should" be directing the kernel to either "any/none/specific" AP. Be it the network loading scripts or udev. The kernel is getting "any" even though the config file specifies a specific AP mac address. I've not fully read all the man pages you refer to but I have tinkered with iwconfig and some of the wireless-utils some. Nothing seems to want to let you change anything for an interface that is already "up". As Per implies in the next post or so down, there appears to be a bug but I can't tell at this point if it is in the userland side or the kernel side? I guess I need to go ahead and look closer at the /etc/sysconfig/network/ifup-wireless script to determine if it is getting the $WIRELESS_AP variable from the config file and then using it properly. Thanks Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2012-11-26 19:06, Mark Hounschell wrote:
In the configuration I have the range extenders in, they have to use the same SSID as the router. It's how they know they are simply extenders of the wireless router. I went all through that. If they are not the same SSID, they are not range extenders.
The system should automatically choose the one with the best signal, and dynamically change if you move the client, which can be mobile. Anything else is a bug. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iF4EAREIAAYFAlCz3iAACgkQja8UbcUWM1z7BAEAgRYqLQxCtq18rVYAjB8u+Lfx tQwuPYYO2igi6R48C/wA/2HxhQAU6rIOfDEgv3rJkdSRQk+hjggc8KmuTuVP6nBH =f+Pq -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Carlos E. R.
-
Dennis Gallien
-
Marius Tomaschewski
-
Mark Hounschell
-
Mark Hounschell
-
Per Jessen