<?xml version="1.0" encoding="US-ASCII"?>

<?rfc toc="yes"?>
<?rfc compact="yes"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc autobreaks="no"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle='yes'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc0951 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0951.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">
<!ENTITY rfc4242 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4242.xml">
<!ENTITY rfc4361 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4361.xml">
<!ENTITY rfc7283 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7283.xml">
]>

<rfc submissionType="IETF" category="std" consensus="yes" number="7341" ipr="trust200902">

<front>
  <title abbrev="DHCPv4 over DHCPv6">DHCPv4-over-DHCPv6 (DHCP 4o6) Transport</title>

  <author fullname="Qi Sun" initials="Q." surname="Sun">
    <organization>Tsinghua University</organization>
    <address>
    <postal>
      <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/>
      <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">Internet Systems Consortium</organization>
      <address>
        <postal>
          <street>950 Charter Street</street>
          <city>Redwood City</city>
          <region>CA</region>
          <code>94063</code>
          <country>USA</country>
        </postal>
        <email>msiodelski@gmail.com</email>
      </address>
    </author>

    <author fullname="Suresh Krishnan" initials="S." surname="Krishnan">
      <organization>Ericsson</organization>
      <address>
<postal>
          <street>8400 Blvd. Decarie</street>
          <city>Town of Mount Royal</city>
          <region>Quebec</region>
          <code></code>
          <country>Canada</country>
        </postal>
         <email>suresh.krishnan@ericsson.com</email>
      </address>
    </author>

    <author fullname="Ian Farrer" initials="I." surname="Farrer">
      <organization>Deutsche Telekom AG</organization>
      <address>
        <postal>
          <street>CTO-ATI, 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 month="August" year="2014"/>

  <workgroup>DHC Working Group</workgroup>



  <abstract>
      <t>IPv4 connectivity is still needed as networks migrate towards IPv6.
      Users require IPv4 configuration even if the uplink to their service
      provider supports IPv6 only. This document describes a mechanism for
      obtaining IPv4 configuration information dynamically in IPv6 networks by
      carrying DHCPv4 messages over DHCPv6 transport. Two new DHCPv6 messages
      and two new DHCPv6 options are defined for this purpose.
      </t>
  </abstract>
</front>

<middle>
    <section title="Introduction">
      <t>As the migration towards IPv6 continues, IPv6-only networks
      will become more prevalent. In such networks, IPv4 connectivity will
      continue to be provided as a service over IPv6-only networks. In addition
      to provisioning IPv4 addresses for clients of this service, other
      IPv4 configuration parameters may also be needed (e.g., addresses of
      IPv4-only services).</t>

      <t>This document describes a transport mechanism to carry DHCPv4 messages
      using the DHCPv6 protocol for the dynamic provisioning of IPv4 addresses
      and other DHCPv4 specific configuration parameters across IPv6-only
      networks. It leverages the existing DHCPv4 infrastructure, e.g., failover,
      DNS updates, DHCP Leasequery, etc.</t>



      <t>When IPv6 multicast is used to transport DHCP 4o6 messages, another benefit
      is that the operator can gain information about the underlying IPv6
      network to which the DHCP 4o6 client is connected from the DHCPv6 relay
      agents through which the request has passed.</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="hanging">

        <t hangText="CPE:">
<vspace /> Customer Premises Equipment (also known as Customer
        Provided Equipment), which provides access for devices connected to a
        Local Area Network (LAN), typically at the customer's site/home, to the
        Internet Service Provider's (ISP's) network.</t>

        <t hangText="DHCP 4o6 client (or client):">
<vspace /> A DHCP client supporting both
        the DHCPv6 protocol <xref target="RFC3315"/> as well as the DHCPv4 over DHCPv6
        protocol described in this document. Such a client is capable of
        requesting IPv6 configuration using DHCPv6 and IPv4 configuration using
        DHCPv4 over DHCPv6.</t>

        <t hangText="DHCP 4o6 server (or server):">
<vspace /> A DHCP server that is capable of
        processing DHCPv4 packets encapsulated in the DHCPv4 Message option
        (defined below).</t>

        <t hangText="DHCPv4 over DHCPv6:">
