Subject: RE: Some comments regarding draft-ietf-ipngwg-default-addr-select-05.txt

From: "Richard Draves" <[email-masked]>
Date: Wed, 8 Aug 2001 23:20:56 -0700

> 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?

Yup, some unfinished editing there in the -05 version. Ignore the last
words.

> 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.

Actually the first couple examples in section 9.2 were supposed to
illustrate this scenario. The IPv6-capable host will presumably have
some IPv6 addresses, even though it is in an IPv4-only network (meaning
no IPv6 router available). For example, it will have a link-local IPv6
address on its lan interface and an IPv6 loopback address. So when a DNS
name resolves to two addresses, global IPv4 and global IPv6, the "prefer
matching scope" rule causes the IPv4 address to be sorted first.

It seems there are two problems with the phrase "no route" in Rule 1:
- RFC 2461 conceptual model doesn't have routes
- The RFC 2461 "assume destination is on-link" fallback - is this a
route or not?

When I wrote "no route", I was really thinking "if for whatever internal
error reason, the implementation can not convert the destination address
to a next-hop neighbor".

Perhaps it would be best to just remove the "no route" clause from Rule
1, and say that a destination D is considered unusable if Source(D) is
undefined or if the next-hop neighbor for D is known to be unreachable.

> 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).

Hmm. I guess I was thinking all uses of getaddrinfo() would want the
sorting, even IPv4 applications. In any case, I don't like the
AI_V4MAPPED suggestion - plenty of IPv6 applications will not use that
flag. It could be something like - if the caller specifies that only
IPv4 addresses are desired, then the sorting is not done. But if the
caller specifies IPv6 addresses or leaves the family unspecified, then
the sorting is done.

Rich
--------------------------------------------------------------------
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-masked]
--------------------------------------------------------------------

---

From: "marcelo" <[email-masked]>
Date: Mon, 13 Aug 2001 17:41:53 +0200

Questions and comments about the default address selection mechanisms:

1- About scope and deprecated addresses in source address selection:

Considering  the way Rule 2 and rule 3 are specified, is it possible that a
deprecated address is selected rather than a  non-deprecated with bigger
scope?
For example suppose that the destination address D has site local scope and
the outgoing interface has 2 addresses assigned: a site local address SA
which is deprecated and a global address SB which is not deprecated.
Applying rule 2 scope(SA)<scope(SB) and scope(SA)=scope(D) then rule 2
chooses SA.
Wouldn?t be better to choose SB in this case?

In order to do this an option could be to modify the  rules like this:
Rule 2: Avoid incompatible scopes:
If scope(SA)<scope(D) and scope(SD)<=scope(SB) the choose SB.
Similarly,  if scope(SB)<scope(D) and scope(SD)<=scope(SA) the choose SA
Rule 3: Avoid deprecated addresses
Rule 3,5: Prefer smaller scope.
If scope(SA)<scope(SB) prefer SA, similarly if scope(SB)<scope(SA) prefer SB

2- Final tie-breaker unspecified in source address selection.

If the 8 proposed rules fail, "some unspecified tie-breaker should be used".
In order to obtain  predictable behaviour (specially considering that this
is included in standard track), wouldn?t be interesting to specify a final
rule that always select an address. (i.e. the smallest address or something
like this)

marcelo