-1

I have this exact problem:

"connect: Network is unreachable" on a working (connected) wlan0 interface

So, I'm able to use the LAN but i can't reach the Internet.

And the solution in the question above solves my problem... but only in the current session.

Every time I reboot, it's back to the same. I have to enter the

sudo route add default gw 192.168.1.1

every time. Would it be possible for the setting to be properly saved?

I have configured my router to set the default gateway to 192.168.1.1, so when i do a refresh

sudo dhclient 

the correct gateway is set. But on reboot, all is lost... (I have configured the router to give the Pie a static ip 192.168.1.20, that works fine).

I have also tried the second answer here:

How to make a change to the routing table persist?

but it does not make any difference.

the contents of my /etc/network/interfaces is:

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

Please if someone knows how to fix this?

  • 1
    Rather than fiddling with the route, you would be better to set up normally. Post the contents of your /etc/network/interfaces file. If all you are trying to do is force a definite IP address you are better to reserve in your router. – Milliways Oct 30 '14 at 2:15
  • I have updated the question with the info you asked about. I am assigning a static ip using the router. That works fine. – kaze Oct 30 '14 at 5:34
0

You are not using a "static ip"

You should have a line

auto wlan0

after allow-hotplug wlan0 This is not strictly necessary, but the man says:- "Lines beginning with the word "auto" are used to identify the physical interfaces to be brought up when ifup is run with the -a option. (This option is used by the system boot scripts.) "

If you still have problems after this post /etc/wpa_supplicant/wpa_supplicant.conf

  • I'm not using the wlan at the moment. I'm wired into the router. Should I change this anyway? – kaze Oct 30 '14 at 11:49

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.