Flapping eth0

###############################################################################
###############  openhabian  ##################################################
###############################################################################
##        Ip = 192.168.1.71
##   Release = Raspbian GNU/Linux 11 (bullseye)
##    Kernel = Linux 5.15.76-v7l+
##  Platform = Raspberry Pi 4 Model B Rev 1.1
##    Uptime = 5 day(s). 10:45:2
## CPU Usage = 5% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
##  CPU Load = 1m: 0.38, 5m: 0.30, 15m: 0.27
##    Memory = Free: 1.00GB (26%), Used: 2.79GB (74%), Total: 3.79GB
##      Swap = Free: 2.99GB (100%), Used: 0.00GB (0%), Total: 2.99GB
##      Root = Free: 21.55GB (79%), Used: 5.48GB (21%), Total: 28.22GB
##   Updates = 14 apt updates available.
##  Sessions = 1 session(s)
## Processes = 127 running processes of 32768 maximum processes
###############################################################################

openHAB 3.4.0-SNAPSHOT - Build #3166

Symptom:

[...]
[455046.082705] bcmgenet fd580000.ethernet eth0: Link is Down
[455047.122705] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[456476.109203] bcmgenet fd580000.ethernet eth0: Link is Down
[456477.149350] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[456893.155419] bcmgenet fd580000.ethernet eth0: Link is Down
[456894.195524] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[459543.126120] bcmgenet fd580000.ethernet eth0: Link is Down
[459545.206276] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[461559.729729] bcmgenet fd580000.ethernet eth0: Link is Down
[461560.769823] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[462142.125267] bcmgenet fd580000.ethernet eth0: Link is Down
[462143.165382] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[464104.654740] bcmgenet fd580000.ethernet eth0: Link is Down
[464106.734737] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[490920.530567] bcmgenet fd580000.ethernet eth0: Link is Down
[490922.610699] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[492002.148230] bcmgenet fd580000.ethernet eth0: Link is Down
[492003.188354] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

Wifi off, dynamic IP address, connected to router/DHCP server via switch, 3A power supply

Anyone having similar symptoms?

I don’t have these symptoms and see this entry in my logs

[   13.675102] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

Have you checked your switch, port, cable e.g. like advised in networking - Many "eth1: Link is Down" and "eth1: Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX" errors in /var/log/messages - Server Fault

A RPi 4 has GbE and a proper installation would negotiate to use it.
That isn’t an issue with standard openHABian let alone openHAB but with your networking setup and/or hardware. You need to provide networking details and what you have analyzed and tried so far if you want others to help you; strictly speaking you should go looking for help elsewhere on some networking forum. Please at least change to use proper tagging on your post.

How to ask a good question / Help Us Help You - Tutorials & Examples - openHAB Community

Please read my question.

I did. What’s your point in asking that?

Try different port on switch?
Tried different cable to device?
Tried setting port on switch to 1 GB full and not auto negotiate?
That would be my first questions.

openhabian@openhabian:~ $ ethtool --show-eee eth0
EEE settings for eth0:
        EEE status: enabled - inactive
        Tx LPI: disabled
        Supported EEE link modes:  100baseT/Full
                                   1000baseT/Full
        Advertised EEE link modes:  100baseT/Full
                                    1000baseT/Full
        Link partner advertised EEE link modes:  Not reported
openhabian@openhabian:~ $
openhabian@openhabian:~ $ sudo ethtool --set-eee eth0 eee off
[sudo] password for openhabian:
openhabian@openhabian:~ $ ethtool --show-eee eth0
EEE settings for eth0:
        EEE status: disabled
        Tx LPI: disabled
        Supported EEE link modes:  100baseT/Full
                                   1000baseT/Full
        Advertised EEE link modes:  Not reported
        Link partner advertised EEE link modes:  Not reported

I will monitor eth0 and report back.

Try switching whatever port its currently on, to another in your switch just to see if theres a difference?

Thanks for all constructive suggestions. The switch is a 100 Mbit/s switch, so the message from the Ethernet driver doesn’t necessarily indicate a handshake problem - sorry for not mentioning the switch parameters.

Disabling EEE on eth0 didn’t fix the problem for me (see Gigabit Ethernet "EEE" causing trouble between Pi 4 boards and almost any device - Raspberry Pi Forums).

Let’s replace the onboard Ethernet controller with an external one:

[583159.920161] usb 2-2: new SuperSpeed USB device number 2 using xhci_hcd
[583159.956953] usb 2-2: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 1.00
[583159.956983] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[583159.957005] usb 2-2: Product: AX88179
[583159.957023] usb 2-2: Manufacturer: ASIX Elec. Corp.
[583159.957040] usb 2-2: SerialNumber: 0000000000006C
[583160.318947] ax88179_178a 2-2:1.0 eth1: register 'ax88179_178a' at usb-0000:01:00.0-2, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:0e:c6:d9:d4:35
[583160.398661] systemd-udevd[22937]: Using default interface naming scheme 'v247'.
[583507.153048] bcmgenet fd580000.ethernet eth0: Link is Down
[583514.941736] ax88179_178a 2-2:1.0 eth1: ax88179 - Link status is: 1
[583514.948846] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

So far no flaps on eth1 - but it is too premature for a final conclusion. Stay tuned.

No more flaps after replacing the onboard Ethernet controller with an USB Ethernet controller (based on AX88179).

What should one conclude from this? I don’t know. Since a root cause analysis would take a lot of time, I will leave it at that.

Rule of thumb:
Use carrier grade HW for mission critical applications …

Glad you got it stable.
For me and my curiosity to fully understand root cause when things misbehave, I would dig out a 1 gigabyte switch and test with it to see if the onboard ethernet controller is only funky when negotiating a 100-megabyte connection. just because I have seen that kind of weirdness in the past with the some of the lower end chipsets (knock offs) a few years ago.

1 Like