I recently upgraded from Ubuntu 12.04 to Ubuntu 14.04. After restarting I have WiFi connected and/or LAN connection with no internet access. I'm using Toshiba Satellite C855D.

$ sudo lshw -C network

  *-network               
       description: Wireless interface
       product: RTL8188CE 802.11b/g/n WiFi Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 01
       serial: c0:d9:62:8d:39:85
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtl8192ce driverversion=3.13.0-24-generic firmware=N/A ip=192.168.0.109 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:16 ioport:3000(size=256) memory:f0200000-f0203fff
  *-network
       description: Ethernet interface
       product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: eth0
       version: 05
       serial: 00:8c:fa:49:e0:4d
       size: 10Mbit/s
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl_nic/rtl8105e-1.fw latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:41 ioport:2000(size=256) memory:f0104000-f0104fff memory:f0100000-f0103fff

$ ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:8c:fa:49:e0:4d   
          UP BROADCAST MULTICAST  MTU:1500  Metric:1 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000  
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B) 

lo        Link encap:Local Loopback   
          inet addr:127.0.0.1  Mask:255.0.0.0 
          inet6 addr: ::1/128 Scope:Host 
          UP LOOPBACK RUNNING  MTU:65536  Metric:1 
          RX packets:727 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:727 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:0  
          RX bytes:56993 (56.9 KB)  TX bytes:56993 (56.9 KB) 

wlan0     Link encap:Ethernet  HWaddr c0:d9:62:8d:39:85   
          inet addr:192.168.0.109  Bcast:192.168.0.255  Mask:255.255.255.0 
          inet6 addr: fe80::c2d9:62ff:fe8d:3985/64 Scope:Link 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:1934 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:61 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000  

$ ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 
64 bytes from 8.8.8.8: icmp_seq=1 ttl=47 time=47.2 ms 
64 bytes from 8.8.8.8: icmp_seq=2 ttl=47 time=44.8 ms 
64 bytes from 8.8.8.8: icmp_seq=3 ttl=47 time=43.6 ms 
64 bytes from 8.8.8.8: icmp_seq=4 ttl=47 time=156 ms 

$ ping google.com

ping: unknown host google.com

$ nslookup google.com 8.8.8.8

Server:     8.8.8.8 
Address:    8.8.8.8#53 

Non-authoritative answer: 
Name:   google.com 
Address: 190.167.241.187 
Name:   google.com 
Address: 190.167.241.178 
Name:   google.com 
Address: 190.167.241.163 
Name:   google.com 
Address: 190.167.241.183 
Name:   google.com 
Address: 190.167.241.177 
Name:   google.com 
Address: 190.167.241.172 
Name:   google.com 
Address: 190.167.241.153 
Name:   google.com 
Address: 190.167.241.162 
Name:   google.com 
Address: 190.167.241.167 
Name:   google.com 
Address: 190.167.241.152 
Name:   google.com 
Address: 190.167.241.168 
Name:   google.com 
Address: 190.167.241.182 
Name:   google.com 
Address: 190.167.241.157 
Name:   google.com 
Address: 190.167.241.173 
Name:   google.com 
Address: 190.167.241.148 
Name:   google.com 
Address: 190.167.241.158 

$ cat /etc/resolvconf/resolv.conf.d/head                   

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) 
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN 
nameserver 8.8.8.8 

$ sudo service networking restart

stop: Job failed while stopping 
start: Job is already running: networking 

$ nm-tool

NetworkManager Tool 

State: connected (global) 

- Device: eth0 ----------------------------------------------------------------- 
  Type:              Wired 
  Driver:            r8169 
  State:             unavailable 
  Default:           no 
  HW Address:        00:8C:FA:49:E0:4D 

  Capabilities: 
    Carrier Detect:  yes 
    Speed:           100 Mb/s 

  Wired Properties 
    Carrier:         off 


- Device: wlan0  [Honey Nut Cheerios] ------------------------------------------ 
  Type:              802.11 WiFi 
  Driver:            rtl8192ce 
  State:             connected 
  Default:           yes 
  HW Address:        C0:D9:62:8D:39:85 

  Capabilities: 
    Speed:           18 Mb/s 

  Wireless Properties 
    WEP Encryption:  yes 
    WPA Encryption:  yes 
    WPA2 Encryption: yes 

  Wireless Access Points (* = current AP) 
    *Honey Nut Cheerios: Infra, 00:21:29:EF:11:2D, Freq 2437 MHz, Rate 54 Mb/s, Strength 78 WPA2 
    Claro8AD:        Infra, 00:1A:2B:B0:69:CD, Freq 2462 MHz, Rate 54 Mb/s, Strength 27 WPA2 
    CLAROB5F570:     Infra, 88:25:2C:B5:F5:70, Freq 2412 MHz, Rate 54 Mb/s, Strength 20 WEP 
    WIND30:          Infra, 00:1F:FB:68:E3:6C, Freq 2427 MHz, Rate 54 Mb/s, Strength 37 WPA 
    dd-wrt_vap:      Infra, 02:1C:10:34:41:15, Freq 2437 MHz, Rate 54 Mb/s, Strength 24 WPA 

  IPv4 Settings: 
    Address:         192.168.0.109 
    Prefix:          24 (255.255.255.0) 
    Gateway:         192.168.0.1 

    DNS:             8.8.8.8 
    DNS:             8.8.4.4 

marked as duplicate by Fabby, Eric Carvalho, waltinator, Zanna, David Foerster Apr 21 at 21:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Okay, you seem to have a wireless connection. Could you update your question with the output of ping google.com as well? And please use code tags for your output, to improve readability. – Louis Matthijssen Apr 26 '14 at 0:19
  • you can check it out right now I posted it already. All my regards! – user274227 Apr 26 '14 at 0:22
  • That's right, it means your DNS servers are not working. I have added an answer to this question. – Louis Matthijssen Apr 26 '14 at 0:47
  • thank you for your answer but unfortunately it does not work for me. I don't know why. is there something else I could try? – user274227 Apr 26 '14 at 1:41
  • @user274227 To further edit the post, please go through editing-help to know how to properly format your posts. – Aditya Apr 26 '14 at 16:40

I had this same problem on my upgrade from 12.04 to 14.04. The way I fixed it was by complete removal and reinstall of the resolv config. See below

sudo apt-get remove --purge resolvconf && sudo apt-get install --reinstall resolvconf

It appears that your upgrade as my did not properly install your DNS resolver.

  • Related bug report: bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1308378 – fuenfundachtzig Aug 15 '14 at 19:13
  • 13
    I will suggest not remove anything since apt-get probably not working either to install it back! I would first check if the apt-get update works then give this a try. – Maziyar Jan 5 '15 at 14:52
  • 2
    download the package by: sudo apt-get download resolvconf before you purge the installed one. You won't have network to download it otherwise. – HongboZhu Dec 1 '15 at 9:56
  • it's solve my network problem. Ubuntu 16.04 – Angel Cuenca Jan 3 '17 at 20:54

Your DNS servers are not set or not working properly.

A DNS server basically translates (resolves) a domain name (like google.com) to an IP address. Without an IP address you can't connect to any website. So if a domain name can't be resolved, you can't access any website.

You can use Google's DNS servers to solve this problem:

  1. Click on the WiFi icon in the top right of your screen
  2. Click on Edit connections...
  3. Under Wi-Fi, select your network's name
  4. Click on Edit...
  5. Click on IPv4 Settings
  6. Set Additional DNS Servers to 8.8.8.8, 8.8.4.4 (note the difference between the dot and the comma)
  7. Click on Save

Try to visit Google to verify that your connection's working.

  • thank you for your answer but unfortunately I does not work for me. I don't know why. is there something else I could try? – user274227 Apr 26 '14 at 1:21
  • Okay, that's strange. Could you post the output of nm-tool and ping 8.8.8.8? – Louis Matthijssen Apr 26 '14 at 9:07
  • 1
    Try using the 'Automatic (DHCP) addresses only' setting, while specifying the DNS servers manually. – Bert Apr 26 '14 at 13:43
  • thank you but I did it still not working – user274227 Apr 26 '14 at 13:51
  • 1
    User274227 perform the steps I provided above and your problem would be resolved. You can then mark this question as resolved so that others will find this recurring problem and solution. Edit the "head" file. It won't be overwritten during boot. That is the purpose of it. – L. D. James Apr 26 '14 at 14:38

This is the problem. Ubuntu now by default sets 127.0.0.1 as your nameserver, placing that in your resolv.conf.

You can add a header to include your perferred name server such as google's dns by using the resolvconf header feature.

Add your preferred nameserver to your header file:

/etc/resolvconf/resolv.conf.d/head

nameserver 8.8.8.8

Be sure to place a linefeed at the end (press ENTER) after the line. Then restart your network and you should be all set.

This will place your preferred nameserver at the top of the default settings when your network starts.

You can restart your network by rebooting your computer or issue this cli:

sudo service networking restart
  • 1
    thank you sir for your help but I don't know where I can find my header file? could you help me please? – user274227 Apr 26 '14 at 13:45
  • You're welcome. Look at my message again. Look were it says: file. I can't format it here in a comment, but it's formated in the answer: /etc/resolvconf/resolv.conf.d/head. That is the full pathname to the file. The line below that is what you have to put into that file. Follow the steps... restart the network and all your issues would vanish. – L. D. James Apr 26 '14 at 15:20
  • sudo nano /etc/resolvconf/resolv.conf.d/head – L. D. James Apr 26 '14 at 15:28
  • I did it but still not working I will post what I found when I did all the process in the question update. – user274227 Apr 26 '14 at 15:45
  • 1
    Hi, Louis. I wouldn't recommend totally clobbering the file in that manner. He would best edit the file and append to it. If someone had already added search domain and other features he would loose those features. If he used, instead the command: "sudo nano /etc/resolvconf/resolv.conf.d/head" he'd benefit by seeing what is already there. He said he was having problems saving the changes. That wouldn't be a problem if he used "sudo". Also once adding the single line, he would automatically be prompted to save the file. – L. D. James Apr 26 '14 at 16:55

Recreate /etc/resolv.conf by running the following in Terminal (Ctrl+Alt+T) and it should fix the issue with ping:

sudo dpkg-reconfigure resolvconf

or

sudo ln -sf /run/resolvconf/resolv.conf /etc/resolv.conf

protected by Community Jun 30 '14 at 17:39

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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