This morning I booted up my raspberry pi2 and connected it to the internet. I opened up the internet browser and it says:

Oops! It was not possible to show this website

The website at http://google.com/ seems to be unavailable. The precise error was:

Could not connect: Network is unreachable

But... It is still connected to the network. I can SSH into it just fine.

Even when I SSH into it and try to update it says:

$ sudo apt-get update

Hundreds of Error lines


eth0      Link encap:Ethernet  HWaddr b8:27:eb:64:55:35
          inet6 addr: fe80::6fc7:7782:b008:3bc4/64 Scope:Link
          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:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:72 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6288 (6.1 KiB)  TX bytes:6288 (6.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 74:da:38:62:66:dd
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::a7a7:207:13b6:c828/64 Scope:Link
          RX packets:2294 errors:0 dropped:3 overruns:0 frame:0
          TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:465827 (454.9 KiB)  TX bytes:22112 (21.5 KiB)


connect: Network is unreachable
  • This is due to an ICMP packet from somewhere, including possibly the pi's own firewall if one is configured. Your local router will also do that if the internet is down, but the LAN will remain fine. Of course you probably would have noticed that on other devices. Most likely, as per my other comment, it means you've assigned yourself an address but the router doesn't recognize it so won't route it out of the LAN.
    – goldilocks
    Commented Jun 29, 2016 at 18:56
  • But... I can still SSH into my raspberry pi though :( Commented Jun 29, 2016 at 18:59
  • How would I do that? Commented Jun 29, 2016 at 19:39
  • I'm presuming you are ssh'ing in from within the same subnet. I.e., the pi is at home, you are at home, the computer you are ssh'ing from are at home. In that case, any device which signs onto to the WLAN ESSID can advertise itself/try and respond to whatever IP address it likes (there may be a problem if another device has the same address, otherwise it's fine), however, that does not mean the router will route anything from that IP outside the LAN subnet.
    – goldilocks
    Commented Jun 29, 2016 at 19:47
  • Put another way, if you assign yourself an (unused) static IP and are on the WLAN, any other device on the same subnet -- meaning, the at home (W)LAN itself -- can probably use that IP to connect. You could even use the hostname if avahi/zeroconf is running on both devices (it does by default on Raspbian). However, the router did not assign that address, and it will not perform the "network address translation (NAT)" necessary in order for traffic to pass through it to and from the device ("through it" as in, to the outside world).
    – goldilocks
    Commented Jun 29, 2016 at 19:52

2 Answers 2


check if dhcp enabled in your modem or not. If not manually configure gateway.

also try changing DNS.

Post more info how you connected Pi to Internet


Use the command to see if Wifi is connected:


Or try to ping a server

ping www.google.com



The errors are shown because the update repositories are not reachable Try unhooking the WiFi Dongle and pluging it back in. Then, if nothing a fresh restart. Also make sure your network connection settings are set. I usually add the applet for wifi to my taskbar.

  • Holdup let me update my post Commented Jun 29, 2016 at 18:53
  • ifconfig will certainly show the link up with an address if ssh is possible. However, as user482718's answer hints, that is not necessarily an address the router accepts, meaning it will work from node to node on the LAN subnet but will not be able to connect to anything outside. This could happen if you are assigning yourself a static IP.
    – goldilocks
    Commented Jun 29, 2016 at 18:55
  • @A-square, My WiFi is working just fine. My PI is CONNECTED to the network but I can't get internet access. Commented Jun 29, 2016 at 19:43
  • have you tried to ping something on the local network (like your PC). It could be a DNS problem. Anyone else want to take that one? I found several methods online but no only little about networking. When I changed my PC to static IP, I had to connected via Ethernet the first time for the wireless to work again.
    – A-Square
    Commented Jun 29, 2016 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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