Solved Interface flapping on ethernet USB adapter

My motherboard is a X670E Xtreme from Aorus without any lan chipset driver support on FreeBSD.
Since I very like FreeBSD and only started to use it, I searched the forums and found out that ethernet lan adapters with Asix chipsets are generally very well supported so, I bought on recommendation a J5 Create JUE130 USB 3.0 Gigabit Ethernet adapter with the AX88179 chipset.

I am using FreeBSD 14.2-Release.
On system start the adapter is recognized and gets the ue0 interface up, and a IP adress assigned.
The media mode is 1000baseT <full-duplex,master> (autoselected).
Through ping I can verify that there is indeed a working internet connection.

However, after like 15 to 20 minutes I notice that my webbrowser does not load any pages anymore.
I decided to look up the most recent log message under /var, and saw that the ue0 interface rapidly changed its state from up to down and vice versa.
Even though it got up again, I could not ping a server, the command got stuck and did not show up anything on screen.

After some research I found a forum post from a user who had a similar problem in the past.
His post was similar but he used a different ethernet adapter with a different chipset and the plug-in destination was a USB-C port instead of a USB-A port.
The link to the post is: https://forums.freebsd.org/threads/internet-connection-going-up-and-down-constantly.95078.
In the post a autonegotiation feature is also mentioned, but I read that disabling autonegotiation in the router can lead to trouble with different connected devices each with their own settings.

My steps to try to solve this problem were:
-> To replug the adapter from USB-3.2 to a USB-3.0 port.
-> Doing a coldboot

What possibilities or methods could be available for me to solve this problem?
 
In the post a autonegotiation feature is also mentioned, but I read that disabling autonegotiation in the router can lead to trouble with different connected devices each with their own settings.
Autonegotiation was a problem with 10/100Mbit switches, it was an optional feature. It had many implementation and compatibility issues. So it was often set to a specific speed/duplex in order to prevent those compatibility issues. With gigabit it is mandatory part of the specification and those compatibility issues became a thing of the past.

 
See also PR 252165. For me it was partially solved by switching from ure(4) to cdce(4) driver by switching usb device to another configuration usbconfig -d 0.3 set_config 1, where 0.3 is my usb ethernet adapter.
To check supported configurations you may run usbconfig -d 0.3 dump_device_desc and find bNumConfigurations parameter.
 
Try an adapter with the AX88179A chipset.
That is interesting, because I have two other adapters at hand.
One Adapter is the one mentioned in your AX88179A chipset link (UGREEN).
The other one is Amazon Basics USB 3.0 to 10/100/1000 Gigabit Ethernet.
I believe, if I am not wrong, the Amazon Basics adapter also has the same chipset as the UGREEN one.

During my tests the UGREEN adapter is recognized.
The system boots and the interface ue0 is assigned and up.
It also seems that the default gateway and an IP address is also assigned.
After starting ping, it tells me something like "DNS adress could not be resolved" around the lines.
I do not really know what part in the boot process is causing this issue.
Since the AX88179A chipset works, I think it would be better to solve the DNS error.

The Amazon Basics USB 3.0 adapter suffers from the same symptoms as the J5 Create JUE130 one.

See also PR 252165. For me it was partially solved by switching from ure(4) to cdce(4) driver by switching usb device to another configuration usbconfig -d 0.3 set_config 1, where 0.3 is my usb ethernet adapter.
To check supported configurations you may run usbconfig -d 0.3 dump_device_desc and find bNumConfigurations parameter.
I will try that option, too.
 
You are describing the symptoms I experienced with the AX88179 chipset USB adapters on FreeBSD.

Try an adapter with the AX88179A chipset.
I now managed to fix the DNS error with the UGREEN ethernet adapter.
Despite still getting ue0 interface flapping, I read that it could be related to how the general ethernet usb adapter is overhelmed by the internet traffic.
Unless the J5 Create JUE130 USB adapter, the UGREEN one provides me a stable internet connection.

Now, I guess, I can mark this thread as solved.
 
I now managed to fix the DNS error with the UGREEN ethernet adapter.
Despite still getting ue0 interface flapping, I read that it could be related to how the general ethernet usb adapter is overhelmed by the internet traffic.
Unless the J5 Create JUE130 USB adapter, the UGREEN one provides me a stable internet connection.

Now, I guess, I can mark this thread as solved.
Your ue0 interface should not be flapping. That will cause intermittent failures on the Ethernet.

You can check the chipset with, as root:
Code:
# lsusb | grep AX88179
Bus /dev/usb Device /dev/ugen0.2: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Using an adapter which reported the AX88179A chipset solved all issues for me.

As suggested by shurik, PR 252165 addresses the issue, but it's still open.
 
Your ue0 interface should not be flapping. That will cause intermittent failures on the Ethernet.
You are right, I did a stress test, and noticed that my internet connection was not very stable.
During the ue0 interface flapping the adapter managed to connect automatically to the internet again so, I did not have any complete abruptions where manual interference was needed.

# lsusb | grep AX88179
I executed the lsusb command like written in the quote, and discovered that my 3 USB ethernet adapters (Amazon Basics, UGREEN, and j5 Create JUE130) all have the AX88179 chipset.

This is the UGREEN USB ethernet adapter I bought from Amazon: UGREEN 3.0 ethernet adapter.
On one of the pictures there it is clearly visible that they advertise this adapter with the AX88179A chipset.
Since the lsusb command did show a different chipset, I have a question.
Given that the AX88179A is part of the AX881XY family, does lsusb display the chipset as an AX88179A one?
If yes, then the advertasion seems to be wrong, and I need to search further for compatible USB 3.0 or USB 3.2 ethernet adapters.

I am using my computer for like 10 to 12 hours a day so, I need a durable preferably for the long-term usage USB 3.2 or 3.0 ethernet adapter.
It could be an adapter with the RTL chipset, but I think it would be better to have a chipset which is natively supported by the FreeBSD kernel.
I tried to get this adapter: Recommended by gpw928, but it is not shipable to my country so, I bought today an alternative which could be quite the same as the recommended adapter: UGREEN USB LAN Adapter 1000 Mbps USB Ethernet Adapter.
Yesterday I bought this USB ethernet adapter: USB Network Adapter, CableCreation Braided & Aluminum USB 3.0 to RJ45 Gigabit Ethernet Adapter.
They, too claim to have the AX88179A chipset inside their adapter, but I need to wait until Monday to try this adapter out.

Can someone recommend me eventually a long-term durable adapter which is guaranteed to work with FreeBSD?
 
Given that the AX88179A is part of the AX881XY family, does lsusb display the chipset as an AX88179A one?
The USB adapters that I have which don't give problems with FreeBSD display "AX88179A" when queried with lsusb.

Remember that if your default route goes through ue0, the adapter may not initialise in a timely fashion to plant the default route, and you may have to address that.
 
Back
Top