0

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?

  • What ip-addresses have the interfaces? What says ip addr? How they get them? Have you had a look at dhcpcd? I don't use networking together with dhcpcd – Ingo Feb 6 '18 at 20:09
  • the ip address is 192.168.1.69 - it obtains it automatically from the router. – Jeremy Taffel Feb 7 '18 at 9:44
  • The ip address is 192.168.1.69/24 - it obtains it automatically from the router. I'm a bit confused about dhcpcd. I thought it was the client that receives the IP address from the router. I have done nothing consciously to enable it; it seems to run automatically. So I don't understand comments like " I don't use networking together with dhcpcd" – Jeremy Taffel Feb 7 '18 at 10:03
  • I prefer to use systemd-networkd instead of networking because it is a closed solution not needed extra packages. But it is a complete other world and need some work to understand and migrate to it. – Ingo Feb 7 '18 at 10:23
0

No one can be sure what is going wrong. The interfaces file warns "Please note that this file is written to be used with dhcpcd", and while you are not using static it probable implies other settings as well.

manual indicates that IP is being set by an external program.

You should try a normal network setup.

How to set up networking/WiFi

  • I am sorry but that is not a very helpful response. I used the pixel GUI method that your link eventually pointed to in order to set the wifi up . It connected to the router to give me access to my home network, but it did not automatically set up the gateway for accessing the outside world. I browsed this forum to find out how to force the gateway, and how to automate it on boot. Following the package upgrade it no longer does it on boot. I need help to get that aspect back working. – Jeremy Taffel Feb 7 '18 at 9:39
  • @JeremyTaffel Your DHCP server SHOULD set the gateway. This is the normal action of a DHCP server. Attempting to set it in a non-standard way will not resolve whatever problem you may have. If you tried normal networking and still have a problem and posted the routing table then someone may be able to post a more helpful response. – Milliways Feb 7 '18 at 10:13
0

I managed to find the solution. It appears that the /etc/dhcpcd.conf file (automatically generated - I had never even looked at it) had 3 entries for the SSID of my wireless network. The first 2 contained the line "static routers =" and only the third entry included its ip address. I edited the file to remove the first 2 entries and now everything works just fine.

I'd like to understand how such a thing can happen - this system is supposed to be for noobs to computing (which I definitely am not) who wouldn't stand a chance of finding an issue like this.

  • /etc/dhcpcd.conf does NOT know anything about SSID - this is handled by the wpa-supplicant hook (using dhcpcd as designed) or the interfaces kludge in Jessie. – Milliways Feb 7 '18 at 10:29
  • So why then are the contents of /etc/dhcpcd.conf SSID EE-BrightBox-e9fmbs static routers=192.168.1.1 – Jeremy Taffel Feb 7 '18 at 10:41
  • So why then are the contents of /etc/dhcpcd.conf SSID EE-BrightBox-e9fmbs static routers=192.168.1.1 ? wpa_supplicant.conf contains the information required to log on to the network. i.e. SSID and the passcode in plain text, but no IP information. I imagine that it is possible to have multiple wifi networks stored, each with its own ip info; wpa_supplicant enables the login, and the other files address the static and dynamic IP addresses, so each .conf file needs its own set of info to apply the correct data for the specific SSID. – Jeremy Taffel Feb 7 '18 at 10:55

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.