I have connected a QNAP QNA-UC5G1T 5Gbe usb network adapter to a raspberry pi running Ubuntu server 20.04.5 LTS. I also have a 5Gig fiber internet connection and a 10G switch and 10G router and get around 4Gbit/s speed both Download and Upload on Ubuntu desktop normally.
I had to enable this adapter as the eth1 interface by editing the file in /etc/netplan/50-cloud-init.yaml like so by adding an eth1 entry
sudo nano /etc/netplan/50-cloud-init.yaml
network:
ethernets:
eth0:
dhcp4: true
optional: true
eth1:
dhcp4: true
optional: true
version: 2
Then running
sudo netplan apply
It is only allowing under 1GB/s speed download, more like 750Mbits/s, but is reaching nearly 2GB/s upload on eth1. I am testing this with speedtest-cli for the speed estimates.
Further, when I run
ip a show eth1
It outputs a qlen of 1000, which it should be 5000
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
inet XXX.XXX.XX.XXX/XX brd XXX.XXX.XX.XXX scope global dynamic eth1
valid_lft 85855sec preferred_lft 85855sec
inet6 xxxx::xxxx:xxxx:xxxx:xxxx/xx scope link
valid_lft forever preferred_lft forever
And ifconfig
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet XXX.XXX.XX.XXX netmask XXX.XXX.XXX.0 broadcast XXX.XXX.XX.XXX
inet6 xxxx::xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x20<link>
ether 00:11:22:33:44:55 txqueuelen 1000 (Ethernet)
RX packets 4195 bytes 992272 (992.2 KB)
RX errors 0 dropped 47 overruns 0 frame 0
TX packets 4107 bytes 595608 (595.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
This shows a txqueuelen of 1000
But when I run
ethtool eth1
It outputs and clearly shows link modes of 5000baseT/Full, and Speed: 5000Mb/s
Settings for eth1:
Supported ports: [ TP ]
Supported link modes: 100baseT/Full
1000baseT/Full
2500baseT/Full
5000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 100baseT/Full
1000baseT/Full
2500baseT/Full
5000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 5000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
And when I run sudo lshw -C network
I get
*-network:0
description: Ethernet interface
physical id: 2
logical name: eth0
serial: 55:44:33:22:11:00
capacity: 1Gbit/s
capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=bcmgenet driverversion=v2.0 link=no multicast=yes port=MII
*-network:1
description: Ethernet interface
physical id: 3
bus info: usb@2:2.1
logical name: eth1
serial: 00:11:22:33:44:55
capacity: 1Gbit/s
capabilities: ethernet physical tp 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=aqc111 driverversion=22-Aug-2005 duplex=full firmware=3.1.6 ip=XXX.XXX.XX.XXX link=yes multicast=yes port=twisted pair
My network:1, or eth1, clearly shows a limit of capacity of 1Gbit/s, and shows capabilities of max 1000bt-fd.
I have figured out how to update the qlen attribute of the ip a show eth1 to be 5000, and the txqueuelen of ifconfig eth1 by "Configuring the udev rule in the file "/lib/udev/rules.d/70-persistent-net.rules" to the following:
SUBSYSTEM=="net", ACTION=="add|change", DRIVERS=="aqc111", ATTR{address}=="00:11:22:33:44:55", KERNEL=="eth*", NAME="eth1", ATTR{tx_queue_len}="5000"
The above instruction comes from the suse support docs found here: https://www.suse.com/zh-cn/support/kb/doc/?id=000019932
Now on reboot, both ip a show eth1 and ifconfig eth1 show the updated 5000 attribute. But the sudo lshw -C network command still shows the capactiy as 1Gbit/s and the highest capabilities is still 1000bt-fd.
Is there a way to update these values output by lshw -C network, so that the adapter can go above the 1Gbit/s amount on download? And why is upload going at around 2Gbit/s and not limited by the capacity of 1Gbit/s like downloads?
I should note that the drivers for this network adapter come included in Ubuntu server and Desktop. I have also tried installing the most recent drivers on the Marvell website and that does not change anything. They are the aqc111 drivers.
I have also been able to get this working on Ubuntu desktop as expected, without any special configuration, just plug and play. I ran the speedtest just now and got about 2.2Gbit/s download and nearly 3.5Gbit/s upload on Ubuntu Desktop 20.04.5.
But for some reason am having a hard time figuring out if there is a way to increase the download speed on Ubuntu server.
Thanks in advance