<vspace /> A protocol (described in this
        document) used to carry DHCPv4 messages in the payload of DHCPv6
        messages.</t>

      </list>
      </t>
    </section>
    
    <section title="Applicability">
      <t>The mechanism described in this document is not universally applicable. 
      This is intended as a special-purpose mechanism that will be implemented on 
      nodes that must obtain IPv4 configuration information using DHCPv4 in specific 
      environments where native DHCPv4 is not available. Such nodes are expected to 
      follow the advice in <xref target="client-behavior"/>; nodes that do not require
      this functionality are expected not to implement it, or not to enable it by 
      default. This mechanism may be enabled using an administrative control, or it may 
      be enabled automatically in accordance with the needs of some dual-stack
      transition mechanism such as <xref target="LW4OVER6"/>. 
      Such mechanisms are beyond the scope of this document.
      </t>
    </section>

    <section title="Architecture Overview">
      <t>The architecture described here addresses a typical
      use case, where a DHCP client's uplink supports IPv6 only and the
      Service Provider's network supports IPv6 and limited IPv4 services.
      In this scenario, the client can only use the IPv6 network to access
      IPv4 services, so IPv4 services must be configured using IPv6 as the
      underlying network protocol.</t>

      <t>Although the purpose of this document is to address the problem of
      communication between the DHCPv4 client and the DHCPv4 server, the
      mechanism that it describes does not restrict the transported messages
      types to DHCPv4 only. As the DHCPv4 message is a special type of BOOTP
      message, BOOTP messages <xref target="RFC0951"/> MAY also be transported 
      using the same mechanism.
      </t>

      <t>DHCP clients may be running on CPE devices, end hosts, or any other
      device that supports the DHCP-client function.  This document uses the 
      CPE as an example for describing the mechanism. This does not preclude 
      any end host, or other device requiring IPv4 configuration, from 
      implementing DHCPv4 over DHCPv6 in the future.</t>

      <t>This mechanism works by carrying DHCPv4 messages encapsulated 
      within the newly defined DHCPv6 messages. The DHCPv6-relay encapsulation 
      is used solely to deliver DHCPv4 packets to a DHCPv4-capable server, and 
      does not allocate any IPv6 addresses nor does it provide IPv6-configuration information 
      to the client. <xref target="architecture-overview"/>, below, illustrates 
      one possible deployment architecture of this mechanism. </t>

      <t>The DHCP 4o6 client implements a new DHCPv6 message called DHCPv4-query,
which carries a DHCPv4 message encapsulated in the new DHCPv4 Message
option. The DHCPv6 message can be transmitted either via DHCPv6 Relay
Agents or directly to the DHCP 4o6 server.
      </t>

      <t>The server replies with a new DHCPv6 message called DHCPv4-response,
  which carries the DHCPv4 message from the server, encapsulated in the
  DHCPv4 Message option.
      </t>

      <figure align="center" anchor="architecture-overview"
              title="Architecture Overview">
      <artwork><![CDATA[
              _____________             _____________
             /             \           /             \
             |             |           |             |
    +--------+-+  IPv6   +-+-----------+-+  IPv6   +-+--------+
    | DHCP 4o6 | Network |    DHCPv6     | Network | DHCP 4o6 |
    |  Client  +---------+  Relay Agent  +---------+  Server  |
    | (on CPE) |         |               |         |          |
    +--------+-+         +-+-----------+-+         +-+--------+
             |             |           |             |
             \_____________/           \_____________/

      ]]></artwork>
      </figure>


    <t>Before the client can use DHCPv4 over DHCPv6, it MUST obtain the
    necessary IPv6 configuration. The client requests the DHCP 4o6 Server Address
    option from the server by sending the option code in an Option Request
    option as described in <xref target="RFC3315"/>. If the server
    responds with the DHCP 4o6 Server Address option, it is an indication to
    the client to attempt using DHCPv4 over DHCPv6 to obtain IPv4 configuration.
    Otherwise, the client MUST NOT use DHCPv4 over DHCPv6 to request IPv4
    configuration.
    </t>

    <t>The client obtains the address(es) of the DHCP 4o6 server(s)
    from the DHCP 4o6 Server Address option and uses it (them) to communicate with the
    DHCP 4o6 servers as described in <xref target="client-behavior"/>. If the
    DHCP 4o6 Server Address option contains no addresses (is empty), the
    client uses the well-known All_DHCP_Relay_Agents_and_Servers multicast
    address to communicate with the DHCP 4o6 server(s).</t>

    <t>Before applying for an IPv4 address via a DHCPv4-query message, the
    client must identify a suitable network interface for the address.
    Once the request is acknowledged by the server, the client can
    configure the address and other relevant parameters on this interface. The
    mechanism for determining a suitable interface is out of the scope of the
    document.</t>

    </section>

    <section title="New DHCPv6 Messages">
      <t>Two new DHCPv6 messages carry DHCPv4 messages between the client and
      the server using the DHCPv6 protocol: DHCPv4-query and DHCPv4-response.
      This section describes the structures of these messages.</t>

      <section title="Message Types">
	    <t>
        <list style="hanging">
          <t hangText="DHCPV4-QUERY (20):"> 
