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
Hi-Angel
  • 4,778
  • 4
  • 28
  • 45
user3430764
  • 343
  • 1
  • 2
  • 9
  • `IP4.ROUTE[1]: dst = 169.254.0.0/16` certainly shows a problem with the route. Please post your routing table with `route -n`. – Julie Pelletier Apr 30 '16 at 19:06
  • 1
    Based on your dig, does adding `nameserver 8.8.8.8` to your `/etc/resolv.conf` solve anything? – Julie Pelletier Apr 30 '16 at 19:08
  • @JuliePelletier from the `IP4.DNS[1]: 8.8.8.8` I'd guess they already using the nameserver. – Hi-Angel Apr 30 '16 at 20:32
  • @Hi-Angel: You're right but there's obviously a problem with it since dig works on the same nameserver. – Julie Pelletier Apr 30 '16 at 20:35
  • Thank you all for your time, I solved the problem by using the answer given at the link: http://askubuntu.com/questions/622470/dns-probe-finished-bad-config-error-in-ubuntu-14-04?answertab=votes#tab-top – user3430764 May 01 '16 at 18:40

3 Answers3

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
user3430764
  • 343
  • 1
  • 2
  • 9
  • 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 05 '16 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.
FineJ
  • 71
  • 1
  • 2
3

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