For a week now I have been calling connect(…) to connect to a TCP server on a particular link local address as offered by the device I am connecting to. Today it refused to connect. I had been using a scope id of 0, but once I changed it to to the index of the network interface my device (5), it started working again.
I understand link local addresses are only relevant in a particular network, an is well described in Avoid specifying interface when using IPv6 address.
In Windows, my devices IP address is listed against every network interface, which I assume is causing a routing problem when I try call connect(…).
Why does it list the IP address of my device on every network interface? Only the specific interface it is connected to sees the neighbor discovery messages for that IP.
The IP address in question is fe80::280:e1ff:fe44:5566, my device is connected to only Ethernet (5).
netsh interface ipv6 show neighbors
Interface 10: Wi-Fi
Internet Address Physical Address Type
-------------------------------------------- ----------------- -----------
fe80::280:91ff:feb4:c8d1 Unreachable Unreachable
fe80::280:e1ff:fe44:5566 00-00-00-00-00-00 Unreachable
fe80::1cb6:b1cf:6b57:eaf0 00-00-00-00-00-00 Unreachable
fe80::2188:84a9:1a12:1aa6 00-00-00-00-00-00 Unreachable
fe80::2788:3174:4d1d:bf18 00-00-00-00-00-00 Unreachable
fe80::4b63:6c4f:29fa:3fa6 00-00-00-00-00-00 Unreachable
fe80::611b:4d41:3860:1310 00-00-00-00-00-00 Unreachable
fe80::a07f:9582:c2c:92ae 00-00-00-00-00-00 Unreachable
fe80::fdf7:9f9c:b6c7:9eb4 00-00-00-00-00-00 Unreachable
ff02::1 33-33-00-00-00-01 Permanent
ff02::2 33-33-00-00-00-02 Permanent
ff02::c 33-33-00-00-00-0c Permanent
ff02::16 33-33-00-00-00-16 Permanent
ff02::fb 33-33-00-00-00-fb Permanent
ff02::1:2 33-33-00-01-00-02 Permanent
ff02::1:3 33-33-00-01-00-03 Permanent
ff02::1:ff44:5566 33-33-ff-44-55-66 Permanent
ff02::1:ffb4:c8d1 33-33-ff-b4-c8-d1 Permanent
ff02::1:ffeb:7608 33-33-ff-eb-76-08 Permanent
Interface 1: Loopback Pseudo-Interface 1
Internet Address Physical Address Type
-------------------------------------------- ----------------- -----------
ff02::2 Permanent
ff02::c Permanent
ff02::16 Permanent
ff02::1:2 Permanent
ff02::1:ff44:5566 Permanent
ff02::1:ffd5:5751 Permanent
Interface 5: Ethernet
Internet Address Physical Address Type
-------------------------------------------- ----------------- -----------
fe80::280:e1ff:fe44:5566 Unreachable Unreachable
ff02::1 33-33-00-00-00-01 Permanent
ff02::2 33-33-00-00-00-02 Permanent
ff02::c 33-33-00-00-00-0c Permanent
ff02::16 33-33-00-00-00-16 Permanent
ff02::fb 33-33-00-00-00-fb Permanent
ff02::1:2 33-33-00-01-00-02 Permanent
ff02::1:3 33-33-00-01-00-03 Permanent
ff02::1:ff44:5566 33-33-ff-44-55-66 Permanent
ff02::1:ff8a:7d4e 33-33-ff-8a-7d-4e Permanent
Interface 20: Bluetooth Network Connection
Internet Address Physical Address Type
-------------------------------------------- ----------------- -----------
fe80::280:91ff:feb4:c8d1 00-00-00-00-00-00 Unreachable
fe80::280:e1ff:fe44:5566 00-00-00-00-00-00 Unreachable
fe80::1cb6:b1cf:6b57:eaf0 00-00-00-00-00-00 Unreachable
fe80::2188:84a9:1a12:1aa6 00-00-00-00-00-00 Unreachable
fe80::2788:3174:4d1d:bf18 00-00-00-00-00-00 Unreachable
fe80::4b63:6c4f:29fa:3fa6 00-00-00-00-00-00 Unreachable
fe80::611b:4d41:3860:1310 00-00-00-00-00-00 Unreachable
fe80::a07f:9582:c2c:92ae 00-00-00-00-00-00 Unreachable
fe80::fdf7:9f9c:b6c7:9eb4 00-00-00-00-00-00 Unreachable
ff02::2 33-33-00-00-00-02 Permanent
ff02::16 33-33-00-00-00-16 Permanent
ff02::1:2 33-33-00-01-00-02 Permanent
ff02::1:ff44:5566 33-33-ff-44-55-66 Permanent
ff02::1:ffd5:5751 33-33-ff-d5-57-51 Permanent
Interface 18: Local Area Connection* 3
Internet Address Physical Address Type
-------------------------------------------- ----------------- -----------
fe80::280:91ff:feb4:c8d1 00-00-00-00-00-00 Unreachable
fe80::280:e1ff:fe44:5566 00-00-00-00-00-00 Unreachable
fe80::1cb6:b1cf:6b57:eaf0 00-00-00-00-00-00 Unreachable
fe80::2188:84a9:1a12:1aa6 00-00-00-00-00-00 Unreachable
fe80::2788:3174:4d1d:bf18 00-00-00-00-00-00 Unreachable
fe80::4b63:6c4f:29fa:3fa6 00-00-00-00-00-00 Unreachable
fe80::611b:4d41:3860:1310 00-00-00-00-00-00 Unreachable
fe80::a07f:9582:c2c:92ae 00-00-00-00-00-00 Unreachable
fe80::fdf7:9f9c:b6c7:9eb4 00-00-00-00-00-00 Unreachable
ff02::2 33-33-00-00-00-02 Permanent
ff02::16 33-33-00-00-00-16 Permanent
ff02::1:2 33-33-00-01-00-02 Permanent
ff02::1:ff44:5566 33-33-ff-44-55-66 Permanent
Interface 15: Local Area Connection* 4
Internet Address Physical Address Type
-------------------------------------------- ----------------- -----------
fe80::280:91ff:feb4:c8d1 00-00-00-00-00-00 Unreachable
fe80::280:e1ff:fe44:5566 00-00-00-00-00-00 Unreachable
ff02::2 33-33-00-00-00-02 Permanent
ff02::16 33-33-00-00-00-16 Permanent
ff02::1:2 33-33-00-01-00-02 Permanent
ff02::1:ff44:5566 33-33-ff-44-55-66 Permanent
Interface 55: vEthernet (WSL (Hyper-V firewall))
Internet Address Physical Address Type
-------------------------------------------- ----------------- -----------
fe80::280:91ff:feb4:c8d1 Unreachable Unreachable
fe80::280:e1ff:fe44:5566 Unreachable Unreachable
ff02::1 33-33-00-00-00-01 Permanent
ff02::2 33-33-00-00-00-02 Permanent
ff02::c 33-33-00-00-00-0c Permanent
ff02::16 33-33-00-00-00-16 Permanent
ff02::fb 33-33-00-00-00-fb Permanent
ff02::1:2 33-33-00-01-00-02 Permanent
ff02::1:ff44:5566 33-33-ff-44-55-66 Permanent
ff02::1:ffb4:c8d1 33-33-ff-b4-c8-d1 Permanent
ff02::1:fff6:1f93 33-33-ff-f6-1f-93 Permanent