The DHCP 4o6 client sends a
          DHCPv4-query message to a DHCP 4o6 server. The DHCPv4 Message option
          carried by this message contains a DHCPv4 message that the DHCP
          4o6 client uses to request IPv4 configuration parameters from the
          server.</t>

          <t hangText="DHCPV4-RESPONSE (21):">
A DHCP 4o6 server sends a
          DHCPv4-response message to a DHCP 4o6 client. It contains a DHCPv4
          Message option carrying a DHCPv4 message in response to a
          DHCPv4 message received by the server in the DHCPv4 Message option
          of the DHCPv4-query message. </t>
        </list>
        </t>
      </section>

      <section title="Message Formats">
        <t>Both DHCPv6 messages defined in this document share the following format:</t>

        <figure align="center" anchor="new-msg-format"
                title="The Format of DHCPv4-query and DHCPv4-response Messages">
          <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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    msg-type   |                     flags                     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  .                            options                            .
  .                           (variable)                          .
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
        <t>
          <list style="hanging">
            <t hangText="msg-type:">
Identifies the message type. It can be either
            DHCPV4-QUERY (20) or DHCPV4-RESPONSE (21) corresponding to the
            contained DHCPv4-query or DHCPv4-response, respectively.</t>

            <t hangText="flags:">
Specifies flags providing additional information
            required by the server to process the DHCPv4 message encapsulated in
            the DHCPv4-query message, or required by the client to process 
            a DHCPv4 message encapsulated in the DHCPv4-response message.</t>

            <t hangText="options:">
Options carried by the message. The DHCPv4
            Message Option (described in <xref target="dhcpv4-message-option"/>)
            MUST be carried by the message. Only DHCPv6 options for IPv4
            configuration may be included in this field. It MUST NOT contain
            DHCPv6 options related solely to IPv6, or IPv6-only service
            configuration.</t>
          </list>
        </t>
      </section>

      <section title="DHCPv4-query Message Flags">
        <t>The "flags" field of the DHCPv4-query is used to carry additional
           information that may be used by the server to process the
           encapsulated DHCPv4 message. Currently, only one bit of this field is
           used. Remaining bits are reserved for the future use. The "flags"
           field has the following format:</t>

        <figure align="center" anchor="DHCPv4-query-flags"
                title="DHCPv4-query Flags Format">
          <artwork><![CDATA[
       0                   1                   2
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |U|                    MBZ                      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
        <t>
          <list hangIndent="5" style="hanging">
            <t hangText="U:">

Unicast flag. If set to 1, it indicates that the
            DHCPv4 message encapsulated within the DHCPv4-query message would be
            sent to a unicast address if it were sent using IPv4. If this flag is
            set to 0, it indicates that the DHCPv4 message would be sent to the
            broadcast address if it were sent using IPv4. The usage of the flag is
            described in detail in <xref target="uni_flag"/>.</t>

            <t hangText="MBZ:">

Bits MUST be set to zero when sending and
            MUST be ignored when receiving.</t>
          </list>
        </t>
      </section>

      <section title="DHCPv4-response Message Flags">
        <t>This document introduces no flags to be carried in the "flags" field
        of the DHCPv4-response message. They are all reserved for future
        use. The DHCP 4o6 server MUST set all bits of this field to 0 and the DHCP 4o6
        client MUST ignore the content in this field.</t>
      </section>
    </section>


    <section title="New DHCPv6 Options" anchor="new-v6-options">

      <section title="DHCPv4 Message Option Format" anchor="dhcpv4-message-option">
        <t>The DHCPv4 Message option carries a DHCPv4 message that is sent
        by the client or the server. Such messages exclude any IP or
        UDP headers. </t>

        <t>The format of the DHCPv4 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-code          |           option-len          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  .                        DHCPv4-message                         .
  .                                                               .
  .                                                               .
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>
        </figure>
      <t>
        <list style="hanging">
          <t hangText="option-code:">

OPTION_DHCPV4_MSG (87).</t>

          <t hangText="option-len:">

Length of the DHCPv4 message.</t>

          <t hangText="DHCPv4-message:">

The DHCPv4 message sent by the client
          or the server. In a DHCPv4-query message, it contains a DHCPv4
          message sent by a client. In a DHCPv4-response message, it contains a
          DHCPv4 message sent by a server in response to a client.</t>
        </list>
      </t>
      </section>

      <section title="DHCP 4o6 Server Address Option Format" anchor="dhcp4o6-server-addr-option">
        <t>The DHCP 4o6 Server Address option is sent by a server to a client 
        requesting IPv6 configuration using DHCPv6 <xref target="RFC3315"/>.
        It carries a list of DHCP 4o6 servers' IPv6 addresses that the client
        should contact to obtain IPv4 configuration. This list may include
        multicast and unicast addresses. The client sends its requests
        to all unique addresses carried in this option.</t>

        <t>This option may also carry no IPv6 addresses, which instructs the
        client to use the All_DHCP_Relay_Agents_and_Servers multicast address
        as the destination address.</t>

        <t>The presence of this option in the server's response indicates to the
client that it should use DHCPv4 over DHCPv6 to obtain IPv4
configuration. If the option is absent, the client MUST NOT enable
DHCPv4-over-DHCPv6 functionality.</t>

        <t>The format of the DHCP 4o6 Server Address option is: </t>

        <figure align="center" anchor="option-4o6-servers"
              title="DHCP 4o6 Servers Address 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-code         |           option-len          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  .                        IPv6 Address(es)                       .
  .                                                               .
  .                                                               .
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>
        </figure>
      <t>
        <list style="hanging">
          <t hangText="option-code:">
OPTION_DHCP4_O_DHCP6_SERVER (88).</t>

          <t hangText="option-len:">
Length of the IPv6 address(es) carried by the
           option, i.e., multiple of 16 octets. Minimal length of this option is
           0.</t>

          <t hangText="IPv6 Address:">
Zero or more IPv6 addresses of the DHCP 4o6
          server(s).</t>
        </list>
      </t>
      </section>
    </section>

    <section anchor="uni_flag" title="Use of the DHCPv4-query Unicast Flag">
      <t>A DHCPv4 client conforming to <xref target="RFC2131"/> may send its
      DHCPREQUEST message to either a broadcast or unicast address depending on
      its state. For example, a client in the RENEWING state uses a unicast
      address to contact the DHCPv4 server to renew its lease. A client in the
      REBINDING state uses a broadcast address. </t>

      <t>In DHCPv4 over DHCPv6, IPv6 is used to deliver DHCPv4 messages to the
      DHCP 4o6 server. There is no relation between the outer IPv6 address and
      the inner DHCPv4 message. As a result, the server is unable to determine
      whether the received DHCPv4 messages should have been sent using broadcast
      or unicast in IPv4 by checking the IPv6 address. </t>

      <t>In order to allow the server to determine the client's state, the
      Unicast flag is carried in the DHCPv4-query message. The client MUST set
      this flag to 1 when the DHCPv4 message would have been sent to the unicast
      address if using DHCPv4 over IPv4. This flag MUST be set to 0 if the
      DHCPv4 client would have sent the message to the broadcast address in
      IPv4. The choice whether a given message should be sent to a broadcast or
      unicast address is made based on the <xref target="RFC2131"/> and its
      extensions.</t>

      <t>Note: The Unicast flag reflects how the DHCPv4 packet would have been
      sent; not how the DHCPv6 packet itself is sent.</t>
    </section>

    <section anchor="client-behavior" title="DHCP 4o6 Client Behavior">

      <t>The client MUST obtain necessary IPv6 configuration from a DHCPv6
      server before using DHCPv4 over DHCPv6. The client requests the DHCP 4o6
      Server Address option using the Option Request option (ORO) in every
      Solicit, Request, Renew, Rebind, and Information-request message. If
      the DHCPv6 server includes the DHCP 4o6 Server Address option in its
      response, it is an indication that the client can use DHCPv4 over
      DHCPv6 to obtain the IPv4 configuration (by sending DHCPv4 messages
      encapsulated in DHCPv4-query messages).</t>

      <t>The client MUST NOT use DHCPv4 over DHCPv6 to request IPv4
      configuration if the DHCPv6 server does not include the DHCP 4o6 Server
      Address option. If the IPv6 configuration that contained the DHCP 4o6
      Server Address option subsequently expires, or if the renewed IPv6
      configuration does not contain the DHCP 4o6 Server Address option, the
      client MUST stop using DHCPv4 over DHCPv6 to request or renew IPv4
      configuration. However, the client continues to request DHCP 4o6 Server
      Address option in the messages sent to the DHCPv6 server as long as
      it desires to use DHCPv4 over DHCPv6.</t>
      
      <t>It is possible in a multihomed configuration for there to be more
  than one DHCPv6 configuration containing a DHCP 4o6 Server Address
Option active at the same time. In this case, the configurations are
  treated as being independent, so that when any such configuration is
  active, a DHCPv4-over-DHCPv6 function may be enabled for that
  configuration.</t>
      
      <t>An implementation may also treat such configurations as being
      exclusive, such that only one is kept active at a time.   In this case,
      the client keeps the same configuration active continuously as long
      as it is valid.  If that configuration becomes invalid but one or more
      other configurations remain valid, the client activates one of the
      remaining valid configurations.</t>
      
      <t>Which strategy to follow is dependent on the implementation: keeping
      multiple configurations active at the same time may provide useful
      redundancy in some applications but may be needlessly complex in
      other cases.</t>

      <t>If the client receives the DHCP 4o6 Server Address option and DHCPv4
      <xref target="RFC2131"/> is used on the interface over which the DHCPv6
      option was received, the client MUST stop using the IPv4 configuration
      received using DHCPv4 on this interface. The client MAY send a
      DHCPRELEASE to the DHCPv4 server to relinquish an existing lease as
      described in Section 4.4.6 of <xref target="RFC2131"/>. The client MUST
      NOT use DHCPv4 on this interface as long as it receives DHCP 4o6 Server
      Address option in the messages received from the DHCPv6 server.</t>

      <t>If the client receives a DHCP 4o6 Server Address option that contains no
      IP addresses, i.e., the option is empty, the client MUST send its
      requests to the All_DHCP_Relay_Agents_and_Servers multicast address. If
      there is a list of IP addresses in the option, the client SHOULD
      send requests to each unique address carried by the option.</t>

      <t>If the client obtained stateless IPv6 configuration by sending
      an Information-request message to the server, the client MUST follow the rules
      in <xref target="RFC4242"/> to periodically refresh the DHCPv4-over-DHCPv6
      configuration (i.e., list of DHCP 4o6 servers) as well as other configuration
      data. The client that obtained stateful IPv6 configuration will refresh the
      status of DHCPv4-over-DHCPv6 function when extending a lifetime of acquired
      IPv6 address (Renew and Rebind messages).</t>

      <t>The client MUST employ an IPv6 address of an appropriate scope
      from which to source the DHCPv4-query message. When the client sends a
      DHCPv4-query message to the multicast address, it MUST use a link-local
      address as the source address as described in <xref target="RFC3315"/>.
      When the client sends a DHCPv4-query message using unicast, the source 
      address MUST be an address of appropriate scope, acquired in advance.</t>

      <t>The client generates a DHCPv4 message and stores it verbatim in the
      DHCPv4 Message option carried by the DHCPv4-query message. The client MUST
      put exactly one DHCPv4 Message option into a single DHCPv4-query message.
      The client MUST NOT request the DHCP 4o6 Server Address option in the
      DHCPv4-query message.
      </t>

      <t>The client MUST follow the rules defined in <xref target="uni_flag"/> when
      setting the Unicast flag based on the DHCPv4 destination.</t>

      <t>On receiving a DHCPv4-response message, the client MUST look for the
      DHCPv4 Message option within this message. If this option is not found, the
      DHCPv4-response message is discarded. If the DHCPv4 Message option is
      present, the client extracts the DHCPv4 message it contains and processes
      it as described in Section 4.4 of <xref target="RFC2131"/>.
      </t>

      <t>When dealing with IPv4 configuration, the client MUST follow the normal 
      DHCPv4 retransmission requirements and strategy as specified in Section 4.1 
      of <xref target="RFC2131"/>. There are no explicit transmission parameters 
      associated with a DHCPv4-query message, as this is governed by the DHCPv4 "state machine"
      <xref target="RFC2131"/>.</t>


      <t>The client MUST implement <xref target="RFC4361"/> to ensure that the 
      device correctly identifies itself. It MUST send a 'client identifier'
      option when using DHCPv4 over DHCPv6. </t>

    </section>

    <section title="Relay Agent Behavior">

      <t>When a DHCPv6 relay agent receives a DHCPv4-query message, it may not
      recognize this message. The unknown message MUST be forwarded as described
      in <xref target="RFC7283"/>.</t>

      <t>A DHCPv6 relay agent that can recognize DHCP 4o6 messages MAY allow
 the configuration of a separate set of destination addresses for such
 messages in addition to the destination addresses used for relaying
 the other DHCPv6 messages. 
      To implement this function, the relay checks the received DHCPv6 message 
      type and forwards according to the following logic:</t>
      
      <t>
        <list style="numbers">
            <t>If the message type is DHCPV4-QUERY, the packet is relayed to 
            the configured DHCP 4o6 Server's address(es) in the form of a normal
            DHCPv6 packet (i.e., DHCPv6/UDP/IPv6). </t>

            <t>For any other DHCPv6 message type, forward according to section
              20 of <xref target="RFC3315"/>.</t>
        </list>
      </t>

      <t>The above logic only allows for separate relay destinations configured
      on the relay agent closest to the client (single relay hop). Multiple
      relaying hops are not considered in the case of separate relay
      destinations.</t>
    </section>

    <section title="DHCP 4o6 Server Behavior">
      <t>When the server receives a DHCPv4-query message from a client, 
      it searches for the DHCPv4 Message option.  The server discards a
      packet without this option.  In addition, the server MAY notify an
      administrator about the receipt of this malformed packet.  The
      mechanism for this notification is out of scope for this document.</t>

      <t>If the server finds a valid DHCPv4 Message option, it extracts the
      original DHCPv4 message. Since the DHCPv4 message is encapsulated
      in the DHCPv6 message, it lacks the information that is typically used
      by the DHCPv4 server, implementing <xref target="RFC2131"/>, to make
      address-allocation decisions, e.g., giaddr for relayed messages and
      IPv4 address of the interface that the server is using to communicate
      with a directly connected client. Therefore, the DHCP 4o6 server allocates
      addresses according to the policies on local address assignment determined
      by the server administrator. For example, if the DHCPv4-query message
      has been sent via a relay, the server MAY use the link-address field
      of the Relay-forward message as a lookup for the IPv4 subnet from which to assign a
      DHCPv4 address. If the DHCPv4-query message has been sent from 
      a directly connected client, the server MAY use the IPv6 source address 
      of the message to determine the appropriate IPv4 subnet to use for 
      DHCPv4 address assignment.</t>

      <t>Alternatively, the server may act as a DHCPv4 relay agent and forward
      the DHCPv4 packet to a "normal" DHCPv4 server.  The details of such
      a solution have not been considered by the working group; describing
      that solution is out of scope of this document and is left as future work
      should the need for it arise.</t>

      <t>The server SHOULD use the "flags" field of the DHCPv4-query message to
      create a response (server to client DHCPv4 message). The use of this
      field is described in detail in <xref target="uni_flag"/>.</t>

      <t>When an appropriate DHCPv4 response is created, the server places it
  in the payload of a DHCPv4 Message option, which it puts into the
  DHCPv4-response message.</t>

      <t>If the DHCPv4-query message was received directly by the server,
      the DHCPv4-response message MUST be unicast from the interface on which
      the original message was received.
      </t>

      <t>If the DHCPv4-query message was received in a Relay-forward message,
      the server creates a Relay-reply message with the DHCPv4-response message
      in the payload of a Relay Message option, and responds as described in
      Section 20.3 of <xref target="RFC3315"/>. </t>
    </section>

    <section title="Security Considerations">
      <t>In this specification, DHCPv4 messages are encapsulated in the newly
      defined option and messages. This is similar to the handling of the 
      current relay agent messages. In order to bypass firewalls or network
      authentication gateways, a malicious attacker may leverage this feature
      to convey other messages using DHCPv6, i.e., use DHCPv6 as a form of 
      encapsulation. However, the potential risk from this is no more severe 
      than that with the current DHCPv4 and DHCPv6 practice.</t>

      <t>It is possible for a rogue server to reply with a DHCP 4o6 Server
      Address option containing duplicated IPv6 addresses, which could cause an
      amplification attack. To avoid this, the client MUST check if there are
      duplicate IPv6 addresses in a DHCP 4o6 Server Address option when receiving one.
      The client MUST ignore any but the first instance of each address.</t>
    
      <t>When considering whether to enable DHCPv4-over-DHCPv6, one important 
      consideration is that when it is enabled, this gives the DHCPv6 server 
      the ability to shut off DHCPv4 traffic, and, consequently, IPv4 traffic, 
      on the interface that is configured to do DHCPv4-over-DHCPv6. For this 
      reason, DHCPv4-over-DHCPv6 should only be enabled in situations where 
      there is a clear trust relationship that eliminates this concern. 
      For instance, a CPE device can safely enable this on its WAN interface, 
      because it is reasonable to assume that an ISP will not accidentally 
      configure DHCPv4 over DHCPv6 service on that link, and that it will 
      be impractical for an attacker to set up a rogue DHCPv6 server in the 
      ISP's network.</t>
    
    </section>

    <section title="IANA Considerations">

      <t>IANA has allocated two DHCPv6 option codes for use by
      OPTION_DHCPV4_MSG (87) and OPTION_DHCP4_O_DHCP6_SERVER (88) from the "Option
      Codes" table. Also, IANA has allocated two DHCPv6 message type codes for
      the DHCPV4-QUERY (20)
      and DHCPV4-RESPONSE (21) from the "Message Types" table of the
      "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)" registry.  Both
      tables can be found at &lt;http://www.iana.org/assignments/dhcpv6-parameters/&gt;.</t>

    </section>

    <section title="Contributors List">
      <t>Many thanks to Ted Lemon, Bernie Volz, Tomek Mrugalski, Cong Liu, and
      Yuchi Chen for their great contributions to the specification.</t>
    </section>

</middle>

<back>

  <references title="Normative References">
    &rfc2119;
    &rfc2131;
    &rfc3315;
    &rfc4242;
    &rfc4361;
 <!--   <?rfc include="reference.I-D.ietf-dhc-dhcpv6-unknown-msg" ?> Now RFC 7283 -->
    &rfc7283;


  </references>

  <references title="Informative References">
    &rfc0951;

 <!--   <?rfc include="reference.I-D.ietf-softwire-lw4over6" ?> Submitted to IESG for Publication-->

<reference anchor='LW4OVER6'>
<front>
<title>Lightweight 4over6: An Extension to the DS-Lite Architecture</title>

<author initials='Y' surname='Cui' fullname='Yong Cui'>
    <organization />
</author>

<author initials='Q' surname='Sun' fullname='Qiong Sun'>
    <organization />
</author>

<author initials='M' surname='Boucadair' fullname='Mohamed Boucadair'>
    <organization />
</author>

<author initials='T' surname='Tsou' fullname='Tina Tsou'>
    <organization />
</author>

<author initials='Y' surname='Lee' fullname='Yiu Lee'>
    <organization />
</author>

<author initials='I' surname='Farrer' fullname='Ian Farrer'>
    <organization />
</author>

<date month='June' day='6' year='2014' />

<abstract><t>Dual-Stack Lite (RFC 6333) describes an architecture for transporting IPv4 packets over an IPv6 network.  This document specifies an extension to DS-Lite called Lightweight 4over6 which moves the Network Address and Port Translation (NAPT) function from the centralized DS-Lite tunnel concentrator to the tunnel client located in the Customer Premises Equipment (CPE).  This removes the requirement for a Carrier Grade NAT function in the tunnel concentrator and reduces the amount of centralized state that must be held to a per-subscriber level.  In order to delegate the NAPT function and make IPv4 Address sharing possible, port-restricted IPv4 addresses are allocated to the CPEs.</t></abstract>

</front>

<seriesInfo name='Work in' value='Progress' />

</reference>



  </references>

</back>
</rfc>

