-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?

kaze
  • 99
  • 2
  • 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 02: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 05:34

1 Answers1

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

Milliways
  • 54,718
  • 26
  • 92
  • 182
  • 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