2

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.

muru
  • 197,895
  • 55
  • 485
  • 740
keepitsimpleengineer
  • 6,715
  • 4
  • 45
  • 67
  • 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 03:55
  • Are you using any external DNS servers? Is your router configured to cache DNS requests? What DNS servers are you currently using? – Thomas Ward Apr 23 '12 at 18:40

5 Answers5

1

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.

Isaac
  • 11
  • 1
  • 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
1

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.

  • 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 00: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 00: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
  • @keepitsimpleengineer Out of curiosity, which servers does your "local untangle DNS/firewall" use as its DNS servers? – irrational John Apr 27 '12 at 15:08
  • Google 8.8.8.8 & …4.4 OpensDNS was faster (≈25-30ms vice ≈90-100ms) but it did odd redirects, speed difference mitigated by using local DNS cache. Using local untangle DNS/firewall allows setting DNS server for the LANs six systems in one place. – keepitsimpleengineer Apr 28 '12 at 16:28
1

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.

keepitsimpleengineer
  • 6,715
  • 4
  • 45
  • 67
  • 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 00: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 03 '12 at 03:46
  • @irrational John Thanks for the nod. 12.04 has switched to dnsmasq with network manager for resolving. See http://askubuntu.com/questions/127228/how-do-i-disable-local-dns-caching (reportedly this use of dnsmasq is not caching) Since network manager does not work on my laptop, this may be a problem. – keepitsimpleengineer May 04 '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 06 '12 at 20:15
1

Same problem, router and local DNS addresses were OK but I could only access websites directly through IP addressing.

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

Nephente
  • 5,595
  • 1
  • 17
  • 23
RobNL
  • 11
0

I had something similar happen on a Mint laptop. I came to this and similar questions through a search on "DNS stopped working". My wired connection was perfectly fine and the wifi connection sorta worked except for DNS. And even DNS worked sometimes.

I tried a lot of suggestions with no luck. I finally solved it when I came across the suggestion to run this command:

sudo dpkg-reconfigure resolvconf