strange behaviour - dhclient needs to be run twice in order to connect to wireless

Posted by splicer on Super User See other posts from Super User or by splicer
Published on 2009-10-28T13:20:14Z Indexed on 2010/03/19 15:01 UTC
Read the original article Hit count: 319

I am trying to connect my to my wlan without the use of NetworkManager. I run the following commands after boot:

iwconfig wlan0 enc <WEP passwd> mode managed essid <name> channel 6
ifconfig wlan0 up
dhclient wlan0

At this point, dhclient stalls for ages (perhaps 2 minutes), then it returns with

PING 192.168.1.254 (192.168.1.254) from 192.168.1.65 wlan0: 56(84) bytes of data.

--- 192.168.1.254 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3000ms
pipe 3

.. The strange thing is that when I run pkill dhclient; dhclient wlan0 right after this, it connects in about <3 seconds.

Any idea what could be the cause of this problem?

Edit: oh, and I did try using the -timeout flag on dhclient but that didn't seem to make any difference (it still stalled for ages).

© Super User or respective owner

Related posts about wireless-networking

Related posts about wireless