1

After running apt-upgrade on a Raspberry Pi B+ 512MB to bring it to the current version of Raspbian GNU/Linux 9.4 (stretch) the Ethernet connection stopped working. The interface's behaviour after a fresh current and upgraded Raspbian installation (2018-06-27-raspbian-stretch-lite.img) is very strange.

  • On boot the interface LEDs don't light up.
  • The interface appears disconnected.
eth0: flags=4099  mtu 1500
        ether b8:27:eb:c3:bf:87  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  • After I remove the Ethernet cable the interface LEDs light up.
  • When I install the cable again the interface LEDs remain on, and dhcpcd gets to work.
Sep 15 11:12:38 masterbed dhcpcd[340]: eth0: carrier acquired
Sep 15 11:12:38 masterbed dhcpcd[340]: eth0: IAID eb:c3:bf:87
Sep 15 11:12:38 masterbed dhcpcd[340]: eth0: adding address fe80::1b3c:ab2b:f55f:d259
Sep 15 11:12:38 masterbed dhcpcd[340]: eth0: soliciting an IPv6 router
Sep 15 11:12:40 masterbed avahi-daemon[245]: Joining mDNS multicast group on interface eth0.IPvSep 15 11:21:22 masterbed systemd[1]: Started Cleanup of Temporary Directories.
Sep 15 11:12:40 masterbed avahi-daemon[245]: New relevant interface eth0.IPv6 for mDNS.
Sep 15 11:12:40 masterbed avahi-daemon[245]: Registering new address record for fe80::1b3c:ab2b:f55f:d259 on eth0.*.
Sep 15 11:12:43 masterbed dhcpcd[340]: eth0: probing for an IPv4LL address
Sep 15 11:12:48 masterbed dhcpcd[340]: eth0: using IPv4LL address 169.254.35.163
Sep 15 11:12:48 masterbed dhcpcd[340]: eth0: adding route to 169.254.0.0/16
Sep 15 11:12:48 masterbed avahi-daemon[245]: Joining mDNS multicast group on interface eth0.IPv4 with address 169.254.35.163.
Sep 15 11:12:48 masterbed avahi-daemon[245]: New relevant interface eth0.IPv4 for mDNS.
Sep 15 11:12:48 masterbed avahi-daemon[245]: Registering new address record for 169.254.35.163 on eth0.IPv4.
Sep 15 11:12:52 masterbed dhcpcd[340]: eth0: no IPv6 Routers available
  • Furthermore, the DHCP server gets a request and offers a reply.
Sep 15 11:12:42 spiti dnsmasq-dhcp[21015]: DHCPDISCOVER(eth0) b8:27:eb:c3:bf:87
Sep 15 11:12:42 spiti dnsmasq-dhcp[21015]: DHCPOFFER(eth0) 192.168.136.23 b8:27:eb:c3:bf:87
Sep 15 11:12:49 spiti dnsmasq-dhcp[21015]: DHCPDISCOVER(eth0) b8:27:eb:c3:bf:87
Sep 15 11:12:49 spiti dnsmasq-dhcp[21015]: DHCPOFFER(eth0) 192.168.136.23 b8:27:eb:c3:bf:87
  • However, the interface doesn't use the offered address
eth0: flags=4163  mtu 1500
        inet 169.254.35.163  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::1b3c:ab2b:f55f:d259  prefixlen 64  scopeid 0x20
        ether b8:27:eb:c3:bf:87  txqueuelen 1000  (Ethernet)
        RX packets 1  bytes 379 (379.0 B)
        RX errors 2  dropped 1  overruns 0  frame 2
        TX packets 35  bytes 6237 (6.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  • Manually configuring the eth0 address from an eth1 connection (to a different IP address obviously), looses the connection on the eth1interface as well.

  • These are the last messages logged before loosing the connection.

Sep 15 11:25:52 masterbed avahi-daemon[245]: Withdrawing address record for 169.254.35.163 on eth0.
Sep 15 11:25:52 masterbed avahi-daemon[245]: Leaving mDNS multicast group on interface eth0.IPv4 with address 169.254.35.163.
Sep 15 11:25:52 masterbed avahi-daemon[245]: Withdrawing address record for 169.254.35.163 on eth0.
Sep 15 11:25:52 masterbed avahi-daemon[245]: Leaving mDNS multicast group on interface eth0.IPv4 with address 169.254.35.163.

On boot it displays

Sep 15 11:31:03 masterbed.spinellis.gr dhcpcd[215]: eth0: waiting for carrier.

When I remove the Ethernet cable the following lines appear:

[Sat Sep 15 23:39:56 2018] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[Sat Sep 15 23:39:56 2018] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
  • The same SD card on another Model B+ brings up the Ethernet interface without a problem.

Were it not for the DHCP request that the server gets, I would think that the Ethernet interface failed during the upgrade (through the reboot or a firmware update). Any other ideas?

Would replacing the Ethernet RJ45 magnetics module with one from another Raspberry Pi help fix the problem, or do the symptoms indicate a fault in logic beyond that module?

  • 1
    The DHCP server get no ACK or DHCPREQUEST for its DHCPOFFER so it seems the RasPi does not see incoming packages. It also auto configures an ip address from the range 169.254.0.0/16 by avahi because it does not see the network. Have you had a look at the ethernet cable? Maybe a broken wire on RX? Curious is that the interface shows TX packets 0 bytes 0 (0.0 B) but the DHCP server gets a DHCPDISCOVER from the RasPis mac address. That cannot be. – Ingo Sep 15 '18 at 11:07
  • Tried different cables and switch port, without success. Same cable/port works OK with other Pi. The interface sends/receives packets and communicates with the DHCP server only after I reconnect the cable; see the second ifconfig output: RX packets 1 bytes 379 (379.0 B) RX errors 2 dropped 1 overruns 0 frame 2 TX packets 35 bytes 6237 (6.0 KiB) – Diomidis Spinellis Sep 15 '18 at 12:45
  • 1
    Hm... same SD Card working in another RPi B+, then it seems to be a hardware failure. All contacts in the connector in place? Just to clarify DHCP. What your are showing from the DHCP protocol there are only DHCPDISCOVER and DHCPOFFER. On starup of the RasPi the procedure is: DHCPDISCOVER from RasPi, DHCPOFFER to RasPi, DHCPREQUEST from RasPi most with the offered ip address, DHCPACK to RasPi. There is no DHCPREQUEST from RasPi so it does not see the offer. – Ingo Sep 15 '18 at 13:22
  • Connector pins appear OK. The failure occurred after a remote update (over ssh), so the interface was working at that point. Indeed the second two steps of the DHCP protocol do not appear in the log. Instead, DISCOVER and OFFER get repeated ever 60s. – Diomidis Spinellis Sep 15 '18 at 19:06
  • Can you see something in journalctl -b -e? – Ingo Sep 15 '18 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.