-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 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
  • 62,573
  • 32
  • 113
  • 225