(Too-wordy title: Macs connected with an Ethernet cable can't see each other - MacOS failing to set up 169.254 routing, AKA link-local address configuration. Why? How do I fix? Is it violating RFC 3927? Hint: One Mac has a normal, working Ethernet (over Wi-Fi) connection, which may make it a multi-homed host.)
I'm trying to communicate between two Macs over an Ethernet cable. This should "just work", I thought, but it does not appear that MacOS is automatically setting things up as it is supposed to.
Only after detecting there's a physical connection do the autoconf IP addresses get assigned (as shown by ifconfig en0
before vs after connection) so it's clear they CAN see each other at the physical level.
One of the Macs is (was) at the OS setup stage where it is looking for other computers on the network from which to migrate information. Sharing is enabled.
But they can't see each other at the OS level. E.g.
- Nothing to connect to shows up on the Mac in OS setup.
- Nothing shows after choosing Go...Network in the Finder.
- <I forget what else I tried.>
- No response to pings of the broadcast address. (
ping 169.254.255.255
) - There are no entries in the MAC address table (as shown by
arp -an
) for the other Mac even right after #5. - The appropriate routing table entries (as shown by
netstat -rn
don't exist)
It's failing to set up 169.254 routing, AKA link-local addressing so the Macs can communicate properly. In other words, it's failing to fully set up the en0 (TP Ethernet) interfaces so that link-local addressing works automatically.
Wondering what was going on, I looked to the documentation. I thought since it apparently followed RFC 3927 on Dynamic Configuration of IPv4 Link-Local Addresses, would "just work", but not so.
In particular, it is automatically assigning IPs to the devices, but it is NOT routing packets / setting up the routing table accordingly.
From the RFC:
Abstract
... This document describes how a host may automatically configure an interface with an IPv4 address within the 169.254/16 prefix that is valid for communication with other devices connected to the same physical (or logical) link.
Is MacOS violating RFC 3927? Why shouldn't two Macs connected over an Ethernet cable, each with automatically assigned 169.254/16 link-local addresses see each other?
This might be a fix; I haven't figured it out yet: sudo route -n add -net
192.168/16 169.254/16 169.254.14.233
. (That's the automatically self-assigned IP.). (Update: Won't know; too late and it had a typo.)