systemd-networkd fails to regain connection

This forum is for discussion about general software issues.

systemd-networkd fails to regain connection

Postby moosejaw » Wed Feb 10, 2021 4:47 pm

An issue has cropped up recently on my Raspberry Pi Model B+ (armv6): when the internet connection is lost (due to my ISP router crashing and resetting itself), systemd-networkd fails to reconnect to the network automatically. Instead, I have to physically unplug/replug the ethernet cable to restore the connection. Here is the journalctl output from immediately before/after this happens:

Code: Select all
Feb 10 09:56:11 mpdpi kernel: smsc95xx 1-1.1:1.0 eth0: Link is Down
Feb 10 09:56:11 mpdpi systemd-networkd[193]: eth0: Lost carrier
Feb 10 09:56:11 mpdpi systemd-networkd[193]: eth0: DHCP lease lost
Feb 10 09:56:11 mpdpi systemd-networkd[193]: eth0: DHCPv6 lease lost
Feb 10 09:56:11 mpdpi systemd-timesyncd[212]: No network connectivity, watching for changes.
Feb 10 10:08:07 mpdpi kernel: smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off
Feb 10 10:08:07 mpdpi systemd-networkd[193]: eth0: Gained carrier
Feb 10 10:08:07 mpdpi systemd-timesyncd[212]: Network configuration changed, trying to establish connection.
Feb 10 10:08:07 mpdpi systemd-networkd[193]: eth0: DHCPv4 address 192.168.1.71/24 via 192.168.1.254


For reference, here is the network configuration in /etc/systemd/network/eth0.network (which I believe is just the distribution default config; I have no memory of ever editing it):

Code: Select all
[Match]
Name=eth0

[Network]
DHCP=yes
DNSSEC=no


I can't pinpoint exactly when this problem started (i.e. can't tie it to a particular systemd or kernel upgrade), but it is a recent development, on or about the time of the switchover to the 5.10.x kernel. I suspect this is a general software issue rather than a hardward/platform-specific issue; apologies if this would be better posted in the armv6 category.

Grateful for any suggestions anyone might have on how to fix this!
moosejaw
 
Posts: 2
Joined: Wed Feb 10, 2021 4:33 pm

Re: systemd-networkd fails to regain connection

Postby summers » Thu Feb 11, 2021 11:57 am

strange, systemd-netword is usually fairly good at monitoring connections. Can you attach a uart to the RPi, and so see what it thinks is happening when the router goes down?

What it looks like, is that the electrical connection isn't coming up as expected. What happens if you reboot the router? What happens if you try and bring the ethernet up by hand on the RPi?
summers
 
Posts: 926
Joined: Sat Sep 06, 2014 12:56 pm

Re: systemd-networkd fails to regain connection

Postby moosejaw » Sat Feb 13, 2021 5:21 am

Thanks for your reply. I don't have a uart, unfortunately. The Pi is headless, so I will have to go hook up a keyboard and monitor to try controlling it after the network goes down. More and more I suspect that this is a hardware problem (the Pi is 6-7 years old), not a systemd-networkd problem.
moosejaw
 
Posts: 2
Joined: Wed Feb 10, 2021 4:33 pm

Re: systemd-networkd fails to regain connection

Postby effae » Wed Apr 07, 2021 7:57 am

I've got this exact problem on a headless RPi 3B+ running archlinux-arm (Linux 5.10.25-2-ARCH #1 SMP Mon Mar 22 21:48:03 UTC 2021 armv7l GNU/Linux). My router is set to reboot once a week, and since a couple months back(?), the RPi just won't reconnect after losing the connection.. I've got a wired connection and using systemd-networkd.

Just wanted to post and say that I doubt it's just your specific device. Did you ever research this further? My workaround for now has been to automatically reboot the RPi after the router reboots, but that just seems hacky.
effae
 
Posts: 1
Joined: Wed Apr 07, 2021 7:48 am

Re: systemd-networkd fails to regain connection

Postby ufo6000 » Wed Apr 07, 2021 9:31 am

@moosejaw:

For clarification, your 1st log, is is with or without your manual re-plug workaround ?
ufo6000
 
Posts: 65
Joined: Fri Jan 22, 2016 7:54 pm


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests

cron