IP changes after some time causing problems with network mounts

Asked by David Rekowski

The problem is I get a samba disconnection after my ip changes due to a dhcp request.

For some unknown reason I have two dhclient processes running:

$ ps ax | grep dhclient
 7768 ? S 0:00 /sbin/dhclient -1 -lf /var/lib/dhcp3/dhclient.eth0.leases -pf /var/run/dhclient.eth0.pid -q -e dhc_dbus=31 -d eth0
21430 ? S<s 0:00 dhclient3 -pf /var/run/dhclient.eth0.pid -lf /var/lib/dhcp3/dhclient.eth0.leases eth0
31550 pts/1 R+ 0:00 grep dhclient

Note: dhclient is a symlink to dhclient3
Note: if you have multiple networking devices in use (wired and wireless, e.g.) you will have two processes as well, but with different ethX

They seem to cause the ip of the device to change after some time (5 minutes to a few hours). This wouldn't be too much a problem, if the mounted network drives would not break after this happens.

Maybe it's not the dhclient processes running that cause this problem, but it's the only point I noticed. It also seems this happens only on machines that were updated to 7.04.

Shouldn't the dhclient processes notice, that there's already a pid file (since they are started with the same pid file configuration -pf) and not start another process?

It might also help to find out what starts the second (or first) process.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
David Rekowski
Solved:
Last query:
Last reply:
Revision history for this message
David Rekowski (david-rekowski) said :
#1

This is the content of /etc/network/interfaces:

auto lo
iface lo inet loopback
iface eth0 inet dhcp
iface ppp0 inet ppp
provider ppp0
auto eth0

And no, static IP is no option, neither locally nor on the dhcp server side.

Revision history for this message
Ralph Janke (txwikinger) said :
#2

Thanks for your question.

The problem is definitely that you have two dhcp clients running. That shouldn't happen. Could it be that you have both dhcp and dhcp3 installed?

Run

dpkg-query -l '*dhc*'

from the commandline and look if they are both installed.

If this is the case I would consider removing the dhcp-client package since it is an old version.

If this is not the case, please tell us, and we have to look at some of the configuration.

I hope this helps

Revision history for this message
David Rekowski (david-rekowski) said :
#3

This is the output of dpkg-query -l '*dhc*':

ii dhcdbd 2.0-2ubuntu3 D-Bus interface to the ISC DHCP client
un dhcp-client <keine> (no description)
ii dhcp3-client 3.0.4-12ubuntu DHCP Client
ii dhcp3-common 3.0.4-12ubuntu Common files used by all the dhcp3* packages
un dhcp3-server <keine> (no description)
un dhcpcd <keine> (no description)

So dhcp-client is not installed.

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
David Rekowski (david-rekowski) said :
#5

This seemed to occur only with machines that were updated from a prior version of ubuntu. We could not solve the problem but rather used a different installation (image) of ubuntu.

Revision history for this message
David Rekowski (david-rekowski) said :
#6

I will mark this problem as solved, although the specific problem was not really solved, but circumvented.