7 ms·
I would assume so as well, I'm not sure if all host operating systems act the same though. But you could probably just wait a couple of seconds and the interfac
by steve1977 17d ago
I would assume so as well, I'm not sure if all host operating systems act the same though. But you could probably just wait a couple of seconds and the interfaces would have assigned themselves link-local addresses.
- QuantumNomad_ 16d ago> I'm not sure if all host operating systems act the same though I have two USB-C Ethernet adapters laying around that I bought some time ago. I connected one of them to a Linux machine and the other to my MacBook Pro and experimented a little bit. All of the following commands and outputs are from the MacBook Pro. The USB-C Ethernet interface is en8. On the macOS side, I can see that a 169.254.xx.xxx/16 IPv4 address has been assigned by macOS as there is no DHCP running on the link, and it has an fe80::xxxx:xxxx:xxxx:xxxx%en8/64 IPv6 address assigned by macOS as well. (The x-es in the aforementioned IPv4 and IPv6 addresses were put there by me in this text. On the system they are decimal and hexadecimal digits in the IPv4 and IPv6 addresses respectively.) The first attempts, relating to ssh, maybe would not work on any system anyway? Not sure how the ff02 multicast prefix for link-local scope works exactly and what its limitations are. % ssh ff02::1%en8 ssh: connect to host ff02::1%en8 port 22: Address family not supported by protocol family % ssh -6 ff02::1%en8 ssh: connect to host ff02::1%en8 port 22: Address family not supported by protocol family % ssh -B en8 -6 ff02::1%en8 ssh: connect to host ff02::1%en8 port 22: Address family not supported by protocol family % ssh -B en8 -6 ff02::1 ssh: connect to host ff02::1 port 22: Address family not supported by protocol family Trying ping: % ping ff02::1%en8 ping: cannot resolve ff02::1%en8: Unknown host I then tried a couple more variations with ping similar to the variations I did with ssh, before moving on to ping6. Seems that the ping command on macOS is IPv4 only. I don't see any -6 flag for the ping command in the man page on macOS. But there is the ping6 command for IPv6, which I have used before (just not with ff02 addresses). Finally, ping6: % ping6 ff02::1%en8 PING6(56=40+8+8 bytes) fe80::xxxx:xxxx:xxxx:xxxx%en8 --> ff02::1%en8 16 bytes from fe80::xxxx:xxxx:xxxx:xxxx%en8, icmp_seq=0 hlim=64 time=10.893 ms 16 bytes from fe80::yyy:yyy:yyyy:yyyy%en8, icmp_seq=0 hlim=64 time=14.365 ms 16 bytes from fe80::xxxx:xxxx:xxxx:xxxx%en8, icmp_seq=1 hlim=64 time=0.511 ms 16 bytes from fe80::yyy:yyy:yyyy:yyyy%en8, icmp_seq=1 hlim=64 time=2.467 ms 16 bytes from fe80::xxxx:xxxx:xxxx:xxxx%en8, icmp_seq=2 hlim=64 time=0.440 ms 16 bytes from fe80::yyy:yyy:yyyy:yyyy%en8, icmp_seq=2 hlim=64 time=2.393 ms ^C --- ff02::1%en8 ping6 statistics --- 3 packets transmitted, 3 packets received, +3 duplicates, 0.0% packet loss round-trip min/avg/max/std-dev = 0.440/5.178/14.365/5.422 ms Worthy of note is that when I ping6 ff02::1%en8, I get responses from both side of the connection (the ones I substituted with fe80::xxxx:xxxx:xxxx:xxxx%en8 are the same IPv6 address that I see for the en8 interface in ifconfig output on my MacBook Pro, and the ones I substituted with fe80::yyy:yyy:yyyy:yyyy%en8 are the IPv6 address of the other end of the link-local connection). Attempting to ssh to the IPv6 address from the ping6 output, making sure to pick the one that is not the IPv6 address of the ethernet interface that is connected on the MacBook Pro side itself: ssh fe80::yyy:yyy:yyyy:yyyy%en8 Output of that I will omit for brevity, but it is the standard question about accepting the ssh fingerprint of the machine and letting me know that this fingerprint is previously known by another name, as I have previously ssh'd into that machine from this one but using the .local mDNS hostname rather than this fe80 IPv6 address. So it seems that having ping6 ff02::1%en8 up the sleeve is useful indeed on macOS too, as long as one knows to use ping6 and not just ping, and that attempting to ssh to ff02::1%en8 does not work directly from macOS at least not for me.
- steve1977 16d agoThis is all working as expected. You cannot ssh to a multicast address. More generally, you cannot set up a TCP connection to a multicast address. So that explains why your first ssh attempts failed. And as you noticed, ping on macOS is IPv4 only, hence the "Unknown host" error, because it actually tries to resolve "ff02::1%en8" as a host name, it doesn't even recognize it as an IPv6 address. You then ping6 the multicast address and get replies back from all nodes in the multicast group, which includes your MBP. You then ssh to the link-local unicast address fe80::something, which finally works.