Since updating the packages on my Pi3, on reboot my Pi 3 has access to my home network via wlan0, but not to the internet.
The response to "route -n" is
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0
I can access the internet until the next reboot by entering
pi@raspberrypi:~ $ sudo route add default gw 192.168.1.1
now my routing table is as follows:
pi@raspberrypi:~ $ sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0
My /etc/network/interfaces file seems fine, other than what appears to a superfluous set of entries for wlan1.
pi@raspberrypi:~ $ sudo more /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
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
dns-nameservers 8.8.8.8 8.8.4.4
gateway 192.168.1.1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
dns-nameservers 8.8.8.8 8.8.4.4
gateway 192.168.1.1
What is really is odd is that, I had to add the gateway entries manually, and that solved the problem. Until I used apt to update my system to the latest versions of all the installed packages, since when the gateway entries appear to be ignored.
Can anyone explain to me what I'm doing wrong?
ip addr
? How they get them? Have you had a look atdhcpcd
? I don't use networking together with dhcpcd – Ingo Feb 06 '18 at 20:09