6

My problem is that, after connecting my Rpi to the home Wifi network, it refuses to connect to the internet. Funny thing is: I am connected to it via ssh. I tried to ping google, but it said:

connect: Network is unreachable

Then I tried to ping google`s IP, but the same thing happened. I tried the method described here but nothing is working. How can I get my pi to connect to the internet?

If this might be any help, here is the output of route -n:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
169.254.0.0     0.0.0.0         255.255.0.0     U     201    0        0 lo
192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0

I had my pi connected to this network before and I have set it to a static IP "192.168.1.23". It used to work but it suddenly broke and hostname -I gives the following output:

192.168.1.23

So everything seems to be correct aside from the fact that I cannot reach everything (literally everything, even localhost is unreachable). And one more thing: I am connected to WiFi via a repeater. Thanks in advance.

PS: My question is not a duplicate of this question. I have searched pi StackExchange but nothing worked.

EDIT:

I used the WiFi management GUI To set the static IP on my Pi.

donjuedo
  • 115
  • 4
mohamed emad
  • 91
  • 1
  • 1
  • 7

2 Answers2

3

Thanks Guys But I found the answer Everything worked after I reset the configuration in my /etc/network/interfaces to

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

,thanks anyway

mohamed emad
  • 91
  • 1
  • 1
  • 7
-1

I had the same problem using Wi-Fi, I had also to change:

allow-hotplug wlan0
iface wlan0 inet manual

to:

allow-hotplug wlan0
iface wlan0 inet dhcp

Then the internet connection worked

Darth Vader
  • 4,206
  • 24
  • 45
  • 69