Transfer files over an Ethernet patch cable

Connecting two computers directly with an Ethernet cable and a few IP commands can transfer files at speeds up to 900 Mbit/s, far faster than USB or cloud storage. This blog post explains the simple setup, compares it to alternatives like cloud storage, WiFi, and removable drives, and highlights Ethernet's reliability and simplicity for point-to-point transfers.

Ethernet is the only common connection that can reliably reach gigabit speeds between two random devices using inexpensive cables.
  1. rmunn

    That used to require a crossover cable; I've done precisely that (with a crossover cable) back before https://en.wikipedia.org/wiki/Medium-dependent_interface#Aut... became widespread. With a straight-through cable, you'd be connecting the Transmit (TX) pin of one adapter to the TX pin of the other one, and the Receive (RX) pin of one to the RX pin of the other — and neither device would "hear" the messages the other one was sending. A crossover cable flipped those wires, so each device's TX pin was connected to the RX pin on the other end, and both devices could "hear" each other.

    But with auto MDI-X, each device would notice "hey, I'm sending but not receiving anything," and would try flipping its Transmit and Receive functions around (transmitting on the RX pin and receiving on the TX pin). Since each device waited a random period before doing that, it was very unlikely (nigh-impossible) that they would both flip at the exact same moment. And if they did, the second interval would most likely not be identical either.

    I'm simplifying a bit in the explanation above, but that's the broad strokes. And that's how my carefully-labeled crossover cables started gathering dust. (And then I realized "hey wait, I can just use these as normal cables now", and pulled them back out of storage and mixed them with my normal patch cables).

  2. steve1977

    People discovering that network cables can be used to network things. And then calling it a "trick" (I'm surprised it's not a "hack" actually).

  3. yjftsjthsd-h

    I am 95% confident you don't actually need to assign IPs. Do this:

    # ping all link-local devices on an interface:

    ping ff02::1%eth0

    And then do your socat/rsync/whatever to the only IP that responds.

  4. yitchelle

    This remind myself the good old 8bit days of using a cross-over RS232 cable to send a file from one computer to another. even at 30bps, it was much more reliable than write my data to a cassette tape on one computer and then reading on the other.

  5. sgt

    Even easier on macOS.

    Something like this should work:

    ifconfig enX inet6 fd42:dead:beef::1 prefixlen 48

    No ned to bring it up as it should already be up. enX should be your USB/thunderbolt ethernet adapter, e.g. en6.

    Then you can go ahead and transfer with socat to your other machine, even if it's a Linux machine. I tend to use nc but socat will definitely be faster.

    Why the deadbeef network one might wonder? It's private space so won't conflict with public addresses.

    That being said though, in 99% cases of big files I'll just airdrop the files!

  6. 3r7j6qzi9jvnve

    tbstream looks fun, but hard to use for the casual user -- not sure if it'll get simpler but I don't think I'll remember messing in configfs just to transfer a file:

    https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thun...

  7. SillyUsername

    You can also pipe it through zstd on the fly, for data that compresses well you'll often see 1.5 to 3× the raw throughput, so a gigabit link can effectively move 165–330MB/s.

    Receiver:

    socat -u TCP6-LISTEN:1234,reuseaddr STDOUT | zstd -d -c | tar -xpf - -C /destination

    Sender:

    tar -C /source -cf - directory | zstd -T0 -6 -c | socat -u STDIN 'TCP6:[fd42:dead:beef::2]:1234'

    -T0 uses all cores. Bump the level above -6 for more compression, drop it for more speed, but if your CPU can't keep up, high levels will actually slow it down. Already compressed data won't see much benefit.

  8. awruko

    I literally had to cross over the cable once. It was some sort of demo and the cross over cable was missing. The local computer stores didn’t have one and under the time pressure … I have used the pocket knife and convert the cable. It was before 2000 so the speed was limited to 10/100 Mbit - ifconfig did’t report errors and demo went smooth.

More from this day

2026-08-31