Super User is a question and answer site for computer enthusiasts and power users. 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'm trying to set a static IP address in Ubuntu 11.04. I did a server install. I edited my /etc/network/interfaces file to include:

auto eth0
iface eth0 inet static

When I do a /etc/init.d/networking restart this appears to take. After awhile though, that will turn into something dished out by the DHCP server.

My problem appears to be similar to this: Ubuntu intrepid - static IP networking keeps restarting with DHCP

But I don't have Gnome installed. Is there anything else that's running in the background that could be doing this? And if so, how do I disable it?

share|improve this question
Have you deactivated DHCP for you auto eth0 connection? – Michael K May 19 '11 at 7:23
Do I do that somewhere else besides the iface eth0 inet static line above? dhclient doesn't appear to be running. – mrduclaw May 20 '11 at 0:41
up vote 1 down vote accepted

Remove or comment out the "auto eth0" line... if you are defining it as static below that line then you don't need it 'auto' in the first place.

My guess is that it is a race condition where since static can be set right NOW that is the one that gets completed first.. DHCP takes a bit longer to establish since there is a bit of server communication and hand-shaking that needs to take place, and thus when that finally completes it overwrites your already-finished-setting static IP.

I have not tested this on my machine as everything is unplugged due to a storm in my area, but this is my best untested guess.

share|improve this answer

Try searching through log files. To be more specific, I have noticed that /var/log/syslog logs every IP change.

Few possible greps

grep -i eth0 /var/log/syslog

grep -i /var/log/syslog

To search every log
grep -i eth0 /var/log/*

share|improve this answer

If NetworkManager is installed (dpkg -l network-manager should display an entry beginning with ii), it may interfere with ifupdown settings.

Try updating /etc/NetworkManager/NetworkManager.conf, enabling ifupdown plugin and disabling managing of interfaces specified in /etc/network/interfaces.

Mine looks like this:



There may be other plugins activated; you should then add them at end of plugins stanza, separating names with comma, and appending the [ifupdown] section to the end of the file.

share|improve this answer

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.