IPv6 and IPv4 resolver preferences

Pekka Savola pekkas at netcore.fi
Fri Sep 17 05:14:36 UTC 2004


On Thu, 16 Sep 2004, Felipe Alfaro Solana wrote:
> What will happen when both 
> IPv4 and IPv6 addresses have different scopes (for example, the IPv4 
> address is private (e.g. 192.168.0.0/24), but the IPv6 is a global 
> address (e.g. a 2000::/64)?
> 
> Mac OS X seems to always prefer IPv6 addresses over IPv4 addresses, 
> even when the scope of the IPv4 address is lower or nearer wrt the IPv6 
> address (i.e. site-local or private IPv4 vs a global IPv6). However, FC 
> seems to implement the previous valid algorithm that took into account 
> the scopes of both the IPv4 and IPv6 addresses when sorting the answer 
> returned by the resolver.

See RFC 3484, glibc should be implementation destination address
selection (not sure if it's actually done), and the kernel is doing
source address selection.

This depends on what kind of source and destination address candidates
you have.  In short, if matching scope is found (e.g., global v6
source, global v6 destination, or private v4 address source/dest),
that's preferable.  But if the scopes don't match, it's typically down
to "precedence" (v6 is better than v4 by default) or smallest scope.

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings





More information about the fedora-devel-list mailing list