usbnet and Ethernet over USB

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
User avatar
catweazel
Level 19
Level 19
Posts: 9252
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

usbnet and Ethernet over USB

Post by catweazel » Mon Aug 26, 2019 3:11 am

There is support in the kernel for sending Ethernet packets over a USB cable (usbnet driver) but the problem is finding the right cable. The alleged "data transfer" cables on fleabay simply don't work. You need one of these: https://plugable.com/products/usb3-tran/, or any other transfer cable that has the Prolific PL-27A1 chipset. Linux allows the USB connection to be treated just the same as any other other block device.

Plug the unit into a USB 3.0 port on each machine and simply set up a network connection with an IP address in the connection manager. 220MB/s SMOKIN!

I run hardware RAID 5 sets so the 220MB/s reflects the speed of the disks, not the theoretical limit of the USB 3.0 interface of around 500MB/s.

You may need to use ifconfig to get the interface name before setting up the NM connection, and perhaps lsmod | grep usbnet to make sure the usbnet driver has been loaded. It really is that simple. More than double 100MB/s standard NIC speed and a tiny fraction of the cost to implement a 10Gb/s setup.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
catweazel
Level 19
Level 19
Posts: 9252
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: usbnet and Ethernet over USB

Post by catweazel » Thu Aug 29, 2019 5:01 am

Follow-up: A better solution for about the same price, plus the USB solution has been a bit flaky with the network manager getting confused about what was connected to what, and a standard ethernet interface causing the ethernet over usb link to drop on occasions. I've ripped the USB link out and put in two new 2.5Gb/s network cards.

I grabbed two of these: https://www.amazon.com/dp/B07RF4SZ8R?re ... E_304_dt_1

2.5 Gigabit Ethernet PCI Express PCI-E Network Controller Card and a cat6 cable. I'm now able to transfer large amounts of data between two machines at 285MiB/s SMOKIN!

There are a few caveats though. First, the card uses the r8125 chipset and the Realtek linux drivers only work up to Ubuntu kernel 4.15, for now. In order to install the driver with the least amount of pain, I added the System76 ppa - it has the r8125-dkms driver. Once the driver was installed, I deleted the ppa. Whatever you do, don't update your system while connected to this ppa, and do sudo apt update after removing it. The cable must be standard cat6 to link two NICs together without a purpose-built crossover cable.

So, plug the NICs into your machines and run a cat6 cable between them. Fire up the network manager and add the NICs with a custom IP address. Any IP address will do but to save any grief, you should use a different net, for example, if your network uses 192.168.1.x then set the 2.5Gb/s card's IP to, say, 192.168.10.x, and if you use 192.168.20.x, set the IP to 192.168.2.x. This prevents your network getting confused about where to route your traffic.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

Post Reply

Return to “Tutorials”