Re: [dhcwg] Comments on draft-troan-dhc-dhcpv6-stateful-issues-00

"Bernie Volz (volz)" <volz@cisco.com> Fri, 25 May 2012 10:45 UTC

Return-Path: <volz@cisco.com>
X-Original-To: dhcwg@ietfa.amsl.com
Delivered-To: dhcwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C51A521F85D6 for <dhcwg@ietfa.amsl.com>; Fri, 25 May 2012 03:45:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.499
X-Spam-Level:
X-Spam-Status: No, score=-10.499 tagged_above=-999 required=5 tests=[AWL=0.100, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N+HMJxxB4EtD for <dhcwg@ietfa.amsl.com>; Fri, 25 May 2012 03:45:22 -0700 (PDT)
Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) by ietfa.amsl.com (Postfix) with ESMTP id A037921F84E7 for <dhcwg@ietf.org>; Fri, 25 May 2012 03:45:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=volz@cisco.com; l=9006; q=dns/txt; s=iport; t=1337942722; x=1339152322; h=mime-version:content-transfer-encoding:subject:date: message-id:in-reply-to:references:from:to:cc; bh=dW8p0m5FWcEiNgQ8MVrpc5nwTt6guf9k89VytjybZwA=; b=WaHA0wO0R396T36HqrMid4dTCx8YWqZZw7sbN/+K8WMwmGZx7laedpKS 4ZAblcmhaTlI61Jk9uuv6yS5PYcoeinIZeMt6gOulP48UpIT+nBtnjPNG AdrhXIP0ECJdJd26uTXJN33lKdV4ZZEuMdZKNBDP3qR6ZuJXyaCPrbDs7 U=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EALFhv0+tJXG8/2dsb2JhbABBA7UjgQeCFQEBAQMBEgEdCj8FBwQCAQgHCgQBAQEKBhcBBgFFCQgBAQQTCBMHh2YFC5tAn3WLAYIrgjtgA4g/jWiMfYFkgn4
X-IronPort-AV: E=Sophos;i="4.75,655,1330905600"; d="scan'208";a="86634071"
Received: from rcdn-core2-1.cisco.com ([173.37.113.188]) by rcdn-iport-7.cisco.com with ESMTP; 25 May 2012 10:45:22 +0000
Received: from xbh-rcd-201.cisco.com (xbh-rcd-201.cisco.com [72.163.62.200]) by rcdn-core2-1.cisco.com (8.14.5/8.14.5) with ESMTP id q4PAjMHF017646; Fri, 25 May 2012 10:45:22 GMT
Received: from xmb-rcd-101.cisco.com ([72.163.62.143]) by xbh-rcd-201.cisco.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 25 May 2012 05:45:22 -0500
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-MimeOLE: Produced By Microsoft Exchange V6.5
Date: Fri, 25 May 2012 05:45:20 -0500
Message-ID: <D9B5773329187548A0189ED6503667890C7B58E1@XMB-RCD-101.cisco.com>
In-Reply-To: <20120525063747.GD20816@shell-too.nominum.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [dhcwg] Comments on draft-troan-dhc-dhcpv6-stateful-issues-00
Thread-Index: Ac06QOfpB+YCOuC4SFifU+LuLN2whwAIIOBA
References: <D9B5773329187548A0189ED6503667890C7B57AC@XMB-RCD-101.cisco.com> <20120525063747.GD20816@shell-too.nominum.com>
From: "Bernie Volz (volz)" <volz@cisco.com>
To: Stephen Jacob <Stephen.Jacob@nominum.com>
X-OriginalArrivalTime: 25 May 2012 10:45:22.0038 (UTC) FILETIME=[7C035960:01CD3A63]
Cc: dhcwg@ietf.org
Subject: Re: [dhcwg] Comments on draft-troan-dhc-dhcpv6-stateful-issues-00
X-BeenThere: dhcwg@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: <dhcwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dhcwg>
List-Post: <mailto:dhcwg@ietf.org>
List-Help: <mailto:dhcwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 25 May 2012 10:45:23 -0000

If a client requests both IA_NA and IA_PD, here is what our server
(Cisco Prime Network Registrar does):

- If neither are possible:
	- Top level option has Status Code with NoAddrsAvail
	- IA_PA has Status Code with NoPrefixAvail
- If only IA_NA possible:
	- IA_NA has binding information
	- IA_PD has Status Code with NoPrefixAvail
- If only IA_PD possible:
	- Top level option has Status Code with NoAddrsAvail
	- IA_PD has binding information

My read of RFC 3315 says that the above is correct with respect to
IA_NA/IA_TA. (Note that you can replace IA_NA with IA_TA in the above,
or add IA_TA.) BTW, you would NEVER include NoAddrsAvail if no
IA_NA/IA_TA options.

My read of RFC 3633 says that the above is correct with respect to
IA_PD.

A client should only treat a message with Status Code with NoAddrsAvail
to have "failed" with respect to IA_NA/IA_TA. Not, IA_PD. This is
exactly what we are suggesting the behavior to be in the draft.

While I agree that this Status Code difference is rather odd and I had
pushed for moving the Status Code with NoAddrsAvail into the IA_NA/TA
options at the time of RFC 3315, but it didn't happen. (Think of the
case where IA_NA and IA_TA are included but server only gives out IA_NA
... in this case, in Advertise IA_NA has bindings and IA_TA is empty.
That seemed a bit weird to me - if empty (no bindings) was OK, why did
we need a Status Code? And why only report the status if ALL IA_NA/IA_TA
fail? I think RFC 3633 got it right as to where the status should be.)

And, I think it too late to change this because it would likely break
many existing client implementations (such as those that only do
IA_NA/TA). We considered this when writing the ID, but felt it too
dangerous to existing implements to propose such a change (to move
NoAddrsAvail into IA_NA/IA_TA instead of at top level).

BTW: I can't say how well the above server implementation plays with all
clients because frankly it is likely not that usual for a client to
request IA_NA/TA and IA_PD and have a server that only supports one. I
can say we haven't heard of any complaints and the server is in use for
DHCPv6 in a lot of places.


You statement:

>Since a compliant DHCP client must ignore messages containing Status
Code NoAddrAvail at the top level (RFC 3315),

This is, IMHO, only with respect to the IA options specified in RFC
3315.

- Bernie

-----Original Message-----
From: Stephen Jacob [mailto:Stephen.Jacob@nominum.com] 
Sent: Friday, May 25, 2012 2:38 AM
To: Bernie Volz (volz)
Cc: Gaurav Halwasia (ghalwasi); dhcwg@ietf.org
Subject: Re: [dhcwg] Comments on
draft-troan-dhc-dhcpv6-stateful-issues-00

This is actually extremely interesting to me. I believe there remains
even further confusion with the cited section. I will explain the issues
I ran into recently below the quoted context!

On Thu, May 24, 2012 at 02:29:52PM -0500, Bernie Volz (volz) wrote:
> Comments below (BV>).
...
> 1.)Section 3.1
> 
>    Replace Section 17.1.3
> <http://tools.ietf.org/html/draft-troan-dhc-dhcpv6-stateful-issues-00#
> se
> ction-17.1.3> : (existing errata)
>
>       The client MUST ignore any Advertise message that includes a
Status
>       Code option containing the value NoAddrsAvail, with the
exception
>       that the client MAY display the associated status message to the
>       user.
>
>    With:
>
>       The client MUST ignore any IAs in an Advertise message that
>       includes a Status Code option containing the value NoAddrsAvail,
>       with the exception that the client MAY display the associated
>       status message to the user. An Advertise message without any IA
>       options MUST be ignored.
>
> Is this only applicable to IA_NA.? I guess in case client sends 
> SOLICIT with both IA_NA and IA_PD. Then in that case I guess we should

> mention "NoPrefixAvail" as well.
>
> BV> It is applicable to IA_NA and IA_TA as those are the cases that 
> BV> end
> up with the Status Code option of NoAddsAvailable in the "main" part 
> of the message - not in each IA_NA/IA_TA. (IA_PD puts the 
> NoPrefixAvail Status Code option in the IA_PD itself. This is what we 
> wish had been specified for IA_NA/IA_TA but was not.)

Now, here's where it gets even more convoluted:

