Re: [sipcore] Suresh Krishnan's Discuss on draft-ietf-sipcore-dns-dual-stack-07: (with DISCUSS)

worley@ariadne.com (Dale R. Worley) Fri, 19 August 2016 20:30 UTC

Return-Path: <worley@alum.mit.edu>
X-Original-To: sipcore@ietfa.amsl.com
Delivered-To: sipcore@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 382CC12D82F for <sipcore@ietfa.amsl.com>; Fri, 19 Aug 2016 13:30:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.934
X-Spam-Level:
X-Spam-Status: No, score=-1.934 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_SOFTFAIL=0.665] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8RGNz7xX7sbr for <sipcore@ietfa.amsl.com>; Fri, 19 Aug 2016 13:30:28 -0700 (PDT)
Received: from resqmta-po-10v.sys.comcast.net (resqmta-po-10v.sys.comcast.net [IPv6:2001:558:fe16:19:96:114:154:169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7F5F312D7DB for <sipcore@ietf.org>; Fri, 19 Aug 2016 13:30:28 -0700 (PDT)
Received: from resomta-po-11v.sys.comcast.net ([96.114.154.235]) by resqmta-po-10v.sys.comcast.net with SMTP id aqQVbrNj4HqolaqQtbRF8G; Fri, 19 Aug 2016 20:30:27 +0000
Received: from hobgoblin.ariadne.com ([73.100.16.189]) by resomta-po-11v.sys.comcast.net with SMTP id aqQrbluHQctRBaqQsbgzPa; Fri, 19 Aug 2016 20:30:27 +0000
Received: from hobgoblin.ariadne.com (hobgoblin.ariadne.com [127.0.0.1]) by hobgoblin.ariadne.com (8.14.7/8.14.7) with ESMTP id u7JKUOd8022173; Fri, 19 Aug 2016 16:30:24 -0400
Received: (from worley@localhost) by hobgoblin.ariadne.com (8.14.7/8.14.7/Submit) id u7JKUO57022169; Fri, 19 Aug 2016 16:30:24 -0400
X-Authentication-Warning: hobgoblin.ariadne.com: worley set sender to worley@alum.mit.edu using -f
From: worley@ariadne.com
To: Suresh Krishnan <suresh.krishnan@ericsson.com>
In-Reply-To: <147147110646.23797.16205066964281684411.idtracker@ietfa.amsl.com> (suresh.krishnan@ericsson.com)
Sender: worley@ariadne.com
Date: Fri, 19 Aug 2016 16:30:24 -0400
Message-ID: <87k2fc7b8f.fsf@hobgoblin.ariadne.com>
X-CMAE-Envelope: MS4wfP0f/Pqp4gkuN6O3jw9PZ/8hKJkfZS6/tOrJw5KxgZs62+axVbEPjxSY5razV8xU8eIVYcqZjctpdwjAR2zBElrNlzHkF8tSwhOswO/cnNyc6rhvLebj SUlKji/m5+AWh7736QB+JJMjEQHeiY3GZtGa4XQ1j3OitKF2YnhxTnRMhpyCgsnmELyHcTbI7KSXOhGN87pJ4fQpDDhc+3XKBSQCxR65jxGXqp13UhBhhlMo U7A61rXjNqPFz5I0bkXgG6ifESy0tFZveweY52Mx4u37rLI78l0YaDE97hUewhlrsE6dzngvcPLnP1yNOvD7g5Gyja1pOdzvDdrBs6f5ZEnUFZWQduUruIqN 9NNux5/I
Archived-At: <https://mailarchive.ietf.org/arch/msg/sipcore/ap3rl0JXB5cJG6p5KQsQv3pmdms>
Cc: sipcore@ietf.org, draft-ietf-sipcore-dns-dual-stack@ietf.org, iesg@ietf.org, sipcore-chairs@ietf.org
Subject: Re: [sipcore] Suresh Krishnan's Discuss on draft-ietf-sipcore-dns-dual-stack-07: (with DISCUSS)
X-BeenThere: sipcore@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: SIP Core Working Group <sipcore.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sipcore>, <mailto:sipcore-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sipcore/>
List-Post: <mailto:sipcore@ietf.org>
List-Help: <mailto:sipcore-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sipcore>, <mailto:sipcore-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Aug 2016 20:30:30 -0000

"Suresh Krishnan" <suresh.krishnan@ericsson.com> writes:
> * Section 3.1
>
> It is not clear to me what exactly the normative addendum is requiring
> the client to do as regards to the DNS query while implementing "The
> dual-stack client SHOULD look up all address records". Does this mean
> that the client should do a AAAA (28) query followed by (or in parallel
> or preceded ) for a A (1) query? I think it would be good to clarify the
> types and ordering/concurrency of the queries.

Given that the responses to DNS queries do not depend on the order in
which they are done, it seems to me that the only necessity is to
specify that the client must do both A and AAAA queries.

In regard to the specific record types, one of our goals was that the
wording should be robust to the possibility of additional address
families being created.  Thus we used the wording

      The dual-stack client SHOULD look up all address records [...] for
      all address family(ies) that it supports [...] for the domain name
      and add the resulting addresses to the list of IP addresses to be
      contacted.

Assuming that the client supports exactly IPv4 and IPv6, the queries to
obtain address records for those families are A and AAAA.  I don't see
that the text can be interpreted in a different way.

> * Section 4
>
> I am a bit puzzled by the merging of the address lists from two separate
> DNS queries in relation to RFC6724. This is how I see the destination
> address selection in RFC6724. The application ends up calling some kind
> of name resolution API (something like getaddrinfo()) with a
> hostname/FQDN (say sip-1.example.com) and this results in a set of
> addresses being returned. The destination address selection algorithm
> specified in Section 6 of RFC6724 then orders these addresses and picks
> one. I am not seeing how the second FQDN and its associated set of
> addresses become involved in the RFC6724 process. Is this something that
> you are adding on top of RFC6724? Please clarify.

One way of looking at it is that the full process of resolving the
server's address is the process for SRV records (RFC 2782) on top of the
destination address selection process (RFC 6724).  You've identified
that correctly.

The full process is fairly complicated, and the full documentation
involves the interaction of RFC 3263, RFC 2782, and RFC 6724.  But
restricting our attention to the case in question:

- The SRV records for domain name in the destination SIP URL are looked
  up.  (RFC 3263)

- Depending on the priority and weight fields (and the randomization
  implied by them!), the "target" domain names of the SRV records are
  listed in a particular order.  (RFC 2782)

The case in question is when there are more than one SRV records for the
destination domain name, and hence more than one target domain name.

- Each of those target domain names is expanded into a group of IPv4 and
  IPv6 addresses by looking up the A and AAAA records for the name.  Each
  group is sorted by the destination selection algorithm.  (This can be
  accomplished by calling getaddrinfo() on the target domain name.)
  (RFC 6724)

- The sorted groups of addresses for the target domain names are
  concatenated in the order of the target domain names.

The crucial point here is that the destination selection reordering is
only within the groups that result from the target domain names of the
SRVs -- The whole algorithm is a two-field sort with the "major" sort
being done by the SRV algorithm and the "minor" sort being done by
destination selection.

The original RFC 3263 specification describes the first two steps, but
presumes that the third step does not explicitly sort the addresses that
are obtained for the target domain name.  As a general rule, people who
have digested the rules of RFC 3263 agree that the "naturally correct"
way to incorporate destination selection (now that it exists for IPv6)
is to expand the third step to include that sortation -- and,
critically, that destination selection cannot reorder two addresses
between groups that derive from different target domain names.

The purpose of section 4 is to make that understanding normative.

Now, comparing what I have written here with the text in section 4, I
see that section 4 does not make explicit the ordered list of target
domain names from the SRV records.  And I can see that if the reader is
not thoroughly familiar with RFC 3263, that makes the overall process
significantly less clear, because it doesn't make step 2 above explicit.

I've updated the draft -08 to show the list of target domain names.
You can see the difference in
https://www.ietf.org/rfcdiff?url1=draft-ietf-sipcore-dns-dual-stack-07&url2=http://svn.resiprocate.org/rep/ietf-drafts/worley/draft-ietf-sipcore-dns-dual-stack-08.txt
and the entire current draft in
http://svn.resiprocate.org/rep/ietf-drafts/worley/draft-ietf-sipcore-dns-dual-stack-08.{txt,html}

Dale