Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: DNS not working after Upgrade to 12.04

  1. #1
    Join Date
    Apr 2009
    Beans
    14
    Distro
    Ubuntu 10.04 Lucid Lynx

    DNS not working after Upgrade to 12.04

    I just upgraded from 10.04 to 12.04 and now I cannot access my ISP's DNS when using a static IP. Internet incoming and outgoing is still unaffected.

    Here's my /etc/network/interfaces

    Code:
    auto lo
    iface lo inet loopback
    
    # Set static IP address
    auto eth0
    iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    If I comment out all of the static IP lines, then NetworkManager kicks in and DNS works fine, and /etc/resolv.conf looks like
    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
    nameserver 127.0.0.1
    search hsd1.il.comcast.net
    Whereas if I don't comment them out, it looks like
    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
    nameserver 127.0.0.1
    I know 12.04 has changed the way it handles DNS, but so far all of my attempts to get it working with the static IP have failed. I suspect that I somehow need to add hsd1.il.comcast.net into the /etc/network/interfaces file, but I've tried playing with dns-nameserver and dns-search to no avail.
    Last edited by ScottTParker; May 10th, 2012 at 03:48 AM.

  2. #2
    Join Date
    Apr 2006
    Location
    just North of Boston
    Beans
    222
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Re: DNS not working after Upgrade to 12.04

    I don't mean to hijack this however I am having almost the same issue. The differences being this was a new install and the issue is with an auto config ip. It can access the interent but not any local network resources by name. I can ping by ip both on the local network and hosts on the other side of the vpn.

    The interface look fine in the gui has the correct ip, dns and gateway

    my ifconfig output:
    Code:
    eth0      Link encap:Ethernet  HWaddr 52:54:00:79:da:98  
              inet addr:192.168.0.34  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::5054:ff:fe79:da98/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:8545 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1863 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:2040956 (2.0 MB)  TX bytes:269515 (269.5 KB)
              Interrupt:10 Base address:0x6000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:268 errors:0 dropped:0 overruns:0 frame:0
              TX packets:268 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:26798 (26.7 KB)  TX bytes:26798 (26.7 KB)
    my interfaces

    Code:
    auto lo
    iface lo inet loopback
    my resolv.conf
    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
    nameserver 127.0.0.1
    I did try adding my local dns server into this file but it was indeed overwritten back to the deafult.

    Hoping perhaps this additional info helps.
    Last edited by prezbedard; May 10th, 2012 at 04:27 PM.

  3. #3
    Join Date
    Apr 2009
    Beans
    14
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: DNS not working after Upgrade to 12.04

    So clearly under 12.04, you cannot edit /etc/resolv.conf directly. I tried adding the following lines to the end of /etc/network/interfaces

    Code:
    dns-nameservers 127.0.0.1
    dns-search hsd1.il.comcast.net
    which was able to modify my /etc/resolv.conf after doing a network restart to

    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
    nameserver 127.0.0.1
    search hsd1.il.comcast.net
    but I still don't seem to get a DNS (e.g. cannot ping google.com)

  4. #4
    Join Date
    May 2007
    Location
    UK near Bedford
    Beans
    3,483
    Distro
    Ubuntu Development Release

    Re: DNS not working after Upgrade to 12.04

    What does the
    Code:
    route
    command show.

    Does it show that you system has identified a gateway?
    PC

    To get a terminal command to put its output into a file use this format
    {terminal command} > {filename}

  5. #5
    Join Date
    Apr 2009
    Beans
    14
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: DNS not working after Upgrade to 12.04

    Under the static IP configuration, where I my /etc/network/interfaces, looks like this:
    Code:
    # The following were already part of the config file
    auto lo
    iface lo inet loopback
    
    # Set static IP address
    auto eth0
    iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    dns-nameservers 127.0.0.1
    dns-search hsd1.il.comcast.net
    route gives the following output:


    Code:
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    default         192.168.1.1     0.0.0.0         UG    100    0        0 eth0
    link-local      *               255.255.0.0     U     1000   0        0 eth0
    192.168.1.0     *               255.255.255.0   U     0      0        0 eth0

    Under DHCP, route gives

    Code:
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
    link-local      *               255.255.0.0     U     1000   0        0 eth0
    192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
    It looks like it found the gateway the same, but the only difference is the Metric, but I don't know how that might affect things
    Last edited by ScottTParker; May 11th, 2012 at 05:30 PM.

  6. #6
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: DNS not working after Upgrade to 12.04

    Can you ping 8.8.8.8, the Google DNS server, using its address? Can you ping the router at 192.168.1.1? Most routers include DNS forwarding and make themselves your DNS server if you use DHCP. Try these:

    Code:
    host www.google.com 8.8.8.8
    host www.google.com 192.168.1.1
    host www.google.com 127.0.0.1
    host www.google.com 68.87.85.132
    Which, if any, of these work for you? The last of these is one of Comcast's servers, dns102.comcast.net.

    You can specify a metric in /etc/network/interfaces like this:

    Code:
    auto eth0
    iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    metric 0
    Last edited by SeijiSensei; May 11th, 2012 at 07:11 PM.

  7. #7
    Join Date
    Apr 2009
    Beans
    14
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: DNS not working after Upgrade to 12.04

    Thanks SeijiSensei. From your advice I got DNS up and working again, but I'm not sure if it's the most ideal configuration. I've described my configuration and test results below for anybody interested in helping me understand this further.

    I tried the pings and host commands that were suggested. Using both DHCP and static IP, both pings worked. Using the first host command (8.8.8.8) worked fine for both. The second (192.168.1.1) found 5 IP addresses and then gave two instances of
    Code:
    ;; connection timed out; no servers could be reached
    But it did so for both static IP and DHCP, so I don't see this as a major problem.
    The third option (127.0.0.1) worked fine for DHCP, but it did not work for static IP. Instead, I got the same connection time out error as above.
    The final option did not work for either. I got an error
    Code:
    Host www.google.com not found: 5(REFUSED)
    Finally, setting the metric 0 line in /etc/network/interfaces did manage to change the metric when running route, but produced no change in finding the DNS.

    With all of these results in mind, I added the line
    Code:
    dns-nameservers 8.8.8.8
    to /etc/network/interfaces and things seem to work now. I can ping "google.com" and my web browser seems to work.

    So this just leaves the question of if this is the best way do setup the config file or are there better ways? I also tried setting
    Code:
    dns-nameservers 192.168.1.1
    which in principle seems more robust, since the router should get DNS information from the ISP, so this should always be accurate (not that I really expect Google to change it's DNS), but if I ping google.com in this configuration it takes about 30 seconds for each succesive ping (even though the time reported is only about 25 ms) whereas if I set the nameserver to 8.8.8.8, it is much faster.

  8. #8
    Join Date
    Jul 2011
    Beans
    7

    Re: DNS not working after Upgrade to 12.04

    I actually have had the same issue and had success simply adding the Comcast DNS servers (75.75.75.75 and 75.75.76.76) as namservers instead of the Google servers. I'll re-post if for some reason this stops working but I'm beyond what my prior threshold was for maintaining connectivity.

  9. #9
    Join Date
    Mar 2005
    Beans
    211

    Re: DNS not working after Upgrade to 12.04

    ScottTParker: Hi. This thread was started some months ago so perhaps you have figured everything out now. But here goes.

    If you are using ifup to configure your interfaces statically then you need to put nameserver information in /etc/network/interfaces on dns-search and dns-nameservers lines in the stanza for the interface over which the nameserver is accessible. This information will be sent to resolvconf when the interface is brought up and resolvconf will add the information to resolv.conf.

    If you are using ifup to configure your interfaces via DHCP then you don't need to do anything additional. The DHCP client will receive nameserver information from the DHCP server and will give this to resolvconf which will include it in resolv.conf.

    If you are using NetworkManager to configure your interfaces statically then you need to add the nameserver information to NetworkManager's configuration via the indicator at the top of the screen. What NetworkManager does with that information depends on whether or not the NetworkManager-controlled local caching nameserver is activated (which is the case when /etc/NetworkManager/NetworkManager.conf contains the line "dns=dnsmasq" in the [main] section). If no NetworkManager-controlled local caching nameserver is activated then when NetworkManager configures an interface it sends the associated nameserver information to resolvconf which includes it in resolv.conf. If the NetworkManager-controlled local caching nameserver *is* activated then NetworkManager sends the search path and a 127.* nameserver address to resolvconf for inclusion in resolv.conf and sends the external nameserver address to the local caching nameserver.

    HTH.

  10. #10
    Join Date
    Dec 2012
    Beans
    6

    Question Re: DNS not working after Upgrade to 12.04

    Hi to all, I have a problem related, I think, with the issue in this thread.
    I'm not able to set dns on a ppp connection that I set using a speedtouch usb adsl modem.
    If I use, on the same adsl line, a modem router I can surf the web but if I want to use this old modem (only usb interface and without routing feature) my ISP supply to me a public IP address and I can reach any public IP but no domain is resolved. I set a pppoe connection following this guide but because I can't surf the web for the domain resolution inability then I disabled the option usepeerdns and tried to manually change /etc/resolv.conf with public DNS server (openDNS and google). The problem is that these settings have any effect and when I try to convert a domain to an IP I have this result
    Code:
    host -4 -d www.google.com
    Trying "www.google.com"
    Received 32 bytes from 127.0.0.1#53 in 0 ms
    Trying "www.google.com"
    Host www.google.com not found: 5(REFUSED)
    Received 32 bytes from 127.0.0.1#53 in 0 ms
    also if
    Code:
    sudo cat /etc/resolv.conf
    [sudo] password for maurizio: 
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    I think that the query to the loopback interface is the result of the line
    Code:
    dns=dnsmasq
    in the NetworkManager.conf file but if I delete this line what will happen if I connect by the router (I have to connect to two different adsl line but I have only one router so I want to use a modem on one of them)?NetworkManager doesn't manage the adsl line, no way to set this, it doesn't see the interface then I have to start manually the ppp connection. On the other side ethernet/wifi connection using the router are perfectly managed by NM then I don't want to break these connections for repairing the ppp connection.How can I mantain the dhcp settings for the router connection and set static DNS only for ppp connection?How can I disable the dnsmasq option only for the ppp connection and force the system to use the dns listed in /etc/resolv.conf?
    Thanks very much for any help, regards

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •