Solution for a temporary direct ethernet cable connection between Linux home server and Windows laptop

by Espinosa   Last Updated July 12, 2019 00:00 AM

What is the best solution for a temporary direct ethernet cable connection between Linux home server and Windows laptop.

Let's assume the that the Linux home server is headless, and is normally connected by ethernet cable to a router, from which it gets IP via dhcp.

Now, I need temporarily to unplug that ethernet cable and plug it into my Windows PC laptop. Let's say I need to measure ethernet speed with iperf between those two machines to prove that my LAN rooter is the bottleneck, the reason I am not getting those 1Gbps speeds both cards are capable of.

Option one: manual IP configuration. The most laborious; risky in breaking something in otherwise perfectly working system; and tricky with headless server.

Option one: set link-local on Linux server and rely on APIP (Automatic Private IP) on Windows side. APIP is automatically invoked on Windows. On Linux side it not automatic, sadly, but setting link-local is an easy-peasy change in Network Manager GUI (Wired Ethernet -> IPv4 tab -> Method: Link-Local). But with headless server, again, it's tricky.

Option three: APIP on Windows side and trying something similar on Linux - avahi-autoipd. I have never tried that, it's not on by default on my openSUSE. This can work well; when ethernet is plugged to router server would get IP from dhcp, if plugged to laptop, APIP/avahi-autoipd would kick in, and back again. All automatic, perfect solution for a headless server. Or am I too optimistic? Slight extra problem here, how to get IP of the headless server assuming auto-ip addresses are assigned randomly; I posted a separate question for his.

Would the third solution work as I imagined? Did I miss something?
Is there a better solution?

Related Questions

Updated April 04, 2017 09:00 AM

Updated May 07, 2017 19:00 PM

Updated May 04, 2017 20:00 PM

Updated December 06, 2018 11:00 AM

Updated February 04, 2018 16:00 PM