1

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.

EDIT(2):

Result of netstat -r. 192.168.0.1 is the IP of my router.

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.18.0.0     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

Output of 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,

Output of 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

2 Answers2

0

This turned out to be a hardware problem, which became clearer when iw dev command gave different outputs in a matter of seconds, sometimes not showing the wlan0 interface. I had to give it up and use only wired interface for this raspberry.

0

As far as I can see is, that the wired connection has a DHCP server running so the interface eth0 gets an ip address 192.168.0.19 from it including other options like default route and DNS server addresses. Usually internet home router with wired and wireless connections bridge both and have a DHCP server running. Devices connected to it, no matter what connection is used, are all part of the same subnet, e.g. in your case 192.168.0.0/24. Assuming this I would expect that the RasPi connected by WiFi (wlan0) will also find the same DHCP server than from the wired connection (eth0). It should also get an ip address other than 192.168.0.19 with options from the subnet. This is not the case.

Instead you get a link-local address that is given when no DHCP server is found. Maybe there is no wireless ethernet connection at all.

  • Check if the wired and wireless connection on the router are bridged or if they have different subnets, e.g 192.168.0.0/24 for wired and maybe 192.168.1.0/24 for wireless.
  • Check if you can get an ip address from a DHCP server on the wireless connection.
  • Check your /etc/wpa_supplicant/wpa_supplicant.conf if it still matches all conditions to connect to the router.
  • Check WiFi connection on the RasPi by executing this commands: iw dev wlan0 info and iw dev wlan0 link

Do all checks with unplugged ethernet cable so only the WiFi connection comes to play. Tell us what you find.

Ingo
  • 42,961
  • 20
  • 87
  • 207