I've been discussing destination address selection with some people,
in particular how getaddrinfo() ideally should sort IPv4 addresses
in the case that a host is placed in an IPv4-only network, and how
this works with the algorithm in the draft.

The first destination rule is:

   Rule 1: Avoid unusable destinations.
   If there is no route to DB or the current next-hop neighbor for DB
   is known to be unreachable or if Source(DB) is undefined, then sort
   DA before DB. Similarly, if there is no route to DA or the current
   next-hop neighbor for DA is known to be unreachable or if Source(DA)
   is undefined, then sort DB before DA.
   For IPv6 destination addresses, the

First of all, the paragraph actually ends like this in the draft. Is
something missing, or should the last words be removed?

My first thought was that this rule for an IPv6 host in an IPv4-only
network with no known IPv6 routers would be enough to have IPv4
addresses sorted before IPv6 addresses. There was however some
confusion in our discussion because some implementations have in this
case an on-link default route, which means you actually have a route
for all IPv6 addresses. I think this route should be ignored, and
maybe it should be made clear in the draft. This on-link default route
is just a way of implementing the following part of the conceptual
sending algorithm in RFC 2460:

   Next-hop determination for a given unicast destination operates as
   follows.  The sender performs a longest prefix match against the
   Prefix List to determine whether the packet's destination is on- or
   off-link.  If the destination is on-link, the next-hop address is the
   same as the packet's destination address.  Otherwise, the sender
   selects a router from the Default Router List (following the rules
   described in Section 6.3.6).  If the Default Router List is empty,
   the sender assumes that the destination is on-link.

That's how I see it anyway, I would like comments on this.

Another issue that came up:

It seems reasonable that IPv6 applications use this algorithm while
IPv4 applications that don't care about IPv6 do not. Or does anyone
think that we actually should use this algorithm then as well;
preferring RFC 1918 destination for 1918 source etc? One way of doing
this might be to use the algorithm in getaddrinfo() if AI_V4MAPPED is
set, but leave the addresses unsorted otherwise (also for AI_ALL).

Stig
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to