DNS servers disappear on restart

Bug #240063 reported by mindracer on 2008-06-14
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Nominated for Intrepid by mindracer

Bug Description

Hardy Heron 8.10

I use a Static IP on a wired connection in ubuntu, I have to add the DNS server(s) manually in the DNS tab. Whenever I reboot my computer, I have to go add the DNS server manually. My static IP information on the wired connection stays there, but DNS servers disappear and have to manually re-add at every re-boot.

mindracer (dsartoros) wrote :

Continuation.. I installed ubuntu on a MAC G5 (ported), and it has the same issue.

I'm guessing not alot of people use static IPs on ubuntu or else someone would have noticed that DNS go missing after every reboot :(

JamesLavin (james-patriotsbook) wrote :

I have the same problem. I also use static IP, and my "DNS Servers" settings keep disappearing after I reboot.

When I re-enter the DNS information, wireless works fine again.

hawran (hawran.diskuse) wrote :

I've got the same problem (Hardy 8.04).


hawran (hawran.diskuse) wrote :

Is actually anybody doing anything with this bug?

mindracer (dsartoros) wrote :

I hope they do, it seems like a pretty big bug to me, I guess most ubuntu users use DHCP :(

hawran (hawran.diskuse) wrote :

I'd like to know if anything is going on with this error.
I've thought that saving the internet settings as 'a location' should have helped, it didn't.
I've been told to 'Configure your DNS servers in /etc/resolve.conf', however, there's a line on the very top within the file which goes like: 'don't edit manually as it'll be changed by resolvconf' (or something like that).

So, I've upgraded to the last version of Ubuntu and it's UNUSABLE at the moment.
Should I just unistall it and forget Ubuntu?


hawran (hawran.diskuse) wrote :

I've tried to find anything related to this isse and the only thing that seemed to be helping was as follows:
from http://brainstorm.ubuntu.com/idea/11861/

As I agree that the trick with the chattr command is NOT a proper solution, I' ve tried the second suggeestions.

To setup something within the /etc/dhcp3/dhclient.conf file. I've used the append statement instead of prepend. I'd say it doesn't matter, I just wanted to have the DNS servers by dhcp (when using dhcp settings) before those ones needed when I choose my static IP settings.

Well, when I choose my 'dhcp IP location' and reconfigure my network settings, I get the DNS servers from dhcp and then those ones for my static IP settings. (the DNS servers are within the /etc/resolv.conf file and I'm able to connect to the internet)

However, when I choose my 'static IP location' and reconfigure my network, there's NOT any DNS server. (the /etc/resolv.conf file is EMPTY and I' NOT able to connect to the internet)

WHAT am I supposed to do now?


HonoredMule (honoredmule) wrote :

I can confirm this bug. I installed an 8.10 home server/gateway when it first came out, and it took me a while to even notice the bug because I run my own DNS server, but I now get reminded every time I try to 'dig' an address after a reboot.

Given how critical a failure this can be for static IP users, I'm surprised this bug doesn't have a much higher priority.

hawran (hawran.diskuse) wrote :

Hi all,
I've been working recently with the solution II) from my last post: hawran wrote on 2008-09-15 ( https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/240063/comments/7 ) and my findings are as follows:

I needed to put my DNS servers into a 'Network Location' that I'd saved for my connection with a static IP.

Having the DNS server within the /etc/dhcp3/dhclient.conf file, I'm able to reconfigure my network access according to my network abilities at the moment (either with DHCP or with a static IP).

Of course, I need to reconfigure it after every reboot, however, as long as I'm able to connect after reconfiguring I'm satisfied with it.


PS I think this information worth being written in a documentation as it is REALLY a big inconvenience.

Ondřej Surý (ondrej) wrote :

As workaround you can configure your nameservers in /etc/network/interfaces, just add:

nameservers <ip> <ip>


iface ethX static

hawran (hawran.diskuse) wrote :

The problem is I haven't configured anything within the interface file and I don't want to. Why?

As I said, I need two network configurations:
1) one with DHCP
2) one with the static address

AFAIK the network manager is supposed to maintain my different network settings, however, my latest findings are that it DOES NOT (to the contrary to my previous comment on 2008-09-24, https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/240063/comments/9 ).

I still need to add the DNS servers for my 'Static Settings' after every network reconfiguration! Even when I have saved it. As I know what's going on (I mean I know what to do to make it working) I'm able to connect to the internet. However, I don't think it's acceptable for anyone who doesn't know anything about it.

It's a BUG a it's really annoying.


Ys (lubog) wrote :

I had the same problem with my DNS IP addresses on ubuntu 8.04. After each reboot were DNS records blanked. I suppose it was caused by "resolvconf" package that I had installed. This package probably overwrote DNS records in "/etc/resolv.conf" after each reboot. After uninstalling of this package is everything all right, no need to enter DNS IP addresses manualy.

hawran (hawran.diskuse) wrote :

Well, the problem is I need to use two internet connections:
1) via DHCP
2) with static IPs

I've done a couple of further tests and my findings are as follows:
*) I've removed my lines from /etc/dhcp3/dhclient.conf as they've been useless
*) I've added two DNS IPs for my static connection into /etc/resolvconf/resolv.conf.d/tail

1) I get DNS IP's into the /etc/resolv.conf file for every network reconfiguration.
2) When I'm using DHCP, the DNS IP's static addresses have no influence as they're placed after the DNS IPs being received from DHCP.
3) The GUI 'Network Manager' doesn't refresh its info properly after network reconfiguration. Namely when I change the network settings to DHCP it doesn't show any DNS IP. When I re-run the applet again the DNS info is correct.

Bill (b-parnell) wrote :

Hi there,

I am having the same problem as those above in that after a reboot the nameservers are not available. This seems to be because the NetworkManager is rewriting the /etc/resolv.conf file after each reboot.

a temporary resolution is to add the contents of the /etc/resolv.conf file back in and restart networking, but this is not a proper solution. Is there any ETA as to when this may be fixed?

sample /etc/resolv.conf

nameserver 123.456.789.123
nameserver 234.567.890.123
search my.domain
domain my.domain

as always, change the above values to those of your own network.
then you should restart your networking /etc/init.d/networking restart

Once I have a working resolv.conf file I take a copy to make it easier to correct till this problem is fixed.

Best Regards,

Bill (b-parnell) wrote :

I forgot to say that I am using Ubuntu Intrepid Ibex 8.10 with all the latest updates as of today 05-11-2008. Thanks.


Csipak Attila (corphicks) wrote :

AFAIK this problem is solved in Jaunty and Karmic with the new network manager connection editor, which has a DHCP (only addresses) setting. This means that the DNS addresses can be hand edited, while the other stuff will be autodetected via DHCP. It worked for me this far.

Shahar Or (mightyiam) wrote :

So can we call this fix released?

Changed in network-manager (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers