<?xml version="1.0" encoding="US-ASCII"?>

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc autobreaks="no"?>
<?rfc subcompact="no"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc2131 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2131.xml">
<!ENTITY rfc3315 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3315.xml">
]>

<rfc category="std" docName="draft-scskf-dhc-dhcpv4-over-dhcpv6-00" ipr="trust200902">

<front>
  <title abbrev="DHCPv4 over DHCPv6">DHCPv4 over DHCPv6 Transport</title>

  <author fullname="Qi Sun" initials="Q." surname="Sun">
    <organization>Tsinghua University</organization>
    <address>
    <postal>
      <street>Department of Computer Science, Tsinghua University</street>
      <city>Beijing</city>
      <code>100084</code>
      <country>P.R.China</country>
    </postal>
    <phone>+86-10-6278-5822</phone>
    <email>sunqi@csnet1.cs.tsinghua.edu.cn</email>
    </address>
  </author>

  <author fullname="Yong Cui" initials="Y." surname="Cui">
    <organization>Tsinghua University</organization>
    <address>
    <postal>
      <street>Department of Computer Science, Tsinghua University</street>
      <city>Beijing</city>
      <code>100084</code>
      <country>P.R.China</country>
    </postal>
    <phone>+86-10-6260-3059</phone>
    <email>yong@csnet1.cs.tsinghua.edu.cn</email>
    </address>
  </author>

    <author fullname="Marcin Siodelski" initials="M." surname="Siodelski">
      <organization abbrev="ISC"></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 1431</phone>
        <email>msiodelski@gmail.com</email>
      </address>
    </author>

    <author fullname="Suresh Krishnan" initials="S." surname="Krishnan">
      <organization>Ericsson</organization>
      <address>
         <email>suresh.krishnan@ericsson.com</email>
      </address>
    </author>

    <author fullname="Ian Farrer" initials="I." surname="Farrer">
      <organization>Deutsche Telekom AG</organization>
      <address>
        <postal>
          <street>GTN-FM4,Landgrabenweg 151</street>
          <city>Bonn</city>
          <region>NRW</region>
          <code>53227</code>
          <country>Germany</country>
        </postal>
        <email>ian.farrer@telekom.de</email>
      </address>
    </author>





  <date year="2013"/>

  <abstract>
      <t>This document describes a mechanism for obtaining IPv4 parameters
      in IPv6 networks by carrying DHCPv4 messages over DHCPv6 transport.
      </t>
  </abstract>
</front>

<middle>
    <section title="Introduction">
      <t>As the migration to IPv6 continues to happen, IPv6 only networks
      will become more prevalent, and there will be a need to provide IPv4
      as a service over these IPv6 only networks. Along with the ability
      to provide IPv4 addressing, there might also be a need to provide
      other IPv4 configuration parameters such as addresses for reaching
      IPv4 services. There are several approaches possible to provision
      such information and this document describes one such approach.
      </t>
    </section>

    <section 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"/>.
      </t>
    </section>

    <section title="Terminology">
      <t>This document makes use of the following terms
      <list style="symbols">
        <t>BOOTREQUESTV6 (TBD): A new type of DHCPv6 Client/Server message defined
        in this document. A client sends to a server a BOOTREQUESTV6 message,
        which contains a BOOTP Message Option. Each BOOTP Message Option contains
        a BOOTREQUEST message that client used to request IPv4 configuration
        parameters from the server.</t>

        <t>BOOTREPLYV6 (TBD): A new type of DHCPv6 Client/Server message defined
        in this document. A server sends a BOOTREPLYV6 message, which contains a
        BOOTP Message Option, in response to the BOOTREQUESTV6 message received
        from a client. Each BOOTP Message Option, wrapped in a BOOTREPLYV6
        message contains a BOOTREPLY message, which is the response to the
        corresponding BOOTREQUEST message in BOOTREQUESTV6 message received from
        the client.</t>
      </list>
      </t>
    </section>

    <section title="Architecture Overview">
      <t>The architecture described in this document addresses the typical
      use case, where the DHCP client's uplink supports IPv6 only and the
      Service Provider's network supports IPv6 and limited IPv4 services which
      need to be accessed by the client over IPv6 only network. Although, the
      purpose of this document is to address the problem of communication
      between DHCPv4 client and DHCPv4 server, the mechanisms it describes
      do not restrict the transported types of messages to DHCPv4. The BOOTP
      messages can be transported as well.
      </t>

      <t>The DHCP clients can be running on CPE devices or end hosts, etc.
      At the time this document is written, DHCP clients on CPE devices are
      relatively easier to be modified comparing to those on end hosts. So this
      document takes the CPE as an example for describing the mechanism.
      This doesn't preclude end hosts from implementing the mechanism in the
      future.
      </t>

      <t>This mechanism works by carrying encapsulated DHCPv4 messages over
      DHCPv6 messages. One possible architecture detailing the usage of this
      mechanism is illustrated in the <xref target="architecture-overview"/>.
      In this architecture, the client is a DHCP client which can send and
      receive BOOTP message using a new type of DHCPv6 message with a new
      type of DHCPv6 option. The DHCPv6 message is called BOOTREQUESTV6 message.
      The new option is called BOOTP Message Option. The format of the option
      is described in <xref target="bootp-message-option"/>. The client sends
      all its DHCPv6 packets, including the DHCPv4 over DHCPv6 packets,
      to the well-known All_DHCP_Relay_Agents_and_Servers multicast address
      on the DHCPv6 server port 547. </t>

      <t>The DHCPv6 packet can be transmitted either via Relay Agents or
      directly to the server. The server is referred in this document as
      "Unified Server" for its capability of processing regular DHCPv6
      traffic as well as DHCPv4 packets wrapped in the BOOTP Message
      Option. Server replies with a relevant DHCPv6 packet carrying
      DHCPv4 response wrapped with the BOOTP Message Option. Client
      receives response on the port 546. </t>

      <figure align="center" anchor="architecture-overview"
              title="Architecture Overview">
      <artwork><![CDATA[











           _____________             _____________
          /             \           /             \
          |             |           |             |
 +--------+-+  IPv6   +-+-----------+-+  IPv6   +-+--------+
 |   DHCP   | network |     DHCP      | network | Unified  |
 |  Client  +---------+  Relay Agent  +---------+  Server  |
 | (on CPE) |         |               |         |          |
 +--------+-+         +-+-----------+-+         +-+--------+
          |             |           |             |
          \_____________/           \_____________/

      ]]></artwork>
      </figure>
    </section>


    <section title="BOOTP Message Option Format" anchor="bootp-message-option">
      <t>The BOOTP Message option carries a BOOTP message that is sent
      by the client or the server. Such BOOTP messages exclude any IP or
      UDP headers. </t>

      <t>The format of the BOOTP Message Option is: </t>

      <figure align="center" anchor="option-dhcpv4-msg"
            title="DHCPv4 Message Option Format">
      <artwork><![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_BOOTP_MSG       |           option-len          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                         BOOTP-message                         .
.                                                               .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   option-code    OPTION_BOOTP_MSG (TBD)

   option-len     Length of BOOTP-message

   BOOTP-message The BOOTP message sent by the client or the
                 server. In a BOOTREQUESTV6 message, contains a
                 BOOTREQUEST message sent by client. In a
                 BOOTREPLYV6 message, contains a BOOTREPLY message
                 sent by server in response to a client.
      ]]></artwork>
      </figure>
    </section>

<!--
  <section title="Method 1: DHCPv4 over DHCPv6">
    <section title="Method Overview">
      <t>In this method, DHCP client will put DHCPv4 message into a
      DHCPv6 option, i.e. the DHCPv4 Message Option. The DHCP packets
      will be sent out as a DHCPv6 message.</t>
    </section>
-->

    <section title="Client Behavior">
      <t>When the client requires an IPv4 address and/or other IPv4 configuration
      parameters, it MUST generate a DHCPv4 message to obtain them from a server.
      This message is stored verbatim in the BOOTP Message Option carried by
      BOOTREQUESTV6 message. Client MUST put exactly one BOOTP Message Option in a
      single BOOTREQUESTV6 message. Client sends out the BOOTREQUESTV6 message to the
      Well-Known multicast address, i.e. All_DHCP_Relay_Agents_and_Servers on multicast
      address defined in <xref target="RFC3315"/>. </t>

      <t>When client receives a BOOTREPLYV6 message, it MUST look for the
      BOOTP Message Option in this message. If this option is not found, the
      BOOTREPLYV6 message is discarded. If BOOTP Message Option is found,
      client extracts the DHCPv4 message it contains and processes as described
      in section 4.4 of <xref target="RFC2131"/>.
      </t>
    </section>

    <section title="Relay Agent Behavior">
    <t>If the relay agent receives a BOOTREQUESTV6 message, it MUST handle the
    message as described in section 20.1.1 of <xref target="RFC3315"/>.
      </t>
<!--
      <t>The DHCP relay agent will receive the DHCPv6 message containing
      DHCPv4 Message Option from the multicast interface. It then handles the
      message as a normal DHCPv6 relay agent as in Section 20.1 of
      <xref target="RFC3315"/>.
      In this method, DHCP client and server are capable of communicating with
      each other directly, which does not necessitate any changes in
      DHCPv6 relay agent behavior.</t>
