13

I upgraded ubuntu 14.04 to ubuntu 16.04 and I have a problem with the internet connection. Specifically, DNS after update stopped working. For debugging purposes I set the only DNS 8.8.8.8, but name resolution still doesn't work. The output of nmcli device show wlan1 | grep IP4 is:

pc@pc:~$ nmcli device show wlan1 | grep IP4 IP4.ADDRESS[1]: 192.168.1.3/24 IP4.GATEWAY: 192.168.1.1 IP4.ROUTE[1]: dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000 IP4.DNS[1]: 8.8.8.8 The output from dig @8.8.8.8 google.com and dig google.com: dig @8.8.8.8 google.com ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @8.8.8.8 google.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60075 ;; flags: qr rd ra; QUERY: 1, ANSWER: 12, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;google.com. IN A ;; ANSWER SECTION: google.com. 27 IN A 62.75.23.245 google.com. 27 IN A 62.75.23.230 google.com. 27 IN A 62.75.23.216 google.com. 27 IN A 62.75.23.238 google.com. 27 IN A 62.75.23.224 google.com. 27 IN A 62.75.23.223 google.com. 27 IN A 62.75.23.237 google.com. 27 IN A 62.75.23.210 google.com. 27 IN A 62.75.23.217 google.com. 27 IN A 62.75.23.231 google.com. 27 IN A 62.75.23.244 google.com. 27 IN A 62.75.23.251 ;; Query time: 89 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Sat Apr 30 19:39:24 EEST 2016 ;; MSG SIZE rcvd: 231 pc@pc:~$ dig google.com ; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com ;; global options: +cmd ;; connection timed out; no servers could be reached pc@pc:~$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 600 0 0 wlan1 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan1 192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlan1 
5
  • IP4.ROUTE[1]: dst = 169.254.0.0/16 certainly shows a problem with the route. Please post your routing table with route -n. Commented Apr 30, 2016 at 19:06
  • 1
    Based on your dig, does adding nameserver 8.8.8.8 to your /etc/resolv.conf solve anything? Commented Apr 30, 2016 at 19:08
  • @JuliePelletier from the IP4.DNS[1]: 8.8.8.8 I'd guess they already using the nameserver. Commented Apr 30, 2016 at 20:32
  • @Hi-Angel: You're right but there's obviously a problem with it since dig works on the same nameserver. Commented Apr 30, 2016 at 20:35
  • Thank you all for your time, I solved the problem by using the answer given at the link: askubuntu.com/questions/622470/… Commented May 1, 2016 at 18:40

3 Answers 3

11

I solve the problem by using Amrish instructions at Ask Ubuntu Stack Exchange, i.e. by using the following code:

sudo rm /etc/resolv.conf sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf sudo resolvconf -u 
1
  • I tried the above command, why the firefox browser still not working. I tried ping cnn.com the system returns ping: unknown host cnn.com Commented Jun 5, 2016 at 22:17
7

I had a similar issue and used the solution from here. Below is the method and another link to where they found the info -

DNS behavior during OpenVPN connection improved immediately when I followed a suggestion on ubuntuforums:

  1. Open /etc/NetworkManager/NetworkManager.conf in an editor with root rights.
  2. Delete (or comment out with a hash #) the line that reads dns=dnsmasq.
  3. Restart NetworkManager via sudo service NetworkManager restart.
1
  • dash (-) = hash (#) ;-) Commented Mar 8, 2017 at 4:55
2

I had the same issue with resolvconf prevent dhcp client (dhclient) to get IP from DHCP server for eth0. Solving resolvconf issue, solved the DHCP issue.

sudo mkdir -p /run/resolvconf/interface sudo resolvconf -u sudo service resolvconf restart 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.