FreeBSD-based NAS keeps dropping Ethernet link

I just installed OpenWRT 19.07.8 r11364-ef56c85848 on a Linksys WRT1900ACv1. Ever since then, my home NAS appliance (a TrueNAS product: https://www.truenas.com/truenas-mini/ ) has been unable to maintain a link on its wired connection to the router. The system logs are full of repeats like this:

Aug 16 19:41:06 heathwill kernel: igb1: link state changed to DOWN
Aug 16 19:41:11 heathwill kernel: igb1: link state changed to UP
Aug 16 19:41:11 heathwill dhclient: New IP Address (igb1): 192.168.1.180
Aug 16 19:41:11 heathwill dhclient: New Subnet Mask (igb1): 255.255.255.0
Aug 16 19:41:11 heathwill dhclient: New Broadcast Address (igb1): 192.168.1.255
Aug 16 19:41:11 heathwill dhclient: New Routers (igb1): 192.168.1.1
Aug 16 19:41:11 heathwill kernel: igb1: link state changed to DOWN
Aug 16 19:41:15 heathwill kernel: igb1: link state changed to UP
Aug 16 19:41:16 heathwill dhclient: New IP Address (igb1): 192.168.1.180
Aug 16 19:41:16 heathwill dhclient: New Subnet Mask (igb1): 255.255.255.0
Aug 16 19:41:16 heathwill dhclient: New Broadcast Address (igb1): 192.168.1.255
Aug 16 19:41:16 heathwill dhclient: New Routers (igb1): 192.168.1.1
Aug 16 19:41:16 heathwill kernel: igb1: link state changed to DOWN
Aug 16 19:41:20 heathwill kernel: igb1: link state changed to UP
Aug 16 19:41:20 heathwill dhclient: New IP Address (igb1): 192.168.1.180
Aug 16 19:41:20 heathwill dhclient: New Subnet Mask (igb1): 255.255.255.0
Aug 16 19:41:20 heathwill dhclient: New Broadcast Address (igb1): 192.168.1.255
Aug 16 19:41:20 heathwill dhclient: New Routers (igb1): 192.168.1.1
Aug 16 19:41:20 heathwill kernel: igb1: link state changed to DOWN

It was working fine with the factory firmware, so I don't think this is a hardware problem. Also, the other two computers with wired connections to the router (one Linux one Windows) have had no problems. Any ideas?

Always start by checking the cable connection (different patch cable) and then ideally by putting a simple, unmanaged switch between router and the problematic device (that's not a solution, but at least a test).

I don't have an unmanaged switch to do that test with, but I tried changing out the patch cable and also moving the connection to a different port on the router. Same as before.

I'm not familiar with TrueNAS, but it appears to only cover x86_64 devices, which should allow booting the hardware from a live linux system for a couple of hours over night. It would be interesting to see if these other (linux-) drivers can cope better with the Marvell switch inside your router - or if you are seeing the same behaviour there (no special configuration necessary, just keep it online and look out for link drops).

After a bunch more investigation, this appears to have been down to a bug in the FreeBSD 11 igb driver. I updated the NAS to the most recent patchlevel of FreeNAS 11.2 (-U8) and the link flapping went away.

I'm still kinda wondering what the issue actually was; the only thing I'm sure of is that it wasn't FreeBSD bug #229432. This is the only concrete bug report that comes up if you google "freebsd 11.2 igb link flap", but it's a bad interaction with DHCP option processing, and I still had the problem when I turned off dhclient and gave the NAS an IP address manually.

Anyway, thank you for pushing me to think in terms of client-side issues, I probably would have wasted a lot more time tinkering with the network configuration on the router otherwise.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.