← Back to context

Comment by nutjob2

5 hours ago

Somewhat off-topic: has anyone implemented USB C based networking?

So for instance you have two or more machines that have USB 4 ports at 20 to 80 Gbps and you plug in the appropriate USB C cables to connect them.

What do you need to make the connections appear as a (point to point) part of a regular TCP/IP network? Seems much cheaper than Ethernet if you already have the ports.

Yup, totally doable. Of course, it’s a point to point link so if you want to build a whole cluster that way then you’ll need a lot of usb-c ports or you’ll need to make more of a mesh topology.

I believe MacOS supports it via the usual network control panel. I’ve used it for transferring data from an older laptop to a newer one. The cable is more expensive than fiber, last time I checked.

  • I have also used a USB 4 cable to network two MacBook Pros to one another and can confirm that it was very simple to connect and it was fast as heck. The USB 4 cable I used was rated for up to 40 Gbps.

I used to have a thunderbolt ring network for a ceph backend on my k8s cluster. On Linux load the thunderbolt_net kernel module and they show up the same as any other Ethernet interfaces. Just directly connect them and configure the network settings on each end using your normal tools.

Latency was an order of magnitude higher than twisted pair but the throughput was greater than 10Gbps and I didn’t have to spend on 10GbE capable servers and network equipment. I vaguely remember that they had to be proper Thunderbolt not just USB-C but that could have changed it’s been quite a while.

With USB 4, very strictly speaking: It's iffy. USB 4 doesn't require hosts to be able to switch roles and talk to other hosts. It can support this, but support is optional.

But for all certified Thunderbolt 4 and 5 ports, this kind of networking support is a requirement. (It is optional with Thunderbolt 3.)

The rest is up to the operating system.

Your so-called appropriate USB C cable is just two USB-C to Ethernet adapters plus an Ethernet cable. It’s very common on laptops without native Ethernet ports. But in my experience USB isn’t a very good protocol; it generally uses way more CPU than plain PCIe Ethernet. This is especially the case if the chipset is using ECM rather than NCM.