[ipv6hackers] IPv6 source address selection on Linux

Sander Smeenk ssmeenk at freshdot.net
Mon Jul 23 13:14:31 CEST 2012

Quoting Jim Small (jim.small at cdw.com):

> Sorry this isn't exactly what you wanted but hope it helps,

Thanks for your elaborate post. Karl Auer <kauer at biplane.com.au> also
sent me in the right direction (offlist). Aparently if you add the two
matching source and destination addresses with the same 'label' (ip
addrlabel) the system selects the matching pair.

It appears to work, as i see traffic leaving the system from the
ULA-address, but somehow the routing borks later on in the path.
I haven't had the time to look into that yet.

Quoting Karl Auer:
| I got it working!
| When I manually added the two new rules using the ip program, it
| worked fine.
|  sudo ip addrlabel add prefix $SRCADDR/128 label 99
|  sudo ip addrlabel add prefix $DSTADDR/128 label 99

This can also be achieved by adding the labels to /etc/gai.conf and
restarting your network (ifdown/ifup) or just plain rebooting.

Thanks Karl, Jim and all other who put effort in this mistery!!
More to follow on this if i have the time.

With regards,
| The world is so full of these wonderful things,
| i'm sure we should all be as happy as kings.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7  FBD6 F3A9 9442 20CC 6CD2

More information about the Ipv6hackers mailing list