Transfer files over an ethernet patch cable

30 points by robalex 16 hours ago on lobsters | 20 comments

macOS has been able to do this for decades without any configuration. The peers assign themselves distinct link-local IP addresses and discover each other by mDNS.

intelfx | 12 hours ago

Modern Linux does that as well, if you let it. NM will autoconfigure IPv6, and systemd-resolved will announce/resolve mDNS/LLMNR in full accordance with the former's marketing name (unless you ripped it all out in the name of being old-school and wrote an angry blog post about how systemd wants all your base to be belong to it, or something like that).

I use it all the time on my machines.

And where's the user-visible application layer? I can't open Nautilus on my desktop and see other machines.

intelfx | 8 hours ago

I can't open Nautilus on my desktop and see other machines.

You can, in fact.

Yes I can see devices which advertise themselves as FTP, WebDAV, SFTP, etc. But what causes the other machine to advertise itself?

intelfx | 7 hours ago

But what causes the other machine to advertise itself?

One of the two: either the service registers itself with systemd-resolved, or you(r distro) installs a systemd.dnssd(5) service definition for each service you wish to advertise.

And which distros install a systemd.dnssd service definition for these services?

intelfx | 6 hours ago

No idea; ask your distro if it doesn't.

That's kind of the problem. When people say "macOS does this automatically without any configuration", they don't mean "macOS allows you to register a system service which does this and it's hypothetically possible for a macOS distribution vendor to do that automatically". The two are very different.

intelfx | 5 hours ago

First, when I said "no idea", I meant to say that I genuinely have no idea — I don't use any of the well-integrated distros, so I don't know what's happening over there. That was not an invitation to treat my response as "none". If I was to guess, I'd have guessed Fedora does it.

Second, that was precisely the issue I alluded to in my first response. When vocal users reject "newfangled stuff" en masse, distributors will naturally be loath to expend energy on building integrations around said newfangled stuff. If there is a problem, it's not a technology problem, but a community problem.

The two are very different.

Of course, the two are different: it is well known that macOS is a product, and desktop Linux is a community. We are on a discussion forum for technologists, so I believe I'm allowed to point out that the underlying technologies exist and work very well. Not sure what exactly you are trying to prove me wrong about.

mcpherrinm | 12 hours ago

In Linux 7.2, there’s a new USB4STREAM protocol in the thunderbolt_stream driver, which will give you a /dev/tbstreamX device so you can also just cat on both ends of two devices connected by a USB4 or thunderbolt cable.

There's also thunderbolt_net if you just want regular networking, too. I think that should work cross-platform, even.

that is super cool to know! Can't wait to play with that next time I'm hooking two Thunderbolt machines together.

sammko | 15 hours ago

I mean yes, but this seems a decade or two late to the party. Many modern devices have Thunderbolt and can transfer 40 Gbps (or 80).

I have only single cable and peripheral pair that actually reaches gigabit speeds, which has an MSRP of ~2300$.

This is absolutely overblown. A TB4 nvme enclosure can be had for under $100.

patryk | 14 hours ago

If someone has old-ish PCIe 3.0 NVMe that can saturate 10Gbps USB it still can be faster, even with enclosure for like $20 (even taking into account halving the bandwidth by using intermediate medium)

landon | 8 hours ago

I have a USBC ethernet adapter that does it.

landon | 8 hours ago

Windows has been able to do this for decades without any configuration. The peers assign themselves distinct link local IP addresses and discover each other by mDNS (or whatever vista used to do the same thing if tou want decades > 1)

snazz | 8 hours ago

Has anyone here used peer to peer or ad-hoc Wi-Fi for something similar with good results? I’d imagine it would also work well (assuming the two computers are close).

patryk | 7 hours ago

IIRC AirDrop works this way, so dozens of Apple users every single day!

Helithumper | 7 hours ago

Significantly more than dozens.

doug-moen | 2 hours ago

This is how I install OpenWRT on a new router. I don't want the router to connect to my LAN or the internet until I've installed a trustworthy operating system. So, I download the OpenWRT images to my laptop, disable wifi on the laptop, and connect the two devices using ethernet.