I want to establish a TCP/IP link between two Linux machines that have several USB 2.0 ports as the only connection options. Since both host and slave ports are available, I can connect them via a simple USB cable. What are the possibilities to forward TCP/IP over that cable and which one should I use to achieve highest bandwidth?

So far I've tried ADB (Android Debug Bridge) forwarding, but the throughput is poor -- only 30-40Mbps. I think that it should be possible to achieve at least 150-200Mbps using a specialized driver -- USB hard drives occasionally move files at 240-280Mbps out of the 480 theoretically available.

  • 1
    You could get two USB network cards (you can get gigabit ones, but they won't max out at their full speed) and just use the normal networking stack..? May 10 '13 at 3:05
  • They cost more and add additional overhead.
    – jons34yp
    May 10 '13 at 3:12
  • 1
    Well, you didn't mention anything in your question about budget requirements, and they might be overhead but it's going to be faster than 40Mbps. May 10 '13 at 3:28
  • What do you mean both master and slave ports are available? PCs only have master ports.
    – psusi
    May 10 '13 at 3:55
  • 1
    @MarkHenderson - "get two USB network cards" - it's not (correctly) called a "card" when it's no longer a naked PCB (printed circuit board). When it's encased, then it's a module or an adapter. Otherwise I agree, a pair of USB-to-Ethernet adapters is the most straightforward (and maybe the "best") solution. Unless "best" only means "fastest".
    – sawdust
    May 10 '13 at 7:28

Ethernet over USB drivers are included into Linux. The relevant host-size drivers are CDC_ETHER and RNDIS. Their slave-size counterparts (that essentially emulate an USB-Ethernet bridge in software) are USB_ETH, USB_ETH_RNDIS. USB_G_ANDROID also supports RNDIS protocol, which is great in my case, since the devices in question use Android kernel, so the driver is enabled by default.

The measured bandwidth of the USB bridge using the USB_G_ANDROID driver is ~130Mbps from host to slave and ~90Mbps the other way round.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.