I have two Raspberry Pis (running the 2016-27-5 Raspbian) and i'm trying to set them up to use IPv6 ULA addresses for communications restricted inside my LAN.
Everything is fine but one very important detail: if i connect from one to the other, using the ULA (unique local address) and i print the source address at the destination, the "Global" one is shown. So somehow that is being selected as the source address.
I have read these two guides and tried various things to no avail:
Everything inside /etc/gai.conf
is commented.
I'd consider removing the Global
address completely too, if only i knew how. I mean preventing the system from getting one in the first place, removing it afterwards is not a viable solution.
Removing the eth0:1
stanza and instead directly assigning the ULA
to eth0 with ifconfig eth0 inet6 add fc00::6666/64
works. Perhaps this is because the source address selection algorithm is now correctly using the smallest scope available. It seems that using an alias interface somehow screws up the source address selection algorithm. Perhaps it can be solved using route -6
?
/etc/network/interfaces
<--- IPv4 ellipsized --->
auto eth0:1
iface eth0:1 inet6 static
address fc00::6666
netmask 64
autoconf 1
Current prefixes and routes:
# ip addrlabel list
prefix ::1/128 label 0
prefix ::/96 label 3
prefix ::ffff:0.0.0.0/96 label 4
prefix 2001::/32 label 6
prefix 2001:10::/28 label 7
prefix 3ffe::/16 label 12
prefix 2002::/16 label 2
prefix fec0::/10 label 11
prefix fc00::/7 label 5
prefix ::/0 label 1
# route -6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
::1/128 :: U 256 0 0 lo
2001:760:XXXX:XXXX::/64 :: U 202 0 0 eth0
fc00::/64 :: U 256 0 0 eth0
fe80::/64 :: U 256 0 0 eth0
::/0 fe80::210:WWWW:WWWW:WWWW UG 202 1 8 eth0
::/0 :: !n -1 1 9 lo
::1/128 :: Un 0 2 2 lo
2001:760:YYYY:YYYY:YYYY:YYYY:YYYY:YYYY/128 :: Un 0 1 0 lo
fc00::6666/128 :: Un 0 1 0 lo
fe80::ba27:ZZZZ:ZZZZ:ZZZZ/128 :: Un 0 2 2 lo
ff00::/8 :: U 256 1 35 eth0
::/0 :: !n -1 1 9 lo