dhclient continually seeks ip address on unconnected interface

Bug #190359 reported by Robert Di Gioia
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
dhcp3 (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

I run an up-to-date Gutsy Gibbon (7.10) on a no-name laptop. I use wireless network with WPA supplicant almost exclusively.

Recently, after the latest round of updates, I have noticed that my syslog is getting flooded with messages from dhclient. It appears that every four minutes, dhclient is trying to obtain an IP address for eth0, which is the wired interface, and is not connected. Each time dhclient runs, it outputs between 5 and 7 lines into /var/log/syslog.

Running the command sudo ifdown eth0 stops the messages.

Previously (i.e. before the last couple of weeks or so), the system did not continually try to obtain an IP on the unconnected wired interface eth0.

Output of uname -a:
Linux gandalf 2.6.22-14-generic #1 SMP Fri Feb 1 04:59:50 UTC 2008 i686 GNU/Linux

Output of dpkg -S /sbin/dhclient:
dhcp3-client: /sbin/dhclient

From /etc/network/interfaces
# loopback
auto lo
iface lo inet loopback

# wired interface
auto eth0
iface eth0 inet dhcp

# wireless interface
auto eth1
iface eth1 inet dhcp
wpa-driver wext
wpa-ssid <SNIP>
wpa-ap-scan 1
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk <SNIP>

eth0 boot messages from /var/log/syslog
Feb 8 20:20:01 gandalf kernel: [ 3.588000] eth0: RTL8168b/8111b at 0xf8864000, 00:16:d4:b5:50:e3, XID 38000000 IRQ 19
Feb 8 20:20:01 gandalf kernel: [ 11.632000] r8169: eth0: link down
Feb 8 20:20:03 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
Feb 8 20:20:09 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
Feb 8 20:20:10 gandalf kernel: [ 26.728000] ADDRCONF(NETDEV_UP): eth0: link is not ready
Feb 8 20:20:20 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
Feb 8 20:20:28 gandalf avahi-autoipd(eth0)[6250]: Found user 'avahi-autoipd' (UID 104) and group 'avahi-autoipd' (GID 110).
Feb 8 20:20:28 gandalf avahi-autoipd(eth0)[6250]: Successfully called chroot().
Feb 8 20:20:28 gandalf avahi-autoipd(eth0)[6250]: Successfully dropped root privileges.
Feb 8 20:20:28 gandalf avahi-autoipd(eth0)[6250]: fopen() failed: Permission denied
Feb 8 20:20:28 gandalf avahi-autoipd(eth0)[6250]: Starting with address 169.254.9.141
Feb 8 20:20:34 gandalf avahi-autoipd(eth0)[6250]: Callout BIND, address 169.254.9.141 on interface eth0
Feb 8 20:20:36 gandalf avahi-daemon[5659]: Joining mDNS multicast group on interface eth0.IPv4 with address 169.254.9.141.
Feb 8 20:20:36 gandalf avahi-daemon[5659]: Registering new address record for 169.254.9.141 on eth0.IPv4.
Feb 8 20:20:38 gandalf avahi-autoipd(eth0)[6250]: Successfully claimed IP address 169.254.9.141
Feb 8 20:20:38 gandalf avahi-autoipd(eth0)[6250]: fopen() failed: Permission denied

Example log noise from /var/log/syslog
Feb 8 07:42:49 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Feb 8 07:42:52 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
Feb 8 07:43:00 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20
Feb 8 07:43:20 gandalf dhclient: No DHCPOFFERS received.
Feb 8 07:43:20 gandalf dhclient: No working leases in persistent database - sleeping.
Feb 8 07:46:50 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Feb 8 07:46:54 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Feb 8 07:46:59 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
Feb 8 07:47:06 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
Feb 8 07:47:14 gandalf dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
Feb 8 07:47:21 gandalf dhclient: No DHCPOFFERS received.
Feb 8 07:47:21 gandalf dhclient: No working leases in persistent database - sleeping.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 or 9.04?

Changed in dhcp3:
status: New → Incomplete
Revision history for this message
Robert Di Gioia (digioiar) wrote :

Hi Daniel.

I re-enabled my eth0 (wired) connection and restarted networking, and am again seeing a steady stream of messages from dhclient every 4 minutes or so.

I'm on an up-to-date 8.10 system.

uname -a: Linux gandalf 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686 GNU/Linux

Regards,

Robert

Revision history for this message
Jonas Häggqvist (rasher) wrote :

Hi Robert,

What is the contents of your /etc/network/interfaces?

I had the following:

allow-hotplug eth0
iface eth0 inet dhcp

Which caused this to happen. This is on a Debian system, but I'd be surprised if it's not the same issue. My "fix" was simply to remove these lines and let network-manager handle the interface.

I would have expected ifupdown (guessing that's responsible) to be able to do cable sensing and not just keep trying.

Chuck Short (zulcss)
Changed in dhcp3 (Ubuntu):
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Joseph Reeves (iknowjoseph) wrote :

I'm suffering this on 9.10, although I didn't on 9.04 and earlier. I suppose, in fairness, I'm suffering this issue on a connected interface, unlike the original reporter, although I think it's the same issue and it causes problems for me:

I connect to a network with a DHCP server and run:

sudo dhclient eth0

and all works fine; I have an address and do what I want to do. Then I move to a network without a dhcp server and run:

sudo ifconfig eth0 192.168.blah.blah/24 && sudo ip ro add default via 192.168.blah.blah

And all works fine again; I'm connected to my new network and do what I want to do. Until a few minutes later when (according to /vat/log/syslog) the address is dropped and dhclient tries to acquire a new one. It fails and I'm left unconnected. Running

sudo pkill dhclient

solves the problem. I have run this exact setup / procedures on 8.04, 8.10 and 9.04 without suffering this behavior from dhclient. It's particularly annoying!

joseph@joseph-work:~$ uname -a
Linux joseph-work 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009x
joseph@joseph-work:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

Revision history for this message
Bryce Nesbitt (bryce2) wrote :

Still true on Ubuntu 12.04. You get the DHCPDISCOVER log line constantly, until the disconnected interface is taken down.

Dec 8 18:35:33 hardhat dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 12
Dec 8 18:35:45 hardhat dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 7
Dec 8 18:35:52 hardhat dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 18
Dec 8 18:36:10 hardhat dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 9
Dec 8 18:36:19 hardhat dhclient: No DHCPOFFERS received.
Dec 8 18:36:19 hardhat dhclient: No working leases in persistent database - sleeping.
Dec 8 18:36:20 hardhat dhclient: DHCPRELEASE on eth3 to 192.168.1.1 port 67
Dec 8 18:36:20 hardhat avahi-autoipd(eth3)[2309]: Got SIGTERM, quitting.

Revision history for this message
ssameer (ssameer) wrote :

I am getting this on Ubuntu 14.10. I have removed the eth0 lines from /etc/network/interfaces, but no effect.

Revision history for this message
Joe Butler (joe-butler) wrote :

I think I have the same issue on 14.04 Server, at least it appears to be the same issue. No network-manager.

If the server is configured for DHCP and you later change it to static, the dhcp client daemon still goes out and requests a DHCP address.

This impacts DNS for the device. The static IP remains on the interface, but the DNS record changes making it unreachable via hostname.

The work around that I found, other than killing the dhclient process, is deleting the dhcp client database and rebooting.
rm /var/lib/dhcp/dhclient.*

You could probably just kill the related interface files if you wanted to.

Based on the way this is behaving, I suspect its the same issue as not having the interface active.

Revision history for this message
Marco B (marco-bertaglia) wrote :
Download full text (6.0 KiB)

I have a similar or same issue with Ubuntu 14.04.01 on a desktop with a Ethernet connection only that worked with Ubuntu 8.04 since 2006. Since updating, no internet.

I decided to upgrade and did a clean install of Ubuntu 14.04.01 trusty and I NEVER had Internet again on this dektop. I am sure (tested) that the cable is OK, the hardware is OK, the internet connection is OK

I have tried a lot of things and a long time spent with excellent support form the comunity in Italy via IRC did not solve the issue.

uname
Linux marco-desktop 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

dmesg|grep tg3
[ 1.156680] tg3.c:v3.134 (Sep 16, 2013)
[ 1.230990] tg3 0000:03:00.0 eth0: Tigon3 [partno(BCM95789) rev 4101] (PCI Express) MAC address 00:0f:ea:4c:4e:1a
[ 1.231000] tg3 0000:03:00.0 eth0: attached PHY is 5750 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[0])
[ 1.231006] tg3 0000:03:00.0 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
[ 1.231012] tg3 0000:03:00.0 eth0: dma_rwctrl[76180000] dma_mask[64-bit]

ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0f:ea:4c:4e:1a
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
          Interrupt:18

interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

lshw -C network
  *-network
       description: Ethernet interface
       product: NetLink BCM5789 Gigabit Ethernet PCI Express
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: eth0
       version: 11
       serial: 00:0f:ea:4c:4e:1a
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.134 firmware=5789-v3.29a latency=0 link=no multicast=yes port=twisted pair
       resources: irq:18 memory:e4000000-e400ffff

lspci -nnk
00:00.0 Host bridge [0600]: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub [8086:2770] (rev 02)
 Subsystem: Gigabyte Technology Co., Ltd Device [1458:5000]
00:01.0 PCI bridge [0604]: Intel Corporation 82945G/GZ/P/PL PCI Express Root Port [8086:2771] (rev 02)
 Kernel driver in use: pcieport
00:1b.0 Audio device [0403]: Intel Corporation NM10/ICH7 Family High Definition Audio Controller [8086:27d8] (rev 01)
 Subsystem: Gigabyte Technology Co., Ltd GA-8I945PG-RH Mainboard [1458:a102]
 Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge [0604]: Intel Corporation NM10/ICH7 Family PCI Express Port 1 [8086:27d0] (rev 01)
 Kernel driver in use: pcieport
00:1c.2 PCI bridge [0604]: Intel Corporation NM10/ICH7 Family PCI Express Port 3 [8086:27d4] (rev 01)
 Kernel driver in use: pcieport
00:1d.0 USB controller [0c03]: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 [8086:27c8] (rev 01)
 Subsystem: Gigaby...

Read more...

Revision history for this message
Joe Butler (joe-butler) wrote :

Marco B - Is only your loopback configured in /etc/network/interfaces? Whats the full contents of that file?

Revision history for this message
João M. S. Silva (joao-m-santos-silva) wrote :

I have this in Ubuntu 14.04.3 LTS.

$ cat interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-driver nl80211
wpa-conf path_to_wpa_conf

Revision history for this message
Stephen Hill (steve-d-hill) wrote :

I have the same problem in Ubuntu 14.04.3 too...here's my /etc/network/interfaces.

  # Localhost
  auto lo
  iface lo inet loopback

  ##########################
  # WAN - connected to MODEM
  ##########################
  # We use allow-hotplug here as otherwise get boot hang if modem down
  auto eth0
  allow-hotplug eth0
  iface eth0 inet dhcp

The problem comes and goes.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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