-->
    </section>

    <section title="Server Behavior">
      <t>If the server receives a BOOTREQUESTV6 message from a client,
      it searches for BOOTP Message Option. If this option is missing,
      the server discards the packet. Server MAY choose to notify an
      administrator about reception of malformed packet. The exact way
      how server notifies an administrator is out of the scope of this
      document</t>

      <t>If server finds the valid BOOTP Message Option, it extracts the
      original DHCPv4 message sent by the client. This message is in turn
      passed to the DHCPv4 server engine, which creates a response to
      the client's message as specified in <xref target="RFC2131"/>.
      Server stores the DHCPv4 response message, produced by the engine,
      in a payload of BOOTP Message Option, which it stores in the
      BOOTREPLYV6 message. If the BOOTREQUESTV6 message was received
      directly by the server the BOOTREPLYV6 message MUST be unicast
      through the interface on which the original message was received.
      </t>

      <t>If the BOOTREQUESTV6 message was received in a Relay-forward
      message, the server creates a Relay-reply message with the
      BOOTREPLYV6 message in the payload of a Relay Message Option
      analogously to other types of DHCPv6 messages as described in
      <xref target="RFC3315"/>. The server unicasts the Relay-reply
      message directly to the IP address of the relay agent from which
      the Relay-forward message was received.</t>

    </section>

    <section title="Contributors List">
      <t>Many thanks to Ted Lemon, Bernie Volz, Tomek Mrugalski,
      Yuchi Chen and Cong Liu, for their great contributions to the draft.</t>
    </section>

  <section title="IANA Consideration">

    <t>IANA is kindly requested to allocate one DHCPv6 option code to the
    OPTION_BOOTP_MSG and two DHCPv6 message type codes to the BOOTREQUESTV6
    and BOOTREPLYV6. </t>

  </section>

<!--
  </section>
 <section title="Method 2: DHCPv4 over IPv6">
    <section title="Client Behavior">
       <t>In this case, the client is enabled to send and receive
       DHCPv4 messages through IPv6 sessions. The IPv6 UDP packet that
       has a DHCPv4 message as its payload is called DHCPv4 over IPv6
       packet. The client should use the port 546 as the destination
       port, and the port 547 as the source port of each DHCPv4 over
       IPv6 packet. </t>
    </section>
    <section title="Relay Agent Behavior">

       <t>The relay agent should also send and receive DHCPv4 messages
       through IPv6 on the interface facing to the client. It should
       listen for DHCPv4 over IPv6 packets on port 546, and send
       DHCPv4 over IPv6 packets on port 547.</t>

       <t>When the relay agent receives a BOOTPREQUEST message (i.e.,
       DHCPDISCOVER, DHCPREQUEST, etc.), it constructs a new relay
       agent-forward message. It then copies the source IPv6 address
       from the header of the received DHCPv4 over IPv6 packet to the
       peer-address field of the relay agent-forward message. The
       relay agent copies the received BOOTPREQUEST message (excluding
       any IP or UDP headers) into the DHCPv4 Message option in the
       new message. It then forwards such a relay agent-forward
       message to the server.</t>

       <t>When the relay agent received a relay agent-relay message
       that includes the DHCPv4 Message option from the server, it
       should extract the DHCPv4 message from the DHCPv4 Message
       option of the message, and relay agent it to the address
       contained in the peer-address field of the relay agent-reply
       message.</t>

    </section>
  </section>

  <section title="Server Behavior">
    <t>When a DHCPv6 server receives a valid DHCPv6 message, it checks
    for the presence of a DHCPv4 Message Option. If it is not present,
    the server handles the DHCPv6 packet as is defined in <xref target="RFC3315"/>.
    If it is present, the server processes the payload of the option as a DHCPv4
    message. The DHCPv4 message is handled by the DHCPv6 server itself
    (most likely scenario) or forwarded to another DHCPv4 server.</t>

    <t>When sending out a DHCPv4 reply message, the DHCPv6 server MUST include
    a DHCPv4 Message Option in an encapsulating DHCPv6 message that contains
    the DHCPv4 message as the option payload.
    </t>

    <t>DHCPv4 messages with the same transaction ID SHOULD NOT be
    transported inside DHCPv6 messages with different transaction
    IDs.</t>

  </section>
-->

<!--
  <section title="Lifetime Considerations">
    <t>When there is a binding table of IPv4 and IPv6 addresses related
    to the DHCP server, a binding record may become invalid if the IPv6
    address expires. The IPv4 address should be renewed when a client's
    IPv6 address expires in this situation.
    </t>
  </section>
-->

</middle>

<back>

  <references title="Normative References">
    &rfc2131;
    &rfc3315;
  </references>

  <references title="Informative References">
    &rfc2119;
    <?rfc include="reference.I-D.ietf-dhc-dhcpv4-over-ipv6" ?>
  </references>

</back>
</rfc>

