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, 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.ROUTE[1]: dst =, nh =, mt = 1000
The output from dig @ google.com and dig google.com:

dig @ google.com
; <<>> DiG 9.10.3-P4-Ubuntu <<>> @ 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
; EDNS: version: 0, flags:; udp: 512
;google.com.            IN  A

google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A
google.com.     27  IN  A

;; Query time: 89 msec
;; 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         UG    600    0        0 wlan1     U     1000   0        0 wlan1   U     600    0        0 wlan1
  • IP4.ROUTE[1]: dst = certainly shows a problem with the route. Please post your routing table with route -n. Apr 30, 2016 at 19:06
  • 1
    Based on your dig, does adding nameserver to your /etc/resolv.conf solve anything? Apr 30, 2016 at 19:08
  • @JuliePelletier from the IP4.DNS[1]: I'd guess they already using the nameserver.
    – Hi-Angel
    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. 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/…
    – c_nikol
    May 1, 2016 at 18:40

3 Answers 3


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
  • 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
    – user785099
    Jun 5, 2016 at 22:17

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.
  • dash (-) = hash (#) ;-) Mar 8, 2017 at 4:55

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.