(I don't know if deconfusing this convolutedness is in scope for this
draft, but I'd very much like any opinions/solutions from other
implementors even if it is not).

-----

As mentioned above, in RFC 3315, section 17.1.3, it says:

  "The client MUST ignore any Advertise message that includes a Status
   Code option containing the value NoAddrsAvail, with the exception
   that the client MAY display the associated status message to the
   user."

and in section 17.2.2 it says:

  "If the server will not assign any addresses to any IAs in a
   subsequent Request from the client, the server MUST send an Advertise
   message to the client that includes only a Status Code option with
   code NoAddrsAvail and a status message for the user, a Server
   Identifier option with the server's DUID, and a Client Identifier
   option with the client's DUID."

In RFC 3633, section 11.2, it says:

  "If the delegating router will not assign any prefixes to any IA_PDs
   in a subsequent Request from the requesting router, the delegating
   router MUST send an Advertise message to the requesting router that
   includes the IA_PD with no prefixes in the IA_PD and a Status Code
   option in the IA_PD containing status code NoPrefixAvail ..."

This is different from IA_NA/IA_TA handling in that if you are not going
to grant leases on addresses (as opposed to prefixes), you can omit the
IA_NA/IA_TA options and just include Status Code NoAddrsAvail at the top
level.

RFC 3633 does not appear to say anything about status code in the top
level options (outside IA_PD options -- neither specifying any new
behaviour nor overriding/contradicting RFC 3315) other than in section
12.1 where it says:

  "Handling of Status Codes options in received Reply messages is
   described in section 18.1.8, "Receipt of Reply Messages" of RFC 3315.
   The NoPrefixAvail Status Code is handled in the same manner as the
   NoAddrsAvail Status Code."

... which by reference to RFC 3315 implies behaviour matching RFC 3315.
RFC 3315 section 18.1.8 does not explicitly address the use of the
Status Code option at the top level. One might assume that, then,
behaviour specified elsewhere in RFC 3315 would apply, but would that be
a correct assumption?

Reading between the lines, I might expect that since a DHCP server MUST
send IA_PD containing Status Code NoPrefixAvail when it is not going to
grant a lease on a prefix that:

 (a) that should supplant sending a Status Code at the top level, so
     one should omit Status Code in the top level options; or
 (b) another possibility is that one should also include Status Code
     at the top level, but with value NoPrefixAvail; or
 (c) one should, in fact, literally follow RFC 3315 and since no
     *addresses* will be offered, include Status Code at the top
     level with value NoAddrsAvail in spite of also including the
     IA_PD option with Status Code NoPrefixAvail.

The problem with option C is that ... let's say a Solicit contains only
an IA_PD (no IA_NA/IA_TA) and the DHCP server responds with a valid
prefix for the IA_PD option ... by a strict reading of RFC
3315 along side RFC 3633, since no *addresses* are being offered, there
should be a Status Code of NoAddrsAvail at the top level. I'm nearly
certain that that is not intended behaviour, since by a strict reading
of the two RFCs a DHCP client should then ignore the valid IA_PD option.

What to do when the DHCP server receives IA_NA and IA_PD, does not grant
a lease on an address to the former and does grant a lease on a prefix
to the latter is even muddier. Logic suggests to me in that case no
top-level Status Code. Only one in the IA_NA option. Strict reading of
the RFCs does not *appear* to support this belief, however.

Since a compliant DHCP client must ignore messages containing Status
Code NoAddrAvail at the top level (RFC 3315), and due to the MUST on
inclusion of the IA_PD option (with Status Code NoPrefixAvail) (RFC
3633), I _suspect_ that the _intention_ is that implementations should
instead omit Status Code at the top level in this case, or should use
the value NoPrefixAvail (which seems redundant, with the mandatory
inclusion of IA_PD with its own Status Code option).

Our DHCP implementation does option C at present. I need to figure out
whether that is correct and, if not, change the implementation.

I expect this may be of interest to other implementors, too.

Regards,
Stephen
--
 Stephen Jacob | Stephen.Jacob@nominum.com | +1 650 381 6051  Nominum,
Inc. |  http://www.nominum.com/  | +1 650 381 6000