Help needed: wpa_supplicant on SuSE 9.1 Pro
My Toshiba laptop works fine with wireless-G (atheros chipset) with WEP and DHCP on SuSE 9.1. Now I am trying to get wpa_supplicant to work so I could switch to WPA-SPK. I downloaded and tried to compile the latest wpa_supplicant but found that the madwifi driver (the driver for the atheros chip) that came with 9.1 is too old. So I downloaded, compiled and installed the latest madwifi driver and got it up and working in WEP mode. So far so good. The header files from the new madwifi driver tarball also allowed me to successfully compile and install wpa_supplicant. Now, I am trying to get it all to behave nicely with SuSE's network configuration and startup programs and scripts. Herein lies the problem. I modified the /etc/sysconfig/network/ifcfg-wlan-* file to remove the WEP key stuff. I can manually start the network with rcnetwork start; manually start the wpa_supplicant daemon with the appropriate options, then manually iwconfig the ssid, rate; manually ifconfig the IP number, netmask and broadcast; manually set the default route; and manually create a valid /etc/resolv.conf. This makes a fully working wireless connection. However, I can't get it all to play automatically via DHCP. Here are the questions. 1. What's a good place to insert the command to start the wpa_supplicant daemon? It seems that it matters when wpa_supplicant should be started. Start it too soon before the network is configured, and it doesn't work. Wait too long after I manually configure things, and it doesn't work either. Also, wpa_supplicant needs to be killed when the network is stopped, or else it seems to bring up the interface again (without fully configuring everything). So I need also some tips on where to insert the command to stop wpa_supplicant during network shutdown. 2. Any concrete examples of what the /etc/sysconfig/network/ifcfg-wlan-* file should look like? I wonder if I am missing something. 3. Any thoughts why DHCP doesn't work when I enable the interface and start wpa_supplicant? I googled and found some threads but nothing helped me solve this problem, and there were some discussions on the suse-laptop list in German that I do not understand. Am I treading on uncharted waters? Since WEP is not secure enough I'd really like to get WPA going. Hope that someone could provide some help. Thanks in advance. -Ti -- Ti Kan http://www.amb.org/ti Vorsprung durch Technik
On Wednesday 27 October 2004 7:57 pm, Ti Kan wrote:
Here are the questions.
1. What's a good place to insert the command to start the wpa_supplicant daemon? It seems that it matters when wpa_supplicant should be started. Start it too soon before the network is configured, and it doesn't work. Wait too long after I manually configure things, and it doesn't work either. Also, wpa_supplicant needs to be killed when the network is stopped, or else it seems to bring up the interface again (without fully configuring everything). So I need also some tips on where to insert the command to stop wpa_supplicant during network shutdown.
Can't help there, I'm looking for that same answer.
2. Any concrete examples of what the /etc/sysconfig/network/ifcfg-wlan-* file should look like? I wonder if I am missing something.
I left mine set the same way it was set for WEP.
3. Any thoughts why DHCP doesn't work when I enable the interface and start wpa_supplicant?
The dhcpdc client has to be run _after_ wpa_supplicant is started. I also found that I had to bring eth0 down (even though I was not hooked up to a wired network). With etho0 down, dhcpdc is able to get the settings, just takes a while (a couple of minutes), then everything starts working. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.5-7.111-default x86_64
Scott Leighton writes:
On Wednesday 27 October 2004 7:57 pm, Ti Kan wrote:
1. What's a good place to insert the command to start the wpa_supplicant daemon? It seems that it matters when wpa_supplicant should be started. Start it too soon before the network is configured, and it doesn't work. Wait too long after I manually configure things, and it doesn't work either. Also, wpa_supplicant needs to be killed when the network is stopped, or else it seems to bring up the interface again (without fully configuring everything). So I need also some tips on where to insert the command to stop wpa_supplicant during network shutdown.
Can't help there, I'm looking for that same answer.
I think I have it mostly figured out now. The place to insert the wpa_supplicant startup is within the /sbin/ifup script, after it runs ifup-wireless (where it sets up the wireless interface's parameter using iwconfig), but before it runs ifup-dhcp (to invoke dhcpcd). I made some "hook" calls into /sbin/ifup to call my own wpa startup and shutdown scripts, and got almost everything behaving the way they should. Well, *almost*. DHCP is still not quite working, though. Here are my observations: 0. /sbin/ifup runs ifup-wireless successfully, and the ssid, ap, etc are all set up properly. 1. wpa_supplicant gets started correctly, and ifup-dhcp starts dhcpcd (as verified running in the background as: "/sbin/dhcpcd -H -D-N -t 999999 -I myhostname -B -h myhostname ath0" It just stays there in the background and the interface does not get its IP number/DNS/gateway back from the DHCP server. 2. On the DHCP server machine (also a SuSE 9.1 box), the /var/log/messages shows: Oct 28 04:35:23 bazooka dhcpd: DHCPREQUEST for 10.20.1.129 from 00:90:96:c1:ed:f4 via eth0 Oct 28 04:35:23 bazooka dhcpd: DHCPACK on 10.20.1.129 to 00:90:96:c1:ed:f4 via eth0 Oct 28 04:35:27 bazooka dhcpd: DHCPREQUEST for 10.20.1.129 from 00:90:96:c1:ed:f4 via eth0 Oct 28 04:35:27 bazooka dhcpd: DHCPACK on 10.20.1.129 to 00:90:96:c1:ed:f4 via eth0 Oct 28 04:35:33 bazooka dhcpd: DHCPDISCOVER from 00:90:96:c1:ed:f4 via eth0 Oct 28 04:35:33 bazooka dhcpd: DHCPOFFER on 10.20.1.129 to 00:90:96:c1:ed:f4 via eth0 Oct 28 04:35:37 bazooka dhcpd: DHCPDISCOVER from 00:90:96:c1:ed:f4 via eth0 Oct 28 04:35:37 bazooka dhcpd: DHCPOFFER on 10.20.1.129 to 00:90:96:c1:ed:f4 via eth0 Oct 28 04:35:45 bazooka dhcpd: DHCPDISCOVER from 00:90:96:c1:ed:f4 via eth0 Oct 28 04:35:45 bazooka dhcpd: DHCPOFFER on 10.20.1.129 to 00:90:96:c1:ed:f4 via eth0 Oct 28 04:36:01 bazooka dhcpd: DHCPDISCOVER from 00:90:96:c1:ed:f4 via eth0 Oct 28 04:36:01 bazooka dhcpd: DHCPOFFER on 10.20.1.129 to 00:90:96:c1:ed:f4 via eth0 ... and on and on forever So the laptop's dhcpcd is able to reach the DHCP server, but the server's response doesn't seem to be acknowledged by the laptop. If I kill the dhcpcd on the laptop and manually ifconfig the IP address, netmask and broadcast, and manually add a default route, then the network becomes fully functional. Any idea what might be wrong here? -Ti -- Ti Kan http://www.amb.org/ti Vorsprung durch Technik
participants (2)
-
Scott Leighton
-
ti@amb.org