1

ive read through similar posted questions and have not gotten any consistent results. i have a lenovo laptop, with windows 10, i just installed ubuntu 15.10 beside windows. everything seems to work fine with ubuntu except the internet. it says that my connection to the network is strong, i have even connected to several different networks (all wifi) which all demonstrate the same problem. the problem presents in the following manner, when i first turn the computer on, or restart ubuntu, the internet works fine for a few minutes. then, while still connected to the network, i am unable to access any internet sites. i am unable to sudo apt-get install/update/... anything. says repositories are unfound or something.
i am typing this from the same computer, from the same network, while being booted from windows.

ive tried running a few command line tools i was suggested to run to ensure my wireless card was working ok, ive ensured ivp4 is set to automatic (dhcs) or whatever, ive tried setting ivp6 to ignore (which incidentally seemed to work for a while, like 45 minutes, thought that fixed the problem till it started happening again).

so, while being ignorant to alot of these things, it doesnt seem to be a network thing, because this has happened on several different networks. it doesnt seem to be a hardware thing because windows works just fine. ive heard people talking alot about DNS and TCP/IP network protocol stacks, all of which i have a loose understanding of.

so id like to get some direction to getting this issue with ubuntu resolved, and also gain a little understanding of these things that may be causing a problem. thanks again for help.

16
  • DNS is basically a translator from numeric IP of each website/computer to a domain name, like google.com. That's all that is. When you have it set to automatic - it assumes translator provided by your router. You could also set your own. From drop down menu under the network icon you should see "Edit Connections" option. That option should spawn a small window with list of networks. Select your network under wifi, click edit , and under ipv4 settings select Automatic (DHCP) Address only. Now, where it says DNS servers, set 8.8.8.8 address. Save and reconnect. Does it help ? Jan 9, 2016 at 2:05
  • In fact, before you even do what I said above, just open terminal and do ping -c 4 8.8.8.8 and then ping -c 4 google.com and let us know which one succeeds , which one doesn't. That should be sufficient to see if it's DNS or not Jan 9, 2016 at 2:07
  • The first ping; ping -c 4 8.8.8.8 resulted in 4 packets transmitted, 4 packets received
    – user74091
    Jan 9, 2016 at 4:32
  • Ping -c 4 Google.com resulted in "unknown host Google.com"
    – user74091
    Jan 9, 2016 at 4:33
  • Yup, so go ahead and try to set custom DNS, just like I said earlier. Jan 9, 2016 at 4:36

2 Answers 2

2

From the output of the network diagnostic script posted by OP in the chat it became apparent the /etc/resolv.conf as well as /run/resolvconf/resolv.conf are missing. For whatever reason they were not dynamically created.

The solution to the issue was to create the /etc/resolv.conf manually with the following two steps in command line:

sudo tee  /etc/resolv.conf <<< "nameserver 127.0.1.1"
sudo service network-manager restart

Sidenotes

  • 127.0.1.1 address is to allow dnsmasq service to use the dns provided from the router. It could be replaced with custom dns, such as 8.8.8.8 or 208.67.220.220 if one so wishes
  • Since having static /etc/resolv.conf file works, that's a sufficient solution for 90% of the needs, however if one desires one could reconfigure the resolvconf package to dynamically (automatically) create that file. The command for that would be sudo dpkg-reconfigure resolvconf
0
1

I search and searched and searched and everything I found was basics and not fixing anything. I compared with other machines on the network and nothing stood out. And then I came across this, hidden away.
It was exactly the symptoms this PC.

sudo tee /etc/resolv.conf <<< "nameserver 127.0.1.1"

and

sudo gedit /etc/NetworkManager/NetworkManager.conf and change managed=false to managed=true

and after a reboot, all worked great. I did not find the following, nor any of its derivatives worked, but the restart was good enough.
sudo service NetworkManager restart

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .