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, despite it being, to my knowledge, previously configured and working with the static IP 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=

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.


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

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


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 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 brd 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 brd 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 dev eth0 src metric 202 dev wlan0 proto kernel scope link src metric 303 dev eth0 proto kernel scope link src 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
    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)
    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
  • 1
    Can you do a netstat-r and verify output shows a "default" route with the IP of your router on the wlan0 interface? Mar 2, 2019 at 16:48
  • Edited to add the result of netstat @TimCampbell Mar 2, 2019 at 16:51
  • The "Iface" is wrong. It should read "wlan0". This means that to reach the router, it wants to use the physical Ethernet. This explains why wlan0 can't reach the default router, but it does not explain how it ended up configured to the wrong interface. Have you manually edited network config files? Mar 2, 2019 at 17:02
  • 1
    Possible duplicate of DNS finds ip but cannot ping address
    – Milliways
    Mar 2, 2019 at 21:51
  • 1
    @RubénCabrera but the answer is the same - improper static IP setup - you may have other problems (your question is imprecise) but you need to fix the fundamentals first. If you get a Link-local address the Pi cannot find a router.
    – Milliways
    Mar 2, 2019 at 23:35

2 Answers 2


As far as I can see is, that the wired connection has a DHCP server running so the interface eth0 gets an ip address 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 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 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 for wired and maybe 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.

  • I don't understand the first point. I can access the router on from wired and wireless. I can get IP addresses from DHCP from any other device at home and the Pi was getting an IP for months. wpa_supplicant.conf has the right information. I'm updating the question with the output of the commands. Thanks. Mar 3, 2019 at 21:45
  • @RubénCabrera Sorry, I have given a wrong example subnet It should be I have corrected the answer. But about your comment: it is not possible to connect to with an interface address of They are on different subnets. This can only be done with routing, but addresses are not routable. Check with ping -I wlan0
    – Ingo
    Mar 3, 2019 at 21:59
  • Thanks, it is clearer now. Pinging the router or any other address, in the subnet and of known hosts on the internet, fails (100% packet loss). Mar 3, 2019 at 22:36

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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