<?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 rfc3315 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3315.xml">
    <!ENTITY I-D.ietf-softwire-lw4over6 SYSTEM 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-softwire-lw4over6.xml'>
    <!ENTITY RFC7341 SYSTEM 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7341.xml'>
    <!ENTITY I-D.ietf-softwire-map-dhcp SYSTEM 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-softwire-map-dhcp.xml'>
    <!ENTITY I-D.ietf-pcp-port-set SYSTEM 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-pcp-port-set.xml'>
    <!ENTITY I-D.ietf-dhc-dynamic-shared-v4allocation SYSTEM 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-dhc-dynamic-shared-v4allocation.xml'>
    <!ENTITY I-D.fsc-softwire-dhcp4o6-saddr-opt SYSTEM 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.fsc-softwire-dhcp4o6-saddr-opt.xml'>
    <!ENTITY I-D.cui-dhc-dhcp4o6-bulk-active-leasequery SYSTEM 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.cui-dhc-dhcp4o6-bulk-active-leasequery.xml'>
    <!ENTITY I-D.sun-softwire-yang SYSTEM 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.sun-softwire-yang.xml'>
    <!ENTITY rfc6887 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6887.xml">
    <!ENTITY rfc6241 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
    <!ENTITY I-D.perreault-softwire-lw4over6-pcp SYSTEM 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.perreault-softwire-lw4over6-pcp.xml'>
    <!ENTITY bcp38 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2827.xml">
]>

<rfc category="info" docName="draft-liu-softwire-lw4over6-dynamic-provisioning-00" ipr="trust200902">

<front>
  <title abbrev="lw4over6 dynamic provisioning">Dynamic IPv4 Provisioning for Lightweight 4over6</title>
  <author fullname="Cong Liu" initials="C." surname="Liu">
    <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>gnocuil@gmail.com</email>
    </address>
  </author>
  <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="Jianping Wu" initials="J." surname="Wu">
    <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-5983</phone>
    <email>jianping@cernet.edu.cn</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 year="2015"/>
  
  <workgroup>Network Working Group</workgroup>

  <abstract>
    <t>
    Lightweight 4over6 <xref target="I-D.ietf-softwire-lw4over6"/> is an
    IPv4 over IPv6 hub and spoke mechanism that provides overlay IPv4
    services in an IPv6-only access network. Provisioning IPv4 addresses
    and port sets to customers is the core function of the Lightweight
    4over6 control plane. <xref target="I-D.ietf-softwire-lw4over6"/>
    describes the use of DHCPv6 for deterministic IPv4 provisioning.
    This document describes a dynamic IPv4 provisioning mode for
    Lightweight 4over6 that based on DHCPv4 over DHCPv6 <xref target="RFC7341"/>.
    </t>
  </abstract>
</front>

