I've had the same issue. The dhclient daemon is insane. The sanity checks need work. It should go something like this:
- Discover existing lease information (/var/lib/dhcp/*)
- Validate all interfaces for DHCP configuration (/etc/network/interfaces)
- If an interface is statically configured then clear DHCP lease information and ignore the interface for the duration of the execution.
- If an interface is not statically configured and has existing lease information, then renew accordingly.
- If an interface is not statically configured and does not have existing lease information, then discover accordingly.
HISTORY --------------------------------------------------------------
While the issue was ongoing I witnessed /var/log/syslog fill up with the following line:
May 3 06:25:36 xxxxxx dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
The dhclient process was running in the background as confirmed with 'ps aux | grep dhc'
Having confirmed correct static IP setup for eth0 in '/etc/network/interfaces', I restarted the networking service. After the networking service was restarted the static IP was maintained until the lease reached halflife, at which point dhclient renewed the previously DHCP assigned address, which was received on initial configuration of the system. This information is maintained in '/var/lib/dhcp/*'.
This behavior has been witnessed on three systems I've been working on over the last few days. System info:
# cat /etc/issue.net
Debian GNU/Linux 7
# cat /proc/version
Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.68-1+deb7u1
# dhclient -version
Internet Systems Consortium DHCP Client 4.2.2
RESOLUTION -----------------------------------------------------------
Note: Perform as root or add sudo to each command.
# dhclient -r
# dhclient -x
# rm /var/lib/dhcp/*
# shutdown -r 0
Result: The dhclient process did not automatically start with the system, 'ifconfig' shows that eth0 was correctly configured with the static IP, syslog is clear of the DHCP spam, and the change is persistent through multiple system restarts.
CAUTION: My systems are reliant on a statically assigned IP address to operate correctly. If you're applying this fix to a laptop it will likely break wifi connectivity.
You could ask this in askubuntu.com or unix.stackexchange.com and get better/faster answers – Toto – 2010-10-29T18:20:10.747
I believe this is my problem: http://superuser.com/questions/99034/ubuntu-8-04-server-is-not-retaining-a-static-ip-address. Gnome is trying to manage my network for me. Thanks for the suggestion though.
– slim – 2010-10-29T18:49:15.1431This looks like NetworkManager acting up. Do you have NetworkManager running? Do you want to? – Gilles 'SO- stop being evil' – 2010-10-30T00:25:49.857
That's what the problem was. I disabled the Gnome networking and it's been ok. Thanks for the help. – slim – 2010-11-14T04:44:49.067