I am having an issue with my NanoPi R4S. I have been running OpenWRT on it for about a year and use it in place of my modem.
I'm very satisfied, but from time to time my lan port (eth1) goes down, taking down my whole network and restoring itself about half a minute later.
There isn't any clear indication why this happens. Sometimes when working from home with some network load (online meetings, streaming, etc.) But sometimes even a night when there isn't much load.
Logs:
Sun Apr 13 22:41:49 2025 daemon.notice netifd: Network device 'eth1' link is down
Sun Apr 13 22:41:49 2025 kern.info kernel: [134144.897649] r8169 0000:01:00.0 eth1: Link is Down
Sun Apr 13 22:41:49 2025 kern.info kernel: [134144.898403] br-lan: port 1(eth1) entered disabled state
Sun Apr 13 22:41:50 2025 daemon.notice netifd: bridge 'br-lan' link is down
Sun Apr 13 22:41:50 2025 daemon.notice netifd: Interface 'lan' has link connectivity loss
Sun Apr 13 22:42:25 2025 daemon.notice netifd: Network device 'eth1' link is up
Sun Apr 13 22:42:25 2025 daemon.notice netifd: bridge 'br-lan' link is up
Sun Apr 13 22:42:25 2025 daemon.notice netifd: Interface 'lan' has link connectivity
Sun Apr 13 22:42:25 2025 kern.info kernel: [134180.699305] r8169 0000:01:00.0 eth1: Link is Up - 1Gbps/Full - flow control off
Sun Apr 13 22:42:25 2025 kern.info kernel: [134180.700115] br-lan: port 1(eth1) entered blocking state
Sun Apr 13 22:42:25 2025 kern.info kernel: [134180.700606] br-lan: port 1(eth1) entered forwarding state
In the minutes before the port goes down, there aren't any logs. I can't find any error or indication why this is happening
I have tried the following solutions:
Replaced power source with a 60W (laptop) adapter
Replaced cable
Switched eth1 and eth0 in the configuration (and switched cables of course), the issue persists, but is then on eth0 and not eth1
Installed collectd an monitored Processors, Interfaces, System load, Memory and Thermal, but nothing seems out of the ordinary
Does anyone experience similar issues?
Or does anyone have any advice how I could investigate farther?
I am running OpenWRT 24.10.0 on a FriendlyElec NanoPi R4S.
This was already an issue with previous versions, but I haven't reported it before because I first wanted to investigate myself.
It's plugged into a TP-Link TL-SG108PE, a switch with 8 ports (4PoE), which is running as an unmanaged switch in its default configuration.
I have had this switch for a couple of years and have not had any issues with my previous modem.
I'll check if there is a firmware upgrade available, check other ports (shouldn't be an issue, but who knows at this point?) and if there is any form of logging available.
Thanks for the link. The issue was already present with 23.05.5 (and 23.05.03), and I fortunately have no issue with the port not being initialized on reboot.
But I'll keep an eye on the issue and await the release of 24.10.1 (or above) to test again
With the checks and changes you have already done, I also suspect the TL-SG108PE.
Look at the logs of other devices connected to that switch to check for connectivity loss at the same time.
Look at the logs for the switch, they may be available if it has a web interface. See if it rebooted or shows multiple ports with a link-down event at that time which might indicate a problem with the internal switch chip.
Note that a 60W laptop power supply may not provide any more power (amps) at 5V if it is doing the standard PD power delivery protocol. I assume your setup is using the USB-c port for power. The R4S requires a "passive" 5V power supply capable of delivering higher current in order to get more than the standard amperage (3A) on the USB-c port. Many USB devices limit current to the "standard" values per the PD protocol/standard. https://en.wikipedia.org/wiki/USB_hardware#USB_Power_Delivery
Thanks! I will look into the switch.
I may have (wrongly) assumed that the connectivity of all devices dropped because of the issue with my NanoPi.
All devices in my home lose their connection when this happens, and I assumed this was because the NanoPi was unreachable, but haven't considered the switch itself.
Unfortunately, the switch itself doesn't keep any logs or information (like last boot time), so I'll need to investigate another way.
I have another switch lying around and I'll put that one between the NanoPi and the switch. If my internet dies, but OpenWRT doesn't show it in the logs (because it is still connected to the other switch), then I can assume that the TP-Link switch needs replacement.
Thank you all again. I'll respond when I've investigated further.
Regarding the power source, yes, I'm supplying power via USB-C. I know that there are possible stability issues when using a phone charger, so for that reason I connected it to a laptop power source. I'm not expecting this to be an issue, but I'll keep it in mind.
Edit: I have updated the switch firmware, but that didn't seem to solve the issue
I have installed a new switch and the issue is gone. Thank you very much, I've marked your first reply as the solution.
I feel a bit dumb, because I checked everything, but something mentally prevented me from checking my "trusty old switch", which "has never had any problems".
Thanks again! I'm happy that the issue wasn't with my NanoPi.