After connecting with wpa_supplicant, dhcp is not working

Aaron Small aaron.small.99a at gmail.com
Thu Apr 22 11:54:26 EDT 2010


Hello,

I'm having trouble connecting to a dlink WBR-2310 AP over wifi with
WPA using wpa_supplicant. After wpa_supplicant completes, I attempt to
use dhcp and do not get a response from the router. If I set an IP
manually with ifconfig, however, then the connection does work, I can
access the internet with no problems.

This sounded to me like it might be a problem with my dhcp client,
except that if I reboot the router, then the problem disappears for
somewhere between 24 and 48 hours. During the next 24 hours, after
wpa_supplicant completes, dhcp does work, with 100% reliability. By 48
hours later, it will not work anymore. If I reboot the router again,
it will work for another 24 hours.

This sounded to me like it might be a problem with the router, except
that I had none of these problems until recently when I upgraded
wpasupplicant. The computer runs debian, and I updated the
wpasupplicant package from version 0.6.9-3 to 0.6.10-2. Prior to this
upgrade, wpa_supplicant and dhcp worked perfectly all the time. I'd
like to just go back to the previous version, but I can't find that
debian package on the internet, and when I download the wpa_supplicant
source for version 0.6.9 and compile that, it has the same problem I'm
currently experiencing, as in the 0.6.10-2 debian package. I couldn't
figure out how to get the source that matches the debian 0.6.9-3
package.

I know it isn't that my router coincidentally started malfunctioning
at the same time as the upgrade, because I have another computer
running newer software that has experienced this problem for several
months longer, but until it started happening on a second computer
during a software upgrade, I thought it was a router problem.

Another thing I think might be related is that no incoming data is
accepted by the computer until I make an outgoing connection. If
computer A is experiencing these problems and computer B is another
computer on the subnet, connected with wired ethernet, then:
1) Set IP address on A with ifconfig
2) ssh from B to A -> fails, no response
3) ssh from A to B -> succeeds
4) ssh from B to A -> succeeds

That is, no incoming connection works UNTIL an outgoing TCP connection
has been made. It doesn't matter where the outgoing connection is to,
connecting to some other computer also works, but it has to be TCP to
make incoming connections start working. I'm wondering if the same
thing is happening: the dhcp request is going out (it is going out, I
can see it in tcpdump from B), but responses are not being processed
until after an outgoing TCP connection has been made, so A does not
get an IP address.

Has anyone experienced something like this, or have an idea how to
diagnose it? I have wpa_supplicant logs collected with -dd if these
would be of any help.


Thanks,
Aaron Small


More information about the HostAP mailing list