My Pi running Raspbian Stretch stopped being reachable via ssh, so I connected a screen to debug why, after turning it off and on again.
The GUI was all changed with the annoying message that says that Raspbian had been updated and conf files moved to oldconffiles. I hadn't run any upgrades and AFAIK I haven't enabled automatic upgrading.
The wlan0 interface now gets the IP 169.254.196.101, despite it being, to my knowledge, previously configured and working with the static IP 192.168.0.12 for the last months.
I tried to set up a static IP again by editing
/etc/dhcpcd.conf as documented in the file:
interface wlan0 static ip_address=192.168.0.12/24
After a reboot, the interface has the desired IP but it cannot reach any other host and cannot be reached.
If I start the GUI, the WiFi reports as connected to my home network. In the router admin panel, the Pi appears as one of the connected devices via WiFi. I removed the static IP configuration and assigned the desired IP to the MAC on the router config. Now, whatever the configuration in
dhcpcd.conf, the Pi appears as connected, but I cannot ping the router or any other host. Rebooting or turning wireless off has an effect on the router connected devices, so the list looks reliable.
When connecting with an ethernet cable, everything works normally.
Most search results point me to Jessie answers, which I don't think is helping, but at this point I have reverted all previous attempts.
192.168.0.1 is the IP of my router.
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 18.104.22.168 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
Via the GUI network tool I specified the IP again and it shows up in the
dhcpcd.conf file with the line:
SSID MYSSIDNAME inform 192.168.0.12
ip addr (with ethernet cable in):
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:ce:c1:bb brd ff:ff:ff:ff:ff:ff inet 192.168.0.19/24 brd 192.168.0.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::c8ff:b708:f181:8036/64 scope link valid_lft forever preferred_lft forever 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:9b:94:ee brd ff:ff:ff:ff:ff:ff inet 169.254.196.101/16 brd 169.254.255.255 scope global wlan0 valid_lft forever preferred_lft forever inet6 fe80::4505:f456:75d0:3bfc/64 scope link valid_lft forever preferred_lft forever
When ethernet cable is removed,
ip route with ethernet cable connected, without it only the line for wlan0 is in the output.
default via 192.168.0.1 dev eth0 src 192.168.0.19 metric 202 169.254.0.0/16 dev wlan0 proto kernel scope link src 169.254.196.101 metric 303 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.19 metric 202
This is the output of
iw dev wlan0 info (edited SSID and MAC values):
Interface wlan0 ifindex 3 wdev 0x1 addr fe:de:ab:dc:fe:de ssid MYSSIDNAME type managed wiphy 0 channel 6 (2437 MHz), width: 20 MHz, center1: 2437 MHz txpower 31.00 dBm
And this is the output of
iw dev wlan0 link (edited too, value for the router MAC is consistent with the output from my laptop):
Connected to 40:0e:11:e1:d1:1a (on wlan0) SSID: MYSSIDNAME freq: 2437 RX: 136281 bytes (347 packets) TX: 2645360 bytes (44753 packets) signal: -42 dBm tx bitrate: 72.2 MBit/s bss flags: short-preamble short-slot-time dtim period: 1 beacon int: 100