Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Was working fine then stopped inexplicably.

I can ping the gateway/DNS router/firewall (Untangle) using WiFi and cable using WiCd. Network Manager does not work on this computer

Firefox reports "server not found" & pinging google.com gives "unknown host".

WiCd setting show proper DNS IP, /etc/reslov.conf contains the correct IP (it was missing but I replaced it).

The DNS server/gateway (192.168.0.1) works with other computers on the local network.

From laptop (192.168.0.55)…

user@laptop:~$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.0.1

user@laptop:~$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_req=1 ttl=64 time=0.854 ms
64 bytes from 192.168.0.1: icmp_req=2 ttl=64 time=0.875 ms

user@laptop:~$ ping 192.168.0.5
PING 192.168.0.5 (192.168.0.5) 56(84) bytes of data.
64 bytes from 192.168.0.5: icmp_req=1 ttl=64 time=0.774 ms
64 bytes from 192.168.0.5: icmp_req=2 ttl=64 time=0.747 ms

From workstation (192.168.0.5)…

user@workstation:~$ ping 192.168.0.55
PING 192.168.0.55 (192.168.0.55) 56(84) bytes of data.
64 bytes from 192.168.0.55: icmp_req=1 ttl=64 time=0.754 ms
64 bytes from 192.168.0.55: icmp_req=2 ttl=64 time=0.720 ms

user@workstation:~$ ping google.com
PING google.com (74.125.224.110) 56(84) bytes of data.
64 bytes from nuq04s08-in-f14.1e100.net (74.125.224.110): icmp_req=1 ttl=46 time=90.6 ms
64 bytes from nuq04s08-in-f14.1e100.net (74.125.224.110): icmp_req=2 ttl=46 time=92.2 ms

From laptop…

user@laptop:~$ ping 74.125.224.110
PING 74.125.224.110 (74.125.224.110) 56(84) bytes of data.
64 bytes from 74.125.224.110: icmp_req=1 ttl=46 time=105 ms
64 bytes from 74.125.224.110: icmp_req=2 ttl=46 time=91.5 ms
64 bytes from 74.125.224.110: icmp_req=3 ttl=46 time=92.2 ms
64 bytes from 74.125.224.110: icmp_req=4 ttl=46 time=89.3 ms

And also from laptop (using sudo)…

root@laptop:~# ps -e | grep bind
root@laptop:~# ps -e | grep net
   17 ?        00:00:00 netns
root@laptop:~#

Additional information…

The laptop is dual boot, and with the same hardware Windows has no DNS problems. Also, there are three connection methods to the internet, two WiFi APs and a wired connection. This problem occurs on all three.

Skype seems to work, having no problems connecting to its network.

This Lenovo S12 (Intel atom) laptop does not seem to play nice with Linux/Ubuntu as several custom work-arounds are required to get Ubuntu working ⋯ e.g. needing WiCd because Network Manager does not work. More here, here, here, and here.

share|improve this question
    
Can you ping machines by IP address still? If not, then it might not be a DNS issue. If you can ping by IP address, could you update your question to include the contents of /etc/resolv.conf? –  James Henstridge Apr 19 '12 at 3:55
    
Are you using any external DNS servers? Is your router configured to cache DNS requests? What DNS servers are you currently using? –  Thomas W. Apr 23 '12 at 18:40

4 Answers 4

I'm having the same issue. I've found that if I disconnect and reconnect to my wifi network, or if I reboot the machine, I can get one or two webpages to load, but then DNS stops working again. For the record, just because you can ping by IP, that doesn't mean that DNS is working. DNS is the service that turns names into IP addresses. Something odd that I did notice though, if I tether my laptop to my phone, internet works perfectly without a hitch. However, my home wifi network doesn't work for more than one webpage with Ubuntu even though it works with every other computer and device in the house.

share|improve this answer
    
I'd suggest checking if your router is acting as a DNS relay and, if it is, changing its configuration as suggested in the 2'nd part of my answer to have the systems on your LAN submit their DNS requests directly to your preferred DNS server. –  irrational John Apr 23 '12 at 18:29

Unfortunately this is another "not an answer". It is just a problem isolation suggestion.

You've already confirmed via ping that IP networking appears to be working correctly on your laptop. The next thing I would try is using someone else's DNS servers. I do not know why the default DNS servers provided by an ISP sometimes tend to flake out, just that they appear to do so.

The most common "other" DNS servers to try are Google's public DNS and/or OpenDNS. Since both are free, why not try both? :-) Below are the IP addresses you can use and a suggested terminal command to test them with. (dig (domain information groper) was suggested in this answer).

Google Public DNS (Domain Name System)
    8.8.8.8
    8.8.4.4

OpenDNS
    208.67.222.222
    208.67.220.220

irrational@VBubu04-21daily:~$ dig  www.askubuntu.com @208.67.220.220

; <<>> DiG 9.8.1-P1 <<>> www.askubuntu.com @208.67.220.220
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56386
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.askubuntu.com.     IN  A

