Given what you also said in the OP, I'd guess this is more of a raspberry issue:
When I plugged the ASIX USB device directly into my laptop and went direct laptop->server I got 900+ Mbps, so the USB device is capable of handling near line speed.
which is also what I've noticed. I've been using ASIX USB dongles (Ugreen brand of USB 3.0 gigabit dongles, specifically) on a Linux-based DYI NAS that has been transferring data at nearly line speed for days on end, and they are perfectly fine, also used for passthrough around in VMs (windows or linux) and so on, never had a problem in years.
A few realtek USB dongles I tried tend to crap out after a hour or so of actual serious use, and may or may not like being passed through without being unplugged first. This is also the case on a Macbook when syncing data to the same NAS (using a different dongle but stil a realtek chipset).
that said, if you also actually look at the market, dongles with ASIX chipsets are more expensive than ones with Realtek chipsets.
Or at least if you look at sub-10 euro dongles on ebay you only get stuff with Realtek chipsets.
EDIT: speaking of raspberry and ethernet, recently a youtuber also did some benchmarking of raspberry CM4 on two "router" boards, one with ethernet on PCIe and one with Ethernet on USB.
It had similar results to you, top speed was lower and throughput was less than half with the USB ethernet controller https://www.youtube.com/watch?v=w7teLVwi408 (skip to 10:40 to see the graph)
On my next build I am going to try the script @bobafetthotmail posted. It seems simple enough which is good for a guy like me that was banned from writing code in 1999. Its a long story......
But seriously, for novice users, a LUCI page could probe for the mac addresses and ask the user to assign them, then generate the config file at /etc/config/mac-static-interfaces. @anon50098793 perhaps the default on the build is not to bring up interfaces if we detect them to be USB until this is done. Kindly take this all in the context of a noob trying to do everything via LUCI...
good idea... re-reading how it works... it bypasses the need to 'swap' names... so you don't need to use new uniq names...
probably more sensible in retrospect...
point taken... and thanks... can't exactly work like that due to interactions with typical OS functions... but I do understand the point you are making and will consider it if tackling this again...
I have been experiencing issues with the realtek chipsets from 2 vendors. The dongles seem to get hot to the touch and crap out. This has happened on OPENWRT on the PI and now with OPNSENSE on an i7 PC when there is no load on the router, just the MWAN pinging every minute. I put a fan on the dongle to stabilize it. Really odd behavior.
that's a very dramatic thing to say, but ok.
I mean I'm not a programmer either but I can hack together some shell (Linux) or batch (Windows) scripts with the help of online documentation and tutorials.
The config file is written with OpenWrt standard configuration syntax so people can add a Luci package to manipulate the config.
If someone wants to do that I can submit my script as a package in the package feed (technically speaking it's already a package, just a local package I use in my builds).
@bobafetthotmail now that I re-read what I wrote, it is pretty dramatic. So Explanation. Sometime in 1999 some really smart guys code reviewed the c++ I had checked into the build and told me there were things that I was pretty good at and coding was not one of them. They strongly recommended I should stick to what I am good at :-(.
Unfortunately, I never learned to write bash hence my pleas for help.
Ok, with the following instructions the script will be run on device start and will assign the interface name you want to a device that has the MAC address you want, for all devices defined in the config file.
Devices not defined in the config will be ignored. It's better if you define all network interfaces you have in the config.
You need to put the script in /etc/init.d folder and call it staticeth (or whatever you want, name does not matter)
#!/bin/sh /etc/rc.common
START=11
# don't run within buildroot
[ -n "${IPKG_INSTROOT}" ] && return 0
#use busybox grep as GNU grep may be set differently and break the script
grep(){
/bin/busybox 'grep' $@
}
#shutting down all interfaces, then assigning temporary name to free up interface names
#bridges and virtual interfaces are already excluded by /sys/class/net/*/device/uevent as only physical interfaces have that
for i in $( ls /sys/class/net/*/device/uevent | awk -F'/' '{print $5}' | tr '\n' ' ' ) ;
do
mac_address=$( grep $i /etc/config/mac-static-interfaces | awk '{print $3}' | tr -d '"' )
if [ "$mac_address" != '' ]; then
ip link set "$i" down
ip link set "$i" name old"$i"
fi
done
for i in $( ls /sys/class/net/*/device/uevent | awk -F'/' '{print $5}' | tr '\n' ' ' ) ;
do
mac_address=$( cat /sys/class/net/$i/address )
interface_name=$( grep -i $mac_address /etc/config/mac-static-interfaces | awk '{print $2}' )
if [ "$interface_name" != '' ]; then
ip link set "$i" down
ip link set "$i" name "$interface_name"
fi
done
Then make it executable with chmod +x /etc/init.d/staticeth
Then "enable" it to make it start as a service when the system is turned on.
service staticeth enable
now create the config file /etc/config/mac-static-interfaces
and write the interface name and the mac address of the devices you want to remap. The interface names and mac addresses below are just examples, please write the right ones for your device.
yes, although I'm dumb and originally I copied only half of it, now the script is complete (both in that post and in my answer to the other guy).
It is simply run on boot and will rename interfaces with a temporary name to "make space" if the same name already exists before doing the actual rename so you can freely choose interface names. It is run before network service but after hardware initialization so it should not screw up network.
If you want to call it after device boot (like by a script in /etc/hotplug.d to react to hotplugged devices), call the script and then service network restart to force network service to adjust to new device names.
I configured and ran. It broke after the rename and I am left with interfaces named "old".
I think I have a problem with my bridge config and am generating one less interface than I should have and am breaking the "for i in... " loop. Will work on it more tomorrow.
I lost access to the router after running so I plugged in another dongle which I think is #17 in the following ip a
root@rpi-dca63263b8 /39# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: oldeth0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether dc:a6:32:63:b8:7d brd ff:ff:ff:ff:ff:ff
3: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN group default qlen 1000
link/tunnel6 :: brd ::
4: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
6: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether de:f9:ac:99:e8:09 brd ff:ff:ff:ff:ff:ff
7: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN group default qlen 1000
link/gre 0.0.0.0 brd 0.0.0.0
8: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1476 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
9: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1464 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
10: ip6gre0@NONE: <NOARP> mtu 1448 qdisc noop state DOWN group default qlen 1000
link/gre6 :: brd ::
11: teql0: <NOARP> mtu 1500 qdisc noop state DOWN group default qlen 100
link/void
12: oldeth1: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 00:0e:c6:70:bf:6a brd ff:ff:ff:ff:ff:ff
13: oldeth2: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 00:0e:c6:62:e2:b2 brd ff:ff:ff:ff:ff:ff
14: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-wifi state UP group default qlen 1000
link/ether dc:a6:32:63:b8:7e brd ff:ff:ff:ff:ff:ff
inet6 fe80::dea6:32ff:fe63:b87e/64 scope link
valid_lft forever preferred_lft forever
16: br-wifi: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether dc:a6:32:63:b8:7e brd ff:ff:ff:ff:ff:ff
inet 10.10.90.1/24 brd 10.10.90.255 scope global br-wifi
valid_lft forever preferred_lft forever
inet6 fe80::dea6:32ff:fe63:b87e/64 scope link
valid_lft forever preferred_lft forever
17: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-lan state UP group default qlen 1000
link/ether 00:0e:c6:62:e2:b1 brd ff:ff:ff:ff:ff:ff
18: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:0e:c6:62:e2:b1 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
valid_lft forever preferred_lft forever
inet6 fd52:2bc3:b646::1/60 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::20e:c6ff:fe62:e2b1/64 scope link
valid_lft forever preferred_lft forever
root@rpi-dca63263b8 /38# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 1: Dev 2, If 0, Class=, Driver=ax88179_178a, 5000M
|__ Port 2: Dev 3, If 0, Class=, Driver=ax88179_178a, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
|__ Port 4: Dev 3, If 0, Class=, Driver=asix, 480M