<middle>
    <section title="Introduction">
     <t>Lightweight 4over6 <xref target="I-D.ietf-softwire-lw4over6"/>
     provides IPv4 access over IPv6 network in hub-and-spoke softwire
     architecture.  In Lightweight 4over6, each Lightweight B4 (lwB4)
     is assigned with a port-restricted public IPv4 address or a full
     public IPv4 address to be used for IPv4 communication.
     Provisioning IPv4 address, port set and other IPv4 parameters to
     lwB4 is the core function of the Lightweight 4over6 control plane.
     It can be achieved by several protocols, such as DHCPv6
     <xref target="RFC3315"/>, <xref target="I-D.ietf-softwire-map-dhcp"/>,
     DHCPv4 over DHCPv6 <xref target="RFC7341"/>, and PCP
     <xref target="RFC6887"/>.</t>

     <t><xref target="I-D.ietf-softwire-lw4over6"/> describes the use of DHCPv6 for
     deterministic IPv4 provisioning.  The IPv4 address and port set ID
     (PSID) are carried in DHCPv6 options defined in
     <xref target="I-D.ietf-softwire-map-dhcp"/>.</t>

     <t>However, the deterministic IPv4 provisioning imposes some
     restrictions for addressing and deployment:<list style="symbols">
 
       <t>The IPv4 address's life time is bound to the IPv6 tunnel endpoint
       life time</t>
       <t>The tunnel must be initiated from a predictable /64 prefix in the
       home network</t>
       <t>The IPv4 address and PSID need to be embedded into the IID of the
       clients' /128 IPv6 address</t>
       <t>IPv4 address resources are permanently allocated to a client
       whether it is active or not resulting in less efficient address
       usage</t>
     </list>
   </t>

      <t>This document describes how to deploy Lightweight 4over6 using DHCPv4
      over DHCPv6 for dynamic IPv4 address provisioning. The main advantages
      of using a dynamic provisioning model over a deterministic model are
      as follows:<list style="symbols">

       <t>No inherent restrictions on the IPv6 source address within the 
       homenet topology that the client uses for sourcing its tunneled
       traffic</t>
       <t>Lifetimes of IPv6 and IPv4 addresses are decoupled, allowing for
       more flexibility in addressing policy</t>
       <t>Inactive clients' addresses can be released/reclaimed for 
       allocation to active clients, so more efficient address usage
       is possible</t>
     </list>
   </t>

      <t>Since DHCPv4 over IPv4 is unable to directly work in native
      IPv6 network, DHCPv4 over DHCPv6 [RFC7341] allows DHCPv4
      functionality to be trasported over a pure in IPv6 network.
      This is achieved by transporting DHCPv4 messages within DHCPv6
      messages.</t>

      <t><xref target="I-D.fsc-softwire-dhcp4o6-saddr-opt"/> defines options for lwB4 to
      report its IPv6 tunnel source address to the server.  This document
      does not define a new provisioning method, but describes how these
      existing specifications are organized to support IPv4 provisioning
      for Lightweight 4over6.</t>

      <t>The architecture which is described in this document can be implemented
      with or without the sharing of IPv4 addresses between multiple clients.
      If IPv4 address sharing is required, then <xref target="I-D.ietf-dhc-dynamic-shared-v4allocation"/>
      describes the changes necessary extensions to the DHCPv4 server and client 
      provisioning for the allocation and lease management of shared IPv4
      addresses.</t> 
    </section>
    
    <section title="Terminology">
      <t>Terminology defined in <xref target="RFC7341"/>
      and <xref target="I-D.ietf-softwire-lw4over6"/> is used extensively in this document.
      </t>
    </section>
	
    <section title="Architecture Overview">
     <t>There are four functional elements which make up the architecture. </t>
      <figure align="center" anchor="structure" title="Dynamic lw4o6 Provisioning Model">
          <artwork><![CDATA[
              ________       __________  
             |        |     |          | 
             | DHCPv6 |     | DHCPv4o6 | 
             | Server |     |  Server  |
             |________|     |__________|
                 |         /           \
              1,2|     3,4/             \ 5
                 |       /               \
              ___|_____ /                 \ _________
             |         |                   |         |
             |  lw4o6  |<----------------->| lwAFTR  |     
             |  Client |     Data Plane    |         |
             |_________|                   |_________|
           ]]></artwork>
           <postamble>The numbers in each of the provisioning flows are described in
            more detail below.</postamble>
        </figure>

     <t>The Lightweight 4over6 provisioning process with DHCPv4o6 proceeds as follows:<list style="numbers">
 
       <t>lwB4 runs DHCPv6<xref target="RFC3315"/> to get the IPv6 address of the DHCP4o6 server</t>
       <t>IPv4 address of lwB4 is provisioned by the DHCP4o6 server through DHCPv4 over DHCPv6<xref target="RFC7341"/></t>
       <t>lwB4 port set is allocated through DHCPv4 over DHCPv6 using Dynamic Allocation of Shared IPv4 Addresses<xref target="I-D.ietf-dhc-dynamic-shared-v4allocation"/></t>
       <t>IPv6 Tunnel source address of the lwB4 is sent to the DHCP4o6 server using DHCPv4 over DHCPv6 Source Address Option<xref target="I-D.fsc-softwire-dhcp4o6-saddr-opt"/></t>
       <t>lwAFTR binding table maintenance is achieved by using DHCP4o6 Bulk/Active Leasequery<xref target="I-D.cui-dhc-dhcp4o6-bulk-active-leasequery"/>
       (or other provisioning protocol)</t>
     </list>
   </t>
	</section>
    
    <section title="Lightweight4over6 Dynamic Provisioning Process">
      <t>This section describes the dynamic provisioning process of Lightweight 4over6 in more
        detail. For the remainder of this document, "lwB4" should be understood to mean a stateful lwB4
         using DHCPv4 over DHCPv6 for dynamic IPv4 provisioning.
      </t>
      <section title="IP Addressing">
        <t>Before begining the DHCPv4 over DHCPv6 to obtain IPv4 configuration,
        the lwB4 MUST be configured with an IPv6 address. There are no restrictions on how the
        IPv6 address is provisioned, (e.g. SLAAC, DHCPv6 or some other mechanisms). However,
        the prefix selected by the lwB4 MUST be routable to the lwAFTR (e.g. a link-local 
        address must not be used). The operator can use the OPTION_DHCP4O6_SADDR_HINT option defined in 
        <xref target="I-D.fsc-softwire-dhcp4o6-saddr-opt"/> to indicate to the client a suitable
        prefix to select the tunnel endpoint address from.</t>
           
        <!-- "The configured IPv6 address is used for IPv6 tunneling and DHCPv4 over DHCPv6 process." 
        This is not correct. The client can perform DHCPV4o6 configuration using either multicast
        (link-local sourced) or unicast (GU sourced). The tunnel endpoint address and the DHCPv4o6
        address are not linked to each other. -->
      
        
        <!-- <t>The softwire provider is free to provide any IPv4 address for a lwB4. There's no restrictions on
           IPv6/IPv4 addressing, e.g. scattered IPv4 addresses can be used, and there's no need for embedding
           IPv4 address/PSID into IPv6 address.
        </t> 
       [if] I've commented the above for now. It needs to be re-worded in a later version.-->
      </section>
      
      <section title="DHCPv6 Configuration">
        <t>Before stateful lwB4 runs DHCPv4 over DHCPv6 to acquire IPv4 address and port set,
        	 lwB4 MUST run DHCPv6 to achieve the DHCP 4o6 server's IPv6 address.
        	 The DHCPv6 server provides the DHCP 4o6 server's IPv6 address by OPTION_DHCP4_O_DHCP6_SERVER
        	 as defined in <xref target="RFC7341"/>.
        </t>
        <!-- <t>
           A stateful lwB4 may also be compatible with [I-D.ietf-softwire-map-dhcp]
           and thus will require both OPTION_DHCP4_O_DHCP6_SERVER and
           OPTION_S46_CONT_LW. The DHCPv6 server decides whether supply
           OPTION_S46_CONT_LW and OPTION_S46_V4V6BIND directly or indicate
           the client to run DHCPv4 over DHCPv6 by supplying OPTION_DHCP4_O_DHCP6_SERVER
           according to its policy. The lwB4 should implement a local logic
           to decide which one it prefers. The strategy of how to decide preferences between
           the provisioning modes is out of the scope of the document.
        </t>
        I'm commenting this out for now as it is more complex than this. The DHCP server doesn't
        have the logic for making this decision so we need to look for another solution -->
      </section>
      
      <section title="DHCPv4 over DHCPv6 Function">
        <t>Once the lwB4 has acquired the IPv6 address of the DHCP4o6 server, stateful configuration using
          DHCPv4 over DHCPv6 is performed to obtain an IPv4 address and port set. 
          <xref target="I-D.ietf-dhc-dynamic-shared-v4allocation"/> describes how 
          the PSID is conveyed in this mechanism. The lwB4 includes one of its IPv6 address as the IPv6
          tunnel source address in this message flow with the DHCP 4o6 server, and receives the lwAFTR's
          tunnel address through DHCPv4 over DHCPv6, as described in section 4 of
          <xref target="I-D.fsc-softwire-dhcp4o6-saddr-opt"/>.</t>
      </section>

      
      <section title="lwAFTR Binding Table Maintenance">
     
        <t>In figure 1 above, the lwAFTR is not co-located with the DHCP 4o6 server.  With this
          architecture, the DHCP 4o6 server informs the lwAFTR about changes in IPv4 leases and the
          bound tunnel endpoint addresses using the DHCP4o6 Bulk and Active Leasequery process (described
          in <xref target="I-D.cui-dhc-dhcp4o6-bulk-active-leasequery"/>).</t>

          <t>The lwAFTR functions as a requestor, requesting every active lwB4's IPv4 address + PSID, and 
            bound tunnel endpoint IPv6 address. The lwAFTR can use DHCP4o6 Bulk Leasequery to initialize
            its binding table with current lwB4 binding information, or recover missing lease information
            from failure. The lwAFTR can use DHCP4o6 Active Leasequery to get real-time lwB4 binding
            information.</t>

      <!-- [if] I'm not that familiar with the active leasequery process, but does there need to be a
      trigger event for the lwAFTR to make the active leasequery request? If so, what is this event?
      receiving a packet without a matching binding table entry would be a possiblity, but this could be
      easily abused for a DDoS. There would also be no way of getting the entries to expire. I need to
      read up more on active leasequery!-->
        

       <section title="Co-located lwAFTR/DHCP4o6 Binding Table Maintenance">
        <t>lwAFTR maintains its binding table as per section 6.1 of <xref target="I-D.ietf-softwire-lw4over6"/>.
        Unless the binding table is fixed and pre-determined, it is synchronized with DHCPv4 over DHCPv6 process.
        The following DHCPv4 over DHCPv6 messages trigger binding table modification: 
         <list style="symbols">
           <t>DHCPACK: Generated by DHCP 4o6 server, triggers lwAFTR to add a new entry or modify an existing entry.</t>
           <t>DHCPRELEASE: Generated by lwB4, triggers lwAFTR to delete an existing entry.</t>
          </list>
        </t>

        <t>When lwAFTR receives a DHCPACK event, it looks up the binding table using the lwB4's IPv4 address and PSID as index.
           If there is an existing entry found, the lwAFTR updates the IPv6 address and lifetime fields of the entry; otherwise
           the lwAFTR creates a new entry accordingly. When lwAFTR receives a DHCPRELEASE event, it looks up the binding
           table using the lwB4's IPv6 address, IPv4 address and PSID as index. The lwAFTR deletes the entry either by
           removing it from the binding table or mark the lifetime field to an invalid value (e.g. 0). </t>

        <t>When lwAFTR is co-located with the DHCP 4o6 server, it listens all DHCPv4 over DHCPv6 messages generated or received
        by the DHCP 4o6 server and updates the bindings through valid messages.</t>

        </section>
        <section title="lwAFTR Binding Table Maintenance with NETCONF">
  		<t>NETCONF <xref target="RFC6241"/> can also be used for lwAFTR binding table maintenance.
         The data model for lw4o6 is defined in <xref target="I-D.sun-softwire-yang"/>. When NETCONF is used, the DHCP 4o6 server
         is integrated with NETCONF client and the lwAFTR is integrated with NETCONF server. When the address allocation state 
         is changed due to the DHCPACK/DHCPRELEASE, the DHCP 4o6 server initiates NETCONF edit-config operations to the lwAFTR to send
         notifications of binding table modification.</t>
		

        </section>		
      </section>

    </section>

    <section title="Security Considerations">
      <t>Security considerations in <xref target="I-D.ietf-softwire-lw4over6"/> and <xref target="RFC7341"/> should be considered.
      </t>
      <t>The DHCP message triggered binding table maintenance may be used by an attacker to send fake DHCP messages to lwAFTR.
         The operator network should deploy <xref target="RFC2827"/> to prevent this kind of attack.
      </t>
    </section>
    
    <section title="IANA Considerations">
    <t>This document does not include an IANA request.</t>
    </section>

</middle>

<back>

    <references title="Normative References">
      &I-D.ietf-softwire-lw4over6;
      &RFC7341;
      &I-D.ietf-dhc-dynamic-shared-v4allocation;
      &I-D.fsc-softwire-dhcp4o6-saddr-opt;
      &I-D.cui-dhc-dhcp4o6-bulk-active-leasequery;	  
      &bcp38;
    </references>
    <references title="Informative References">
      &rfc3315;
      &rfc6887;
      &I-D.ietf-softwire-map-dhcp;
      &rfc6241;
      &I-D.sun-softwire-yang;
      <!--&I-D.ietf-pcp-port-set;-->
      <!--&I-D.perreault-softwire-lw4over6-pcp;-->
    </references>
</back>
</rfc>

