<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629bis.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-mrugalski-dhc-dhcpv6-suboptions-04"
     updates="3315"
     ipr="trust200902">
  <front>
    <title abbrev="Requesting Suboptions in DHCPv6">Requesting
    Suboptions in DHCPv6</title>

    <author fullname="Tomasz Mrugalski" initials="T" surname="Mrugalski">
      <organization abbrev="ISC">Internet Systems Consortium, Inc.
      </organization>

      <address>
	<postal>
	  <street>950 Charter Street</street>
	  <city>Redwood City</city>
	  <region>CA</region>
	  <code>94063</code>
	  <country>USA</country>
	</postal>
	<phone>+1 650 423 1345</phone>
        <email>tomasz.mrugalski@gmail.com</email>
      </address>
    </author>

    <date month="March" year="2012" />
    <abstract>
      <t>DHCPv6 clients may use Option Request Option (ORO) defined in
      <xref target="RFC3315">RFC3315</xref> to specify, which options
      they would like to have configured by DHCPv6 servers. Clients
      may also be interested in specific options that do not appear in
      DHCPv6 message directly (top-level options), but rather as
      nested options or sub-options (i.e. options conveyed within
      other options). This document clarifies how to use already
      defined ORO to request sub-options. It also defines new Option
      Exclude Option (OXO) for cases, when client does not want
      requested options to appear within specific options. This
      document updates RFC3315 (if approved).</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>There are 2 ways a DHCPv6 client can inform a server about
      its intent to have an option configured. The first (mandatory)
      way is to send Option Request Option (ORO), defined in <xref
      target="RFC3315"/>. The second way (optional, can be used as an
      addition to the first method) is to send the actual requested
      option to provide hints to a server.</t>

      <t>Clients may also be interested in receiving specific
      sub-options (i.e. options that do not appear in DHCPv6 messages
      directly, but rather within other options). Unfortunately, there
      is no clear way for clients to request such
      sub-options. <xref target="RFC3315"/> does not
      provide any guidance regarding such problem. This document
      clarifies how clients should request sub-options.</t>
    </section>

    <section title="Terminology">
      <t>This section defines terms used in this document.</t>
      <t>Option - Any DHCPv6 Option, defined according to format
      specified in <xref target="RFC3315"/>. Option may appear in
      DHCPv6 message directly or within other options.</t>
      <t>Top-Level Option - an option that appears in DHCPv6
      directly. Most existing options are top-level options.</t>
      <t>Sub-Option - An option that appears not as top-level
      option, but rather within other option. An example of such
      option is IAADDR that may only appear within IA_NA or IA_TA
      options. Sub-options are sometimes referred to as nested
      options.</t>
      <t>Scope - Any place (message or option) that is allowed to
      convey DHCPv6 options. Examples of scope are top-level (options
      conveyed directly within DHCPv6 message), IA_NA (options
      conveyed within specific instance of IA_NA option), or IA_PD
      (options conveyed within specific instance of IA_PD option). Each
      instance of an option that can convey sub-options is a separate
      scope. For example, if a message includes two IA_NA options, there
      are 3 scopes: top-level, ia_na1 and ia_na2.</t>
    </section>

    <section title="Suboption Request Procedure">
      <t>Clients that want specific sub-option provided by the server,
      MUST include ORO within message directly (as they do for normal,
      top-level options) and include option codes for options that are
      expected to appear in message directly (top-level options) and
      within other options (sub-options) as well. The section 22.7 of
      <xref target="RFC3315"/> still applies, but this document
      clarifies that sub-options can be requested that way as
      well.</t>

      <t>Client that expects requested options to appear only in some
      option instances, SHOULD include Option Exclude Option (OXO) within
      scope where it does not want to receive specific options.</t>

      <t>Client MAY include several instances of ORO, one for each
      scope. Client MUST NOT include more than one ORO in each
      scope.</t>
      
      <t>Discussion: The following approach has the benefit of
      backward compatibility. Server that does not support OXO will
      just assign requested suboptions in every suboption. Furthermore
      it is envisaged that requesting sub-options in only some scope,
      but not others will be relatively rare and in most cases clients
      will want to get specific option in every scope that requested
      option is valid for.</t>
    </section>

    <section title="Option Exclude Option">
      <t>This option is sent by a client to inform a server that it
      doesn't want to receive specific option within a scope OXO is
      included in.</t>
        
      <t>Clients SHOULD send OXO only if it requested a given option
      in ORO, but does not want to receive requested option in a given
      scope.</t>

      <figure align="center" anchor="img-option-soro" 
              title="Option Exclude Option">
        <preamble></preamble>
        <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           OPTION_OXO          |           option-len          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     excluded-option-code-1    |     excluded-option-code-2    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]>
        </artwork>
      </figure>
      <t>
        <list style="symbols">
          <t>option-code: OPTION_OXO (TBD)</t>
          
          <t>option-length: (number of excluded options) x 2</t>

	  <t>excluded-option-code: one or more two octet wide
	  fields that specify option codes that are excluded in this
	  particular scope.</t>
        </list>
      </t>
    </section>

    <section title="Justification">
      <t>As DHCPv6 protocol evolves and continues to be used to
      configure increasingly complex features, number of nested
      options will increase. To avoid each new document repeating the
      same sub-option request procedure, it seems reasonable to define
      such uniform procedure now. Even worse, such documents may
      propose different ways of requesting different options. This
      would considerably complicate server implementations.</t>

      <t>Another alternative possible approach would be to simply use
      ORO as it is already defined.  Client could simply include
      single instance of ORO to express desire to receive specific
      suboptions, without using OXO. Several existing server
      implementations deal with all options in an uniform way. For
      example, in case when client requestes two prefixes (sends two
      IA_PD options), but expects only one of those prefixes to have
      PD_EXCLUDE option. Without OXO, such flexibility is not possible.</t>
    </section>
    
    <section anchor="client" title="DHCPv6 Client Behavior">
      <t>A client that is interested in specific suboptions SHOULD
      send ORO requesting both top-level options and sub-options.</t>
      <t>If a client wants to receive specific suboptions only in some
      options, it should send OXO within options that does not want to
      receive excluded options in.</t>

      <t>A client MUST NOT send OXO in message directly.</t>
    </section>
    
    <section anchor="server" title="DHCPv6 Server Behavior">
      <t>Server processes the message received from client in a
      regular way, as explained in <xref target="RFC3315"/>. The list
      in ORO includes both top-level options and sub-options as well.
      Server that supports OXO SHOULD NOT include requested suboptions
      within scopes that excludes given option.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>IANA is kindly requested to allocate DHCPv6 option code TBD
      to the OPTION_OXO. This value should be added to the DHCPv6
      option code space defined in Section 24.3 of <xref
      target="RFC3315"/>.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>TBD</t>
    </section>

    <section title="Acknowledgements">
      <t>Author would like to thank Bernie Volz, Jouni Korhonen, Ole
      Troan and Ted Lemon for their insightful comments.</t>

      <t>This work has been partially supported by Department of
      Computer Communications (Gdansk University of Technology) and by
      the Polish Ministry of Science and Higher Education under the
      European Regional Development Fund, Grant  No. 
      POIG.01.01.02-00-045/09-00 (Future Internet Engineering
      Project).</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.3315"?>
    </references>
    <!--
    <references title="Informative References">
      <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-mif-dhcpv6-route-option-03'?>
      <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-dhc-pd-exclude-03'?>
      <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-mrugalski-dhc-dhcpv6-4rd-00'?>
    </references> -->

    <!--
    <references title="Informative References">

    </references> -->
  </back>
</rfc>
