Cannot get DHCP address - "No DHCPOFFERS received."
Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Cannot get DHCP address - "No DHCPOFFERS received."
I'm running Kubuntu Gutsy Gibbon on a Dell laptop with a Linksys WPC54G v5 PCMCIA card (Marvell chipset). I actually got wireless networking going with a V1 version of this card (Broadcomm chipset), but I needed to change the card to v5 for reasons not relevant here. My router uses WPA-PSK security, and it works just fine for a wired connection to the very same laptop. It also works just fine for a wireless connection under Windows XP.
I can get a connection validated but I can't get the router to send an IP address. According to KWifiManager I have a strong connection, the SSID has been correctly identified, and an access point MAC address is available. The one thing that's not available is the local IP. I'm running wpa_supplicant, and ps -A shows that it is actually running.
I have another laptop running on the same network, also using Kubuntu Gutsy Gibbon, that works just fine. It has a built-in wireless chip. And at one point I actually got the v5 card to work correctly, but after a reboot I could never get it to work again!
Here's the contents of /etc/network/interfaces:
Code:
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth1 inet dhcp
wireless-essid Deerfield
auto eth1
iface eth0 inet dhcp
iface wlan0 inet dhcp
auto eth0
auto wlan0
iface wlan1 inet dhcp
pre-up wpa_supplicant -Bw -Dwext -iwlan1 -c /etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
# wireless-essid Deerfield
auto wlan1
Here's the result of ifconfig and iwconfig:
Code:
root@Polyporus:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:11:43:47:AD:33
inet addr:192.168.0.114 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3429 errors:0 dropped:0 overruns:0 frame:0
TX packets:1777 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1988024 (1.8 MB) TX bytes:297702 (290.7 KB)
Interrupt:21 Base address:0x1800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:55 errors:0 dropped:0 overruns:0 frame:0
TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4326 (4.2 KB) TX bytes:4326 (4.2 KB)
wlan1 Link encap:Ethernet HWaddr 00:18:F8:58:F7:8E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:178 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1209 (1.1 KB) TX bytes:24791 (24.2 KB)
Interrupt:16 Memory:34010000-34020000
wlan1:ava Link encap:Ethernet HWaddr 00:18:F8:58:F7:8E
inet addr:169.254.9.179 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16 Memory:34010000-34020000
root@Polyporus:~# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan1 IEEE 802.11b ESSID:"Deerfield"
Mode:Managed Frequency:2.437 GHz Access Point: 00:13:46:A2:4F:30
Bit Rate=36 Mb/s Sensitivity=-200 dBm
RTS thr=2346 B Fragment thr=2346 B
Encryption key:xxxx Security mode:restricted
Power Management:off
Link Quality:51/100 Signal level:-63 dBm Noise level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Here's the relevant part of dmesg, showing the activation of ndiswrapper:
And here's what happens if I call ifdown and then ifup:
Code:
root@Polyporus:~# ifdown wlan1
There is already a pid file /var/run/dhclient.wlan1.pid with pid 5546
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.5
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/wlan1/00:18:f8:58:f7:8e
Sending on LPF/wlan1/00:18:f8:58:f7:8e
Sending on Socket/fallback
DHCPRELEASE on wlan1 to 192.168.0.1 port 67
root@Polyporus:~# ifup wlan1
There is already a pid file /var/run/dhclient.wlan1.pid with pid 134519120
Internet Systems Consortium DHCP Client V3.0.5
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/wlan1/00:18:f8:58:f7:8e
Sending on LPF/wlan1/00:18:f8:58:f7:8e
Sending on Socket/fallback
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 16
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
* Starting portmap daemon...
* Already running.
...done.
* Starting NFS common utilities
...done.
One other thing: I can get the card to work with a fixed IP address, but that's not a satisfactory solution for several reasons.
So how can I get DHCPDISCOVER to work?
Last edited by pwabrahams; 07-05-2008 at 08:20 PM.
Reason: Add more information
After fiddling around with things that made no apparent difference, I got the card to work after bootup -- twice. Then, on the third bootup, it didn't.
So I tried something else: resetting the router. That seemed to make it work again, but there's no way to know what the future will bring.
Can someone interpret this output from wpa_supplicant?
I still have the problem with being unable to connect with my wireless network from Linux because I can't get a response from DHCP. It happens on two different Dell laptops, both of which have Linksys PCMCIA plug-in network cards. I even tried replacing the router, but that didn't help either. So I tried stopping wpa_supplicant and starting it again in debug mode. I suspect the output will reveal just what the cause of the problems is, but I don't know how to interpret it. Here it is, with repetitive parts deleted:
I think I have the same issue as you. I cannot get a DHCP ip address on my IBM thinkpad x60 unless I reboot my router.
Once I reboot, things work fine. My XP laptop has no issues connecting to the router, and the problem only started
happening after I upgraded to 8.04 (Kubuntu). I am not near my kubuntu laptop, so I will try to go over my logs later on.
My wireless card is an atheros something, and my router is an SMC something.
It used to be that rebooting the router solved the problem, but no longer. In fact, I even tried replacing the router, and that made no difference either (but it cost me $30 or so).
It does seem odd (and probably revealing) that the behavior should be affected by the state of the router, given that the router can respond perfectly well to DHCP requests from Windows.
The secret probably lies in that long output I posted, but I have no idea how to interpret it.
I had noticed that the card could associate with the access point, though it would drop that status after a while. But that didn't get me the DHCP-assigned address.
Sometimes when I can't get the wireless to work, I hook up the Ethernet cable, which is much less convenient. That accounts for the eth0 connection. If the wireless worked, I wouldn't be bothering with the cable.
Association seems to exist but doesn't yield an IP address
Quote:
Originally Posted by Mr. C.
Not obtaining a DHCP lease is the symptom, the problem being association issues with the access point.
Any suggestions as to how I can track that down? As I noted earlier, I do get an association, at least some of the time, but it never yields an IP address.
Quote:
It is DHCP that gets the focus, because the error messages tend to focus on failure to obtain an IP.
I've attached a copy of my logs (from ksystemlog). Worksheet 1 shows a successfull DHCP lease after rebooting the router, Worksheet 2 shows a unsuccessful attempt. XLS of log output
I don't see any oddities in the diagnostics from NetworkManager.
I presume AccessPoint1 is your AP.
The DHCPDISCOVER messages are being sent; whether they are being received but ignored on the AP, or not received at all can't be known from the output. Does your SMC have any logging? Can you see if there are any errors, events, or anything that indicates what is happening on the AP ?
From NetworkManager, try disabling any other Ethernet devices, and the wireless. Wait a moment, and then reenable the wireless.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.