DHCP is very unreliable.

Bug #471660 reported by Andrew Walsh
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dhcp3 (Ubuntu)
Expired
Low
Unassigned

Bug Description

I'm using a D-Link DWL-G122 USB wireless dongle with Karmic. I have removed network manager (causes me all sorts of other problems), and am configuring the network using the /etc/network/interfaces file. I find that ubuntu is able to associate this wireless dongle with my access point. However, it cannot reliably get a DHCP lease. After boot, although the wireless is associated, attempting to ping the router results in the message "network is unreachable" (or similar). If I run the command /etc/init.d/networking restart, often dhcp fails to receive a lease (although, sometimes the command works), with results as follows:

andrew@andrew-desktop:/etc/init.d$ sudo /etc/init.d/networking restart
 * Reconfiguring network interfaces... There is already a pid file /var/run/dhclient.wlan0.pid with pid 3493
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:15:e9:a3:8c:13
Sending on LPF/wlan0/00:15:e9:a3:8c:13
Sending on Socket/fallback
DHCPRELEASE on wlan0 to 192.168.1.1 port 67
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Invalid argument.
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/wlan0/00:15:e9:a3:8c:13
Sending on LPF/wlan0/00:15:e9:a3:8c:13
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
                                                                         [ OK ]

I have seen other people in forums with seemingly similar problems, and they have suggested such things as stopping apparmor, which I have tried, and it does not seem to make a whole lot of difference! They also suggest adding a line:

        pre-up sleep 10

after the line

iface wlan0 inet dhcp

in my /etc/network/interfaces file, but I'm not sure this make much difference either.

Thanks,

Andrew Walsh.

ProblemType: Bug
Architecture: amd64
Date: Mon Nov 2 20:41:16 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /sbin/dhclient3
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Package: dhcp3-client 3.1.2-1ubuntu7
ProcEnviron: PATH=(custom, no user)
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: dhcp3
Uname: Linux 2.6.31-14-generic x86_64
XsessionErrors:
 (gnome-settings-daemon:1551): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (nautilus:1584): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:1609): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Revision history for this message
Andrew Walsh (awalsh-iee) wrote :
Revision history for this message
Chuck Short (zulcss) wrote :

Can you attach output of the the following:

dmesg

and the output of the command:

grep dhcp /var/log/daemon.log.

Thanks
chuck

Changed in dhcp3 (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Andrew Walsh (awalsh-iee) wrote :

Thanks for your reply. Sorry it's taken me so long to get back to you. The file dmesg.txt is attached to this message.

Revision history for this message
Andrew Walsh (awalsh-iee) wrote :

Attached to this post is grep2.txt. When you said "grep dhcp /var/log/daemon.log", did you mean "grep DHCP /var/log/daemon.log"? I ask because searching for lower-case "dhcp" didn't look very useful...

Revision history for this message
Andrew Walsh (awalsh-iee) wrote :

Lower-case dhcp search, just in case!

It's worth mentioning that one other thing I tried after my first post and before your response was removing two of the Avahi daemons (avahi-autoipd, I think, and avahi-daemon). Various forum posts seemed to suggest people had problems where it interfered with dhclient operation, but for me, removing it made no obvious difference...

Revision history for this message
Chuck Short (zulcss) wrote :

Please attach your /etc/dhcp3/dhclient.conf file please.

Revision history for this message
Chuck Short (zulcss) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

Revision history for this message
Andrew Walsh (awalsh-iee) wrote :

Sorry for the long delay! Attached...

Thanks,

Andrew.

Revision history for this message
sven (post-svennielsen) wrote :

Might be your having a completely different problem i just experienced:

Something in the WPA encryption wrapper is not working and not able to handle WPA2 with D-Link DWL-G122 USB wireless dongle. If possible, try changing the encryption of your router to "WPA (TKIP)" (instead of WPA/WPA2).

Had the same problem and was able to connect by changing to pure WPA encryption.

To see if your problem is the same try manually assigning IP address, gateway and a working dns server.
System should state "connected", print out correct routes, but network still won't work, then you probably have (had) the same as me.

Eithet D-Link DWL-G122 USB wireless dongle simply does not support WPA2, or the wrapper code gets confuses when setting up WPA encryption on this chipset.

This still needs a fix! as I will probably run into problems with other clients if they only support WPA2 (which is now disabled on my router :(

Regards,
Sven

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for dhcp3 (Ubuntu) because there has been no activity for 60 days.]

Changed in dhcp3 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.