I am trying to use link scope IPv6 addresses to permit two machines to connect using IPv6, but I cannot figure out how to do it without specifying the interface to use on every connection. Here is an example ping:
[root@ppatel-brn1 ~]# ping6 -c 3 fe80::204:75ff:feb6:2994
connect: Invalid argument
[root@ppatel-brn1 ~]# ping6 -c 3 -I eth0 fe80::204:75ff:feb6:2994
PING fe80::204:75ff:feb6:2994(fe80::204:75ff:feb6:2994) from fe80::214:22ff:febd:7c1f eth0: 56 data bytes
64 bytes from fe80::204:75ff:feb6:2994: icmp_seq=0 ttl=64 time=0.836 ms
64 bytes from fe80::204:75ff:feb6:2994: icmp_seq=1 ttl=64 time=0.286 ms
64 bytes from fe80::204:75ff:feb6:2994: icmp_seq=2 ttl=64 time=0.280 ms
--- fe80::204:75ff:feb6:2994 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.280/0.467/0.836/0.261 ms, pipe 2
It makes sense to me that the OS doesn't know that fe80::204:75ff:feb6:2994 is out eth0 because I have two interfaces, but if I add a route, I get the same thing:
[root@ppatel-brn1 ~]# ip -6 route add fe80::204:75ff:feb6:2994 dev eth0
[root@ppatel-brn1 ~]# ping6 -c 3 fe80::204:75ff:feb6:2994
connect: Invalid argument
I have seen network traces of Windows-based machines happily transmitting to and from link scope addresses, but it seems I cannot do this in Linux. What am I doing wrong?