ipv6 source address selection
otroan at employees.org
Sun Oct 20 00:55:09 CEST 2013
> I'm trying to influence my source address selection. First I thought I'd figure out how it works by default.
> I have a /48. Let's call it 2001:db8:1::/48
> I created three /64s on the same LAN with A-bit set so clients would do SLAAC within these:
> Then I set up loopback addresses on my router:
> Then I tried pinging each loopback address from a host which has 2 addresses out of each /64. It now picked a source address within the same /56. I consistently both on a Ubuntu 13.04 and OSX 10.8.5 machine get the same behaviour.
> So above means that pinging 2001:db8:1:1fff::1 it would use the :1000: address, and pinging :2fff::1 would use the :2000::/64 address.
> If I ping outside my /48 it will consistently use the last created address (I tried adding a 4th lan, 8000, and it then uses that one), which I perfectly understand.
> When I ping :5000: and so on, it will sometimes use the :0000: address and not the :8000: that is used for the rest of global traffic.
> I have nothing /56 or /48 magic in routing table or "ip addrlabel list", but it still seems to be something special when it comes to the same /48 as the machine has addresses in.
> Any help understanding what is going on is appreciated.
wouldn't this be RFC6724:
Rule 8: Use longest matching prefix.
If CommonPrefixLen(SA, D) > CommonPrefixLen(SB, D), then prefer SA.
Similarly, if CommonPrefixLen(SB, D) > CommonPrefixLen(SA, D), then
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.cluenet.de/pipermail/ipv6-ops/attachments/20131020/aa22d62d/attachment.bin
More information about the ipv6-ops