Announcement

Collapse
No announcement yet.

Lost DNS in upgrade to Precise

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Lost DNS in upgrade to Precise

    Today I did the network upgrade from 11.10 to 12.04 on my desktop computer. Everything seemed to go well, but after restarting I was unable to access the Internet. Pinging a domain name returns "unknown host". I can ping IP addresses, however. I went into System Settings>Network Connections and made sure that the address for the DNS server is the same as on my netbook (which is still running Oneiric). I tried replacing /etc/NetworkManager/NetworkManager.conf with the old (Oneiric) version, then went back. After every change I did a restart. No luck. I'm sure there's a simple solution for this. What is it?

    #2
    One of the changes that Precise brings is the introduction of dnsmasq, configured as a local DNS cache. I've experimented with various ways of removing this, but the result always feels brittle. Ultimately, I ended up commenting out one line -- shown in bold -- in /etc/NetworkManager/NetworkManager.conf:

    Code:
    steve@x1:~$ cat /etc/NetworkManager/NetworkManager.conf 
    
    [main]
    plugins=ifupdown,keyfile
    [B]# dns=dnsmasq[/B]
    
    no-auto-default=F0:DE:F1:A5:AA:41,
    
    [ifupdown]
    managed=false
    Now, when I examine /etc/resolv.conf, I can see the DNS servers that I've configured my DHCP server (actually, my router) to supply:

    Code:
    steve@x1:~$ cat /etc/resolv.conf
    nameserver 4.2.2.1
    nameserver 4.2.2.2
    search local

    Comment


      #3
      Originally posted by SteveRiley View Post
      Ultimately, I ended up commenting out one line -- shown in bold -- in /etc/NetworkManager/NetworkManager.conf:

      Code:
      steve@x1:~$ cat /etc/NetworkManager/NetworkManager.conf 
      
      [main]
      plugins=ifupdown,keyfile
      [B]# dns=dnsmasq[/B]
      Yes, that's the very first thing I did, commenting out that line. Made no difference.

      Originally posted by SteveRiley View Post
      Now, when I examine /etc/resolv.conf, I can see the DNS servers that I've configured my DHCP server (actually, my router) to supply:

      Code:
      steve@x1:~$ cat /etc/resolv.conf
      nameserver 4.2.2.1
      nameserver 4.2.2.2
      search local
      Funny, my resolv.conf file has no nameservers in it. It looks like this:
      Code:
      #Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
      #    DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN.
      Invoking resolvconf -u does nothing. I tried editing the file by hand, basically copying the one from the netbook, and after rebooting it is indeed overwritten, going back to the above. There must be a way to get my nameserver into resolv.conf.

      Comment


        #4
        I'll take another look tomorrow. Seem to recall another step, but will need to check bash history first.

        Comment


          #5
          Following these instructions, http://manpages.ubuntu.com/manpages/...olvconf.8.html, I added a "dns-nameservers" line to /etc/network/interfaces, and now the nameservers show up in resolv.conf, and I have Internet again.

          Comment


            #6
            My /etc/resolv.conf has the following:
            # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
            nameserver 127.0.0.1
            search earthlink.net
            And my internet connection works fine against both the wireless and the eth0 connections.

            Also, I added my ISP domain and DNS addresses in my TL-WR1043N wireless router.
            Last edited by Snowhog; Apr 29, 2012, 01:01 PM.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              My /etc/resolv.conf contains:
              # Generated by NetworkManager
              nameserver 127.0.0.1
              Wired and wireless work without any issues what so ever.

              My /etc/NetworkManager/NetworkManager.conf contains:

              [main]
              plugins=ifupdown,keyfile
              dns=dnsmasq


              no-auto-default=98:4B:E1:C4:95:02,


              [ifupdown]
              managed=false

              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Originally posted by arist View Post
                Following these instructions, http://manpages.ubuntu.com/manpages/...olvconf.8.html, I added a "dns-nameservers" line to /etc/network/interfaces, and now the nameservers show up in resolv.conf, and I have Internet again.
                Are you using static IP addresses defined in /etc/network/interfaces?

                Originally posted by Snowhog View Post
                My /etc/resolv.conf contains:
                ---
                My /etc/NetworkManager/NetworkManager.conf contains:
                Those are the expected configuration files when DHCP assigns IP addresses and you haven't made any changes to dnsmasq.

                Comment


                  #9
                  Originally posted by SteveRiley View Post
                  Those are the expected configuration files when DHCP assigns IP addresses and you haven't made any changes to dnsmasq.
                  Which is my case. I too, was thinking that arist might be using a static IP.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Originally posted by SteveRiley View Post
                    Are you using static IP addresses defined in /etc/network/interfaces?

                    Those are the expected configuration files when DHCP assigns IP addresses and you haven't made any changes to dnsmasq.
                    That's right, I'm using static IPs for my computers, so I can network them using NFS. That undoubtedly complicates things, but it hadn't occurred to me that whether I was using DHCP or not would affect DNS. Before Precise it had never been necessary to do anything with /etc/network/interfaces in order to get DNS to work with static IPs. I haven't made changes to dnsmasq: NetworkManager.conf is the default version.

                    Curious that Snowhog's resolv.conf is generated by NetworkManager, while GreyGeek's and mine are generated by resolvconf. Would that be because we use static IPs?

                    Comment

                    Working...
                    X