Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a linux server (centos 5) which for the past 2-3 weeks has been resetting it's ip config information to a local ip (192.168.x.x). In /etc/network/interfaces I have:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

So, i would have thought this would sort the problem. I have also tried running a reset of the details at 7am each morning with a cron:

0 7 * * * route add default gw eth0
0 7 * * * ifconfig eth0 netmask

But that doesn't seem to work either.

cat /etc/sysconfig/network:


cat /etc/sysconfig/network-scripts/ifcfg-eth0:


The server is on a managed VPN (i think) inside a building of offices. We aren't aware of any DHCP servers and it's only been happening for 2-3 weeks. The building's network admins say they haven't changed anything that would affect it and we can't think of anything we have done either.

Any help would be much appreciated as I'm really stuck!


Noticed this in boot.log:

May 17 02:02:43 localhost NET[30723]: /sbin/dhclient-script : updated /etc/resolv.conf

So, i've had a look at /etc/resolv.conf and I get this:

; generated by /sbin/dhclient-script


If read a little more about dhclient-script and it's called by dhclient which references dhclient.conf. I think it looks for it in /etc/. The only one i can find on our serve is at /etc/dhcp/dhclient.conf and it contains:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
share|improve this question
Any related information from system logs? – Khaled May 17 '12 at 9:26
@Khaled Interstingling, we have this in boot.log: May 17 02:02:43 localhost NET[30723]: /sbin/dhclient-script : updated /etc/resolv.conf – David May 17 '12 at 9:28
Is this server rebooted every night? – Sirch May 17 '12 at 11:23
@Sirch no, the server is left on – David May 17 '12 at 11:35
Maybe centos has the same bug as some debian releases: if you change an interface from dhcp to static and restart networking or ifdown & ifup, the dhcp client is left running until killed and will reset things when you least need it. – rackandboneman May 17 '12 at 14:13
up vote 1 down vote accepted

The fact that dhclient-script is being called makes me think that NetworkManager service is running, /etc/network/interface's DHCP=no is keeping the iface scripts from being rewritten the way that resolv.conf is, but it isn't preventing dhclient-script from running ifconfig commands and getting at the actual interface configuration.

Here is a CentOS mailing list link about such a thing: and what the author would have you do, if I am correct.

/sbin/service NetworkManager stop

chkconfig NetworkManager off

share|improve this answer
Well, I killed the dhclient process and that seems to have done the trick. I tried running those commands but there isn't a service by that name. So, whatever it is, its dhclient and i image its getting started on bootup. – David May 18 '12 at 8:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.