I'm trying to use a USB WiFi adapter to connect to a wireless router.

I assume the adapter is brought to life with the correct driver, because # iwconfig gives some reasonable output:

wlan0     IEEE 802.11bg  ESSID:"MYNET"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:1C:4A:A6:8F:0E   
          Bit Rate=54 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=70/70  Signal level=-40 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:49   Missed beacon:0

Also, I assume that the authentication between the router and my adapter was successful, because # wpa_cli status says "COMPLETED":

Selected interface 'wlan0'

Question 1: With information like this, am I correct to assume that my adapter runs fine as interface wlan0, and that the router has accepted my key and is ready and willing to establish a connection? I am not having any WPA2 authentication issues?

Now, to use wlan0, it needs an ip address, and the router is set up as a DHCP server, with DHCP addresses ranging from to As far as I understand the DHCP negotiation process, dhclient should work with the defaults, i.e. it broadcasts at, and the router should answer as, finally issuing an available address. Hoewever, # dhclient wlan0 -v, just gives up after a while:

Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:0d:0b:35:ca:14
Sending on   LPF/wlan0/00:0d:0b:35:ca:14
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to port 67 interval 3
DHCPDISCOVER on wlan0 to port 67 interval 6
DHCPDISCOVER on wlan0 to port 67 interval 15
DHCPDISCOVER on wlan0 to port 67 interval 8
DHCPDISCOVER on wlan0 to port 67 interval 8
DHCPDISCOVER on wlan0 to port 67 interval 10
DHCPDISCOVER on wlan0 to port 67 interval 11
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

Question 2: (Probably the harder part to answer?) Why is the broadcast DHCPDISCOVER not getting a proper reply, i.e. a DHCPOFFER?

Some more info and hints on possible gotchas I may or may not be running into:

  • The router does not use MAC filtering.
  • Using a static ip outside the router's DHCP range (, I was able to connect and even get into the router's html configuration tool at
  • The box I'm trying to connect from has a wired interface (eth0). Any chance that the DHCP client request from wlan0 is not sent over the air in order to establish a DHCP ip connection on, but into my wired subnet ( There's no DHCP server on the wired subnet, so the DHCP request may just end up being lost in How would I debug and rule out something like this?
  • The box has Debian wheezy (7.0) installed. Having used the box in a wired subnet with static ip addresses, I may have forgotten to change a configuration somewhere that may be needed for dhclient to work.

I had a similar issue with my setup. My router (Linksys E2500) would not give a DHCP offer until the original DHCP lease for the machine's MAC expired.

To fix this, I had to manually remove the entry from my router's lease table and attempt to bring the wlan interface back up.

I'm not sure why this happens; perhaps someone more familiar with the way the hardware and DHCP works on Debian can enlighten us.

  • Hmmm... after manually changing my WiFi adapter's MAC address (ifconfig wlan0 down, ifconfig wlan0 hw ether newmac, ifconfig wlan0 up), dhclient was able to establish a connection and obtain an IP from the router. This seems to support your theory. I'll try some more things to make sure this is the root cause... – zebonaut Jul 7 '13 at 21:23
  • 1
    Check. This must have been the reason. As I'm typing this, I have diabled the wired interface (eth0), and the router has accepted my WiFi interface (wlan0), after the leases have all expired. – zebonaut Jul 8 '13 at 21:53
  • I'd only add that if the device has a DHCP reservation on the router you need to delete it and re-add. – Steve Smith Oct 18 '16 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.