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