I have the following problem.
I want to have access on my Raspberry Pi 3 via WiFi. I have once set it up using the GUI, but now running it in the headless mode. The problem now is that this works for about 3 days then I can't connect to the Pi anymore.
I found out what I then need to do is to plug in the ethernet cable and then it works again. I have also seen that there are two default routes installed. One goes over wlan0 and the other over eth0.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.1 0.0.0.0 UG 202 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 303 0 0 wlan0
192.168.0.0 * 255.255.255.0 U 202 0 0 eth0
192.168.0.0 * 255.255.255.0 U 303 0 0 wlan0
So I assume that once I plug out the ethernet cable, the outgoing connections try to go over eth0 instead of wlan0. When I then delete the entries for eth0, WiFi works again but only for around 3 days, then all starts over again.
The following are my configuration files for the /etc/network/interfaces:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
auto wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
and the /etc/wpa_supplicant/wpa_supplicant.conf:
country=CH
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="SSID"
psk=HashedPassword
}
Any ideas on that? Thanks
PS: I know that there is another question related to this, but that approach did not help me.