;; ANSWER SECTION:
www.askubuntu.com.  1601    IN  A   64.34.119.12

;; Query time: 43 msec
;; SERVER: 208.67.220.220#53(208.67.220.220)
;; WHEN: Mon Apr 23 13:26:18 2012
;; MSG SIZE  rcvd: 51

Eliminating Router "DNS Relay"

Another "For What It's Worth" digression suggestion. The default nameserver in your system turns out to be your router, i.e. /etc/resolv.conf == nameserver 192.168.0.1. In other words, your router is playing the role of a DNS server.

Your systems send their DNS requests to your router and it forwards them on to whatever DNS the router is set up to use. The router should then forward any response returned from the DNS server to the system on your LAN which originally sent the DNS request.

I suppose whether or not this is a good thing depends on how you look at it. Being cynical, I tend to view this as adding yet another, unneeded middleman who could cluck things up to the processing. So I don't do this. Instead I configure my router to provide the IP addresses for the Google and/or OpenDNS DNS servers to any system on my LAN as part of its DHCP response.

The method to do this probably varies depending on the router's manufacturer. I have a D-Link 655 and the steps I have to follow are:

  • Log on to my router as admin.
  • Disable the DNS Relay checkbox in the Network Settings > Router Settings section of my router's setup.
  • Add the DNS IP addresses to supply via DHCP to the WAN (Internet) > DHCP section of my router's setup.

Rebooting your router is probably the quickest way to see if your router might part of the problem you're having. If it is ... or even if it isn't :-) ... you might consider the change suggested above.

share|improve this answer
    
Great idea about name-servers, which I did as part of the investigation. I use Google, OpenDNS is sometimes quirky. Response time improved on the other computers. My router is actually a Untangle firewall, and does not appreciably affect response, but does reduce internet traffic. –  keepitsimpleengineer Apr 24 '12 at 14:33
    
Yes, but when you dig a Google DNS server from the laptop does it work or not? –  irrational John Apr 24 '12 at 14:59
    
Found the problem before I tried... but no DNS is possible if there is no nameserver specified. Using WiCd does not modify /etc/resolv.conf, it must be done manually. User-ugly. –  keepitsimpleengineer Apr 26 '12 at 0:07
    
FWIW, yes, no DNS is possible with designating a nameserver. But the point of commands such as dig (or nslookup) is that you can specify the nameserver as a parameter. So dig should have worked even without /etc/resolv.conf. –  irrational John Apr 26 '12 at 0:23
    
Voila… So I used dig to test local untangle DNS vice direct google (8.8.8.8) & OpenDNS (208.67.222.222) and response was 105ms (local) vs 94 ms google vs 24 ms OpenDNS. Repeats for local were 0 ms. Drudge-reports annoying redraws are now much faster. –  keepitsimpleengineer Apr 27 '12 at 15:00
up vote 1 down vote accepted

Resolution discovered.

/etc/resolv.conf is being deleted. How or why is undetermined.

It may be due to the fact that changing DNS in WiCd does not result in resolv.conf being changed.

Thanks to all for the suggestions.

share|improve this answer
    
I haven't checked but I assume /etc/resolv.conf is owned by root, no? That would mean it is not some casual application process which is deleting it, no? –  irrational John Apr 24 '12 at 18:05
    
Since it worked for months on a barely used laptop, the prime suspect is something involved in a distribution upgrade. WiCd is reportedly no longer maintained, and the Network Manager bug for the laptop is dormant. I'll pay more attention to why if it happens again. –  keepitsimpleengineer Apr 26 '12 at 0:02
    
A "for whatever its worth" comment. No idea if it is related to your problem or not, but apparently there have been official changes made to how Ubuntu does DNS. The person who posted this question later found and included in his question background this blog entry: DNS in Ubuntu 12.04 –  irrational John May 3 '12 at 3:46
    
@irrational John Thanks for the nod. 12.04 has switched to dnsmasq with network manager for resolving. See askubuntu.com/questions/127228/… (reportedly this use of dnsmasq is not caching) Since network manager does not work on my laptop, this may be a problem. –  keepitsimpleengineer May 4 '12 at 14:40
    
I made the leap and upgraded the laptop to 12.04. It kept Wicd but I dropped it and installed Network Manager. Except for on tiny hiccough, it worked and even preserved my Wicd WiFi settings. The tiny hiccough was system tray icon… did not work properly until I rebooted then opened >System Settings >Hardware/Network ⋯verified the settings were correct and closed it. I must say 12.04 with Gnome classic is pretty great! –  keepitsimpleengineer May 6 '12 at 20:15

Same problem, router and local DNS addreses were OK but I could only access websites through direct IP adressing.

Somehow /etc/resolv.conf was patched and the first (of 3) nameservers had an IP6 adres while my internetprovider does not offer IP6 yet. After deleting the IP6 address the issue was solved.

share|improve this answer

Your Answer

 
discard

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.