0

I am trying to connect 2 PCs directly with ethernet cable. One running Linux, acting as home server and it's headless, the other is a normal Windows laptop. Lets assume that both run some kind of IP auto-configuration; on Windows APIPA (Automatic Private IP Addressing), on Linux assume something like avahi-autoipd. Let's assume that that everything work correctly. APIPA, to my best knowledge, assigns random IP from 169.254.x.x range; I assume that avahi-autoipd does the same.

Question is: how can I get the IP address of the opposite node?

Lets assume that the opposite node, the Linux box, is headless so I cannot simply go there and read it there. Also it has no other network or other communication interface so I cannot, say, ssh there by the side channel and read it.

migrated from serverfault.com Jul 12 at 5:25

This question came from our site for system and network administrators.

  • IP scanner is one option. But the range is quite wide. I am trying it right now and it take ages ..like hours. Is there a better way? – Espinosa Jul 11 at 22:55
  • Could IPv6 somewhat help? – Espinosa Jul 11 at 22:59
  • If you're feeling lucky, you could try pinging the broadcast address of the 256 /24s that make up 169.254.0.0/16. Some IP implementations respond to broadcast pings, others don't. Ping the first one a few times, then either note the replies (if any) or check your ARP table (if not). Even an implementation that doesn't respond to pings has to respond to an ARP request. If no joy, then move on and ping the broadcast address of the next /24. This may or may not work, but you might get a result faster than a brute-force scan of the entire /16. – Jim L. Jul 11 at 23:23
  • Hi @JimL That sounds interesting. Could you make it into a proper post? How the ping command would exactly look? How to check ARP table? Ideally using Windows tools but I can dual-boot to Linux too. – Espinosa Jul 11 at 23:43

Your Answer

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

Browse other questions tagged or ask your own question.