<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc    SYSTEM "rfc2629.dtd" [


<!--ENTITY I-D.mathis-frag-harmful   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.mathis-frag-harmful.xml"-->


]> 
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->

 <rfc category="std" ipr="trust200902" docName="draft-ietf-6lo-fragment-recovery-01"  updates="4944">  

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>

    <front>
        <title>6LoWPAN Selective Fragment Recovery</title>
   <author fullname="Pascal Thubert" initials="P." role="editor" surname="Thubert">
      <organization abbrev="Cisco Systems">Cisco Systems, Inc</organization>
      <address>
         <postal>
            <street>Building D</street>
            <street>45 Allee des Ormes - BP1200 </street>
            <city>MOUGINS - Sophia Antipolis</city>
            <code>06254</code>
            <country>FRANCE</country>
         </postal>
         <phone>+33 497 23 26 34</phone>
         <email>pthubert@cisco.com</email>
      </address>
   </author>
   
        <date/>

	<area>Internet</area>

	<workgroup>6lo</workgroup>

        <abstract>
	  <t><!--
        Considering that an LLN frame can have a MAC payload below 100 bytes, an
        IPv6 packet might be fragmented into more than 10 fragments at the 
        6LoWPAN layer. 
        RFC 4944 provides a fragmentation technique that cannot detect the loss
        of a fragments be lost along the path, and when a fragment is lost,
        all fragments must be resent, potentially contributing to the congestion
        that caused the initial fragment loss. -->
        This draft updates RFC 4944 with a simple protocol to recover individual
        fragments across a route-over mesh network, with a minimal flow control
        to protect the network against bloat.
	  </t>
	</abstract>
    </front>

    <middle>

	<section anchor='introduction' title="Introduction">

      
	  <t>

        In most Low Power and Lossy Network (LLN) applications, the bulk of
        the traffic consists of small chunks of data (in the order few bytes
        to a few tens of bytes) at a time.  Given that an 
        <xref target="IEEE.802.15.4"> IEEE Std. 802.15.4 </xref>
        frame can carry 74 bytes or more in all cases, fragmentation is
        usually not required.  However, and though this happens only
        occasionally, a number of mission critical applications do require
        the capability to transfer larger chunks of data, for instance to
        support a firmware upgrades of the LLN nodes or an extraction of logs
        from LLN nodes.  In the former case, the large chunk of data is
        transferred to the LLN node, whereas in the latter, the large chunk
        flows away from the LLN node.  In both cases, the size can be on the
        order of 10Kbytes or more and an end-to-end reliable transport is
        required.
	  </t>
	  <t>
	    <xref target="RFC4944">"Transmission of IPv6 Packets over IEEE 802.15.4
        Networks"</xref> defines the original 6LoWPAN datagram fragmentation
        mechanism for LLNs. One critical issue with this original design is that
        routing an IPv6 <xref target="RFC8200"/> packet across a route-over mesh
        requires to reassemble the full packet at each hop, which may cause
        latency along a path and an
        overall buffer bloat in the network. 
        The <xref target="I-D.ietf-6tisch-architecture">"6TiSCH Architecture"</xref>
        recommends to use a hop-by-hop fragment forwarding technique to alleviate
        those undesirable effects. <xref target="I-D.watteyne-6lo-minimal-fragment">
        "LLN Minimal Fragment Forwarding"</xref> proposes such a technique, in a 
        fashion that is compatible with <xref target="RFC4944"/> without the
        need to define a new protocol.
        However, adding that capability alone to the local implementation of the
        original 6LoWPAN fragmentation would not address the bulk of the issues
        raised against it, and may create new issues like remnant state in
        the network.
	  </t>
	  <t>
        Another issue against <xref target="RFC4944"/> is that it 
        does not define a mechanism to first discover the loss of a fragment
        along a multi-hop path (e.g. having exhausted the link-layer retries at
        some hop on the way), and then to recover that loss. With RFC 4944, the
        forwarding of a whole datagram fails when one fragment is not delivered
        properly to the destination 6LoWPAN endpoint. End-to-end transport or
        application-level mechanisms may require a full retransmission of the
        datagram, wasting resources in an already constrained network.
        
	  </t>
	  <t>
        In that situation, the source 6LoWPAN endpoint will not be aware that a
        loss occurred and will continue sending all fragments for a datagram that
        is already doomed. The original support is missing signaling to abort a
        multi-fragment transmission at any time and from either end, and, if the
        capability to forward fragments is implemented, clean up the related
        state in the network. It is also lacking flow control capabilities to
        avoid participating to a congestion that may in turn cause the loss
        of a fragment and trigger the retransmission of the full datagram.
        
	  </t>
	  <t>
        This specification proposes a method to forward fragments across a
        multi-hop route-over mesh, and to recover individual fragments between
        LLN endpoints. The method is designed to limit congestion loss in the
        network and addresses the requirements that are detailed in
        <xref target="req"/>.

	  </t>



    </section>

	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->

    <section title="Updating RFC 4944">
    
    <t>This specification updates the fragmentation mechanism that is 
    specified in <xref target="RFC4944">"Transmission of IPv6 Packets over
    IEEE 802.15.4 Networks"</xref> for use in route-over
    LLNs by providing a model where fragments can be forwarded 
    end-to-end across a 6LoWPAN LLN, and where fragments that are lost on
    the way can be recovered individually. 
    A new format for fragment is introduces and new dispatch types are defined
    in <xref target="dispatch"/>.
    </t>    
    
    <t>
    <xref target="RFC8138"/> allows to modifies the size of a packet en-route by
    removing the consumed hops in a compressed Routing Header. It results that
    the fragment_offset and datagram_size cannot be signaled in the uncompressed
    form. This specification expresses those fields in the compressed form and
    allows to modify them en-route (see <xref target="mod"/>.    
    </t>
    
    <t>
    Note that consistantly with in Section 2 of <xref target="RFC6282"/> for the
    fragmentation mechanism described in Section 5.3 of <xref target="RFC4944"/>,
    any header that cannot fit within the first fragment MUST NOT be compressed
    when using the fragmentation mechanism described in this specification.
    </t>
    
    <section title="Updating draft-watteyne-6lo-minimal-fragment">
    
    <t>This specification updates the fragment forwarding mechanism specified in
    <xref target="I-D.watteyne-6lo-minimal-fragment">
    "LLN Minimal Fragment Forwarding"</xref> by providing additional operations
    to improve the management of the Virtual Reassembly Buffer (VRB).
    </t>    
    
    
    </section> <!--  title="Compressed Headers in First Fragment" -->
    
    
    <section title="Slack in the First Fragment">
    
    <t>At the time of this writing,
    <xref target="I-D.watteyne-6lo-minimal-fragment"/> allows for refragmenting
    in intermediate nodes, meaning that some bytes from a given fragment may be
    left in the VRB to be added to the next fragment. The reason for this to
    happen would be the need for space in the outgoing fragment that was not
    needed in the incoming fragment, for instance because the 6LoWPAN Header
    Compression is not as efficient on the outgoing link, e.g., if the Interface
    ID (IID) of the source IPv6 address is elided by the originator on the first
    hop because it matches the source MAC address, but cannot be on the next
    hops because the source MAC address changes.
    </t>
    <t>
    This specification cannot allow this operation since fragments are recovered 
    end-to-end based on the fragment number. This means that the fragments that
    contain a 6LoWPAN-compressed header MUST have enough slack to enable a less
    efficient compression in the next hops that still fits in one MAC frame. For
    instance, if the IID of the source IPv6 address is elided by the originator,
    then it MUST compute the fragment_size as if the MTU was 8 bytes less.
    This way, the next hop can restore the source IID to the first fragment
    without impacting the second fragment.
    </t>
    
    </section> <!-- title="Slack in the First Fragment" -->
    
    
    
    <section anchor="mod" title="Modifying the First Fragment">
    
    <t>
    The compression of the Hop Limit, of the source and destination addresses,
    and of the Routing Header may change en route in a Route-Over mesh network.  
    If the size of the first fragment is modified, then the intermediate node
    MUST adapt te datagram_size to reflect that difference. 
    </t>
    
    <t>
    The intermediate node MUSt also save the difference of datagram_size of the
    first fragment in the VRB, and add it to the datagram_size and to the
    fragment_offset of all the subsequent fragments for that datagram.
    </t>
    </section> <!--  title="Modifying the First Fragment" -->
    
    
    
    </section> <!-- itle="Updating draft-watteyne-6lo-minimal-fragment" -->

	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->

<section title="Terminology">
<section anchor='bcp' title="BCP 14">
<t>

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
    "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in BCP 14
    <xref target="RFC2119"/><xref target="RFC8174"/> when, and only when, they
    appear in all capitals, as shown here.

</t>
</section>	<!-- end section "BCP 14" -->


  <section anchor='lo' title="References">
    <t>
	In this document, readers will encounter terms and concepts
	that are discussed in the following documents:
	<list style="symbols">

	<t> <xref target="RFC6606">"Problem Statement and Requirements for
		IPv6 over Low-Power Wireless Personal Area Network (6LoWPAN)
		Routing" </xref> </t>
	</list>
    </t>
  </section>	<!-- end section "References" -->

<section anchor='acronyms' title="6LoWPAN Acronyms">
    <t> This document uses the following acronyms:
       <list hangIndent="6" style="hanging">
       <t hangText="6BBR:"> 6LoWPAN Backbone Router </t>
       <t hangText="6LBR:"> 6LoWPAN Border Router </t>
       <t hangText="6LN:"> 6LoWPAN Node  </t>
       <t hangText="6LR:"> 6LoWPAN Router </t>
       <t hangText="LLN:"> Low-Power and Lossy Network </t>
       </list>
    </t>
</section>	<!-- end section "Acronym Definitions" -->


  <section title="Referenced Work">
  <t>
	  	<!--
		Lessons about fragmentation were learnt with IPv4 that lead to <xref target="RFC8201"> the
		Path MTU discovery</xref>. 
		-->
		Past experience with fragmentation has shown that miss-associated or lost
        fragments can lead to poor network behavior and, occasionally, trouble
        at application layer. The reader is encouraged to read
		<xref target="RFC4963">"IPv4 Reassembly Errors at High Data Rates"</xref>
        and follow the references for more information.
        </t>
        <t>
		That experience led to the definition of <xref target="RFC8201">"Path
        MTU discovery"</xref> (PMTUD) protocol that limits fragmentation over the
        Internet. 
        </t>
        <t>
		Specifically in the case of UDP, valuable additional information can be
        found in <xref target="RFC8085">"UDP Usage Guidelines for Application
        Designers"</xref>.
	  </t>
	    <t>Readers are expected to be familiar with all the terms and concepts
	    that are discussed in <xref target="RFC4919">"IPv6 over Low-Power
	    Wireless Personal Area Networks (6LoWPANs): Overview, Assumptions,
	    Problem Statement, and Goals"</xref> and <xref target="RFC4944">
	    "Transmission of IPv6 Packets over IEEE 802.15.4 Networks"</xref>.
           </t>	
	 <t><xref target="RFC8087">
        "The Benefits of Using Explicit Congestion Notification (ECN)"</xref>
        provides useful information on the potential benefits and pitfalls of
        using ECN.
           </t>	
           
	 <t>Quoting the <xref target="RFC3031">
        "Multiprotocol Label Switching (MPLS) Architecture"</xref>: with MPLS, 
        "packets are "labeled" before they are forwarded.
        At subsequent hops, there is no further analysis of the packet's
        network layer header.  Rather, the label is used as an index into a
        table which specifies the next hop, and a new label". The MPLS 
        technique is leveraged in the present specification to forward 
        fragments that actually
        do not have a network layer header, since the fragmentation occurs below
        IP.
           </t>	
	 <t><xref target="I-D.watteyne-6lo-minimal-fragment">
        "LLN Minimal Fragment Forwarding"</xref> introduces the concept of a 
        Virtual Reassembly Buffer (VRB) and an associated technique to forward
        fragments as they come, using the datagram_tag as a label in a fashion 
        similar to MLPS. This specification reuses that technique with slightly
        modified controls.

    </t>
 </section>  <!-- "Referenced Work" -->
 
 <section anchor='new' title="New Terms">

	 <t>
     This specification uses the following terms:
	   <list style="hanging">
	   <t hangText="6LoWPAN endpoints"></t>
	    <t>The LLN nodes in charge of generating or expanding a 6LoWPAN header
        from/to a full IPv6 packet.
		The 6LoWPAN endpoints are the points where fragmentation and reassembly
        take place.
		
	    </t>
	    </list>
		</t>
</section>	<!-- end section "New Terms" -->
</section>	<!-- end section "Terminology" -->




<section anchor="dispatch" title="New Dispatch types and headers">
    <t> This specification enables the 6LoWPAN fragmentation sublayer to 
    provide an MTU up to 2048 bytes to the upper layer, which can be the 
    6LoWPAN Header Compression sublayer
    that is defined in the <xref target="RFC6282">"Compression Format for IPv6
    Datagrams"</xref> specification. In order to achieve this, this specification
    enables the fragmentation and the reliable transmission of fragments over a
    multihop 6LoWPAN mesh network.
    </t>
	<t>This specification provides a technique that is derived from
     MPLS in order to forward individual fragments across a 6LoWPAN route-over mesh.
     The datagram_tag is used as a label; it is locally unique to the 
     node that is the source MAC address of the fragment, so together
     the MAC address and the label can identify the fragment globally. 
     A node may build the datagram_tag in its own locally-significant way,
     as long as the selected tag stays unique to the particular datagram for
     the lifetime of that datagram. 
     It results that the label does not need to be globally unique but also 
     that it must be swapped at each hop as the source MAC address changes. 
    </t>    
	<t>This specification extends <xref target="RFC4944">RFC 4944</xref>
	with 4 new Dispatch types, for Recoverable Fragment (RFRAG)	
	headers with or without Acknowledgment Request (RFRAG vs. RFRAG-ARQ),
    and for the RFRAG Acknowledgment back, with or without ECN Echo
    (RFRAG-ACK vs. RFRAG-ECHO). 
           </t><t>
    (to be confirmed by IANA) The new 6LoWPAN Dispatch types use
    the Value Bit Pattern of 11 1010xx from page 0 <xref target="RFC8025"/>,
    as follows:</t>
	
<figure anchor='difig' title="Additional Dispatch Value Bit Patterns">
<artwork>
           Pattern    Header Type
         +------------+------------------------------------------+
         | 11  101000 | RFRAG       - Recoverable Fragment       |
         | 11  101001 | RFRAG-ARQ   - RFRAG with Ack Request     |
         | 11  101010 | RFRAG-ACK   - RFRAG Acknowledgment       |
         | 11  101011 | RFRAG-ECHO  - RFRAG Ack with ECN Echo    |
         +------------+------------------------------------------+
</artwork>
</figure>

	<t>
	In the following sections, the semantics of "datagram_tag"
	are unchanged from 	<xref target="RFC4944"/> Section 5.3. 
	"Fragmentation Type and Header." and is compatible with the fragment
    forwarding operation described in
    <xref target="I-D.watteyne-6lo-minimal-fragment"/>.
	</t>
    <!--
	<section anchor='RF' title="Recoverable Fragment Dispatch type and Header">

	<t>
	In this specification, the size and offset of the fragments are expressed on
    the compressed packet per the <xref target="RFC6282">"Compression Format for
    IPv6 Datagrams"</xref> specification as opposed to the uncompressed - native
    packet - form. 
    </t>
    <t>
    The first fragment is recognized by a sequence of 0; it carries its
    fragment_size and the datagram_size of the compressed packet, whereas the other
    fragments carry their fragment_size and fragment_offset. The last fragment
    for a datagram is recognized when its fragment_offset and its fragment_size
    add up to the datagram_size.
    

    </t><t>
	Recoverable Fragments are sequenced and a bitmap is used in the RFRAG
    Acknowledgment to indicate the received fragments by setting the individual
    bits that correspond to their sequence.
	</t>
<figure anchor='RFfig1st' title="RFRAG Dispatch type and Header (1st Fragment)">
<artwork>
                           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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1 1 1 0 1 0 0 X| rsv | sequence|         datagram_tag          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    datagram_size    |NBofFrags|R|fragment_size|   
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
                                                 X set == Ack Requested      
</artwork>
</figure>
<figure anchor='RFfignext' title="Recoverable Fragment Dispatch type and Header">
<artwork>
                           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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1 1 1 0 1 0 0 X|         datagram_tag          | rsv | sequence|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                                 X set == Ack Requested      
</artwork>
</figure>
	 <t>
	   <list style="hanging">
	   <t hangText="X:">1 bit; When set, the sender requires an Acknowledgment from the receiver
	    </t>
	   <t hangText="R:">1 bit; Reserved, MUST be set to 0 by the source and
       ignored by all nodes.
	    </t>
	   <t hangText="Fragment_size:">7 bits unsigned integer. The size of this
       fragment in units that depend on the MAC layer technology. 
       For IEEE Std. 802.15.4, the unit is octet.
	    </t>
	   <t hangText="Sequence:">5 bits unsigned integer; 
       the sequence number of the fragment. 
       Fragments are sequence numbered [0..N] where N is in [0..31].
	    </t>
	   <t hangText="Fragment_offset:">10 bits unsigned integer; when set to 0, 
       this field indicates an abort condition; else, its value depends on the
       value of the Sequence. When the sequence is not 0, this field indicates
       the offset of the fragment in the compressed form. When the sequence is 0,
       indicating the first fragment for a datagram, this field is overloaded to
       indicate the total_size of the compressed packet, to help the receiver
       allocate an adapted buffer for the reception and reassembly operations.
	    </t>
	    </list>
		</t>
    </section>
    -->
    
	<section anchor='RF2' title="Recoverable Fragment Dispatch type and Header ">

	<t>
	In this specification, the size and offset of the fragments are expressed on
    the compressed packet form as opposed to the uncompressed - native -
    packet form. 
    </t>
    <t>
    The first fragment is recognized by a sequence of 0; it carries its
    fragment_size and the datagram_size of the compressed packet, whereas the other
    fragments carry their fragment_size and fragment_offset. The last fragment
    for a datagram is recognized when its fragment_offset and its fragment_size
    add up to the datagram_size.
    
    <!--
	An exception is the first fragment for which the fragment_offset field
    carries the size of the uncompressed packet whereas the offset of that 
    particular fragment is implicitly 0.-->
    </t><t>
	Recoverable Fragments are sequenced and a bitmap is used in the RFRAG
    Acknowledgment to indicate the received fragments by setting the individual
    bits that correspond to their sequence.
	</t>
<figure anchor='RFfigalt' title="RFRAG Dispatch type and Header">
<artwork>

                           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
                                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                      |1 1 1 0 1 0 0|E|  datagram_tag |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |X| sequence|   fragment_size   |       fragment_offset         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
                                              X set == Ack Requested      
</artwork>
</figure>

<!-- 


old format:


                        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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1 1 1 0 1 0 0 X|E|fragment_size|         datagram_tag          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |sequence |  fragment_offset    |   
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
   
   
   -->
	 <t>
	   <list style="hanging">
        
        <t hangText="E:">1 bit; Explicit Congestion Notification; the "E" 
       flag is reset by the source of the fragment and set by intermediate
       routers to signal that this fragment experienced congestion along 
       its path.
	    </t>
	   <t hangText="Fragment_size:">10 bit unsigned integer; the size of this
       fragment in a unit that depends on the MAC layer technology. 
       For IEEE Std. 802.15.4, the unit is octet, and the maximum fragment size,
       which is constrained by the maximum frame size of 128 octet minus 
       the overheads of the MAC and Fragment Headers, is not limited by this 
       encoding.
	    </t>
        
	   <t hangText="X:">1 bit; Ack Requested: when set, the sender requires an
       RFRAG Acknowledgment from the receiver.
	    </t>
	   <t hangText="Sequence:">5 bit unsigned integer; 
       the sequence number of the fragment. 
       Fragments are sequence numbered [0..N] where N is in [0..31].
       A sequence of 0 indicates the first fragment in a datagram.
       For IEEE Std. 802.15.4, as long as the overheads enable a fragment size
       of 64 octets or more, this enables to fragment a packet of 2047 octets.
	    </t>
	   <t hangText="Fragment_offset:">16 bit unsigned integer; 
       <list style="symbols"> 
       <t>
       When set to a non-0 value, the semantics of the Fragment_offset depends
       on the value of the Sequence. 
       <list style="symbols">
       <t>
       When the Sequence is not 0, this field indicates the offset of the
       fragment in the compressed form. The fragment should be forwarded based
       on an existing VRB as described in
       <xref target="nf"/>, or silently dropped if none is found.
       </t><t>
       For a first fragment (i.e. with a sequence of 0), this field is overloaded
       to indicate the total_size of the compressed packet, to help the receiver
       allocate an adapted buffer for the reception and reassembly operations.
       This format limits the maximum MTU on a 6LoWPAN link to 2047 bytes, but
       1280 bytes is the recommended value to avoid issues with IPV6 Path MTU
       Discovery <xref target="RFC8201"/>. The fragment should be routed based
       on the destination IPv6 address, and an VRB state should be installed as
       described in <xref target="ff"/>.
       </t>
	    </list>
       </t>
       <t>
       When set to 0, this field indicates an abort condition and all state
       regarding the datagram should be
       cleaned up once the processing of the fragment is complete;
       the processing of the fragment depends on whether there is a VRB already
       established for this datagram, and the next hop is still reachable:
       <list style="symbols"> 
       <t>
       if a VRB already exists and is not broken, the fragment is to be
       forwarded along the associated Label Switched Path (LSP)
       as described in <xref target="nf"/>, but 
       regardless of the value of the Sequence field; 
       </t><t>
       else, if the Sequence is 0, then the fragment is to be routed as
       described in <xref target="ff"/> but no state is conserved afterwards.
       </t>
	    </list>
       If the fragment cannot be forwarded or routed, then an abort RFRAG-ACK
       is sent back to the source.
       </t>
	    </list>
	    </t>
	    </list>
		</t>
    </section>
    
	<section anchor='ackfrag' title="RFRAG Acknowledgment Dispatch type and Header">
	<t>This specification also defines a 4-octet RFRAG Acknowledgment bitmap
       that is used by the reassembling end point
   	   to confirm selectively the reception of individual fragments. A given
	   offset in the bitmap maps one to one with a given sequence number.
	</t>
    <t>The offset of the bit in the bitmap indicates which fragment is acknowledged 
       as follows:
	<figure anchor='dCack3' title="RFRAG Acknowledgment bitmap encoding">
<artwork>                                     
                         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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |           RFRAG Acknowledgment Bitmap                         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ^                   ^
     |                   |    bitmap indicating whether:            
     |                   +--- Fragment with sequence 10 was received 
     +----------------------- Fragment with sequence 00 was received 
</artwork>
</figure>
</t>
<t>    <xref target="dCack2"/> shows an example Acknowledgment bitmap which
       indicates that all fragments from sequence 0 to 20 were received, except
       for fragments 1, 2 and 16 that were either lost or are still in the
       network over a slower path.

<figure anchor='dCack2' title="Expanding 3 octets encoding">
<artwork>                                     
                         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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |1|0|0|1|1|1|1|1|1|1|1|1|1|1|1|1|0|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0|
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
	</t>
	<t>The RFRAG Acknowledgment Bitmap is included in
	a RFRAG Acknowledgment header, as follows:
	</t>
	<figure anchor='ackfig' title="RFRAG Acknowledgment Dispatch type and Header">
<artwork>
   
                           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
                                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                      |1 1 1 0 1 0 1 Y|  datagram_tag |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          RFRAG Acknowledgment Bitmap (32 bits)                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 </artwork>
</figure>

<!--


                        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
                   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                   |1 1 1 0 1 0 1 Y|         datagram_tag          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          RFRAG Acknowledgment Bitmap (32 bits)                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   
   

-->
	 <t>
	   <list style="hanging">
	

	   <t hangText="Y:">1 bit; Explicit Congestion Notification Echo</t>
	   
	    <t>When set, the sender indicates that at least one of the acknowledged fragments
		was received with an Explicit Congestion Notification, indicating that the 
		path followed by the fragments is subject to congestion.
	    </t>

	   <t hangText="RFRAG Acknowledgment Bitmap"></t>
	    <t>An RFRAG Acknowledgment Bitmap, whereby setting the bit at offset x 
        indicates that fragment x was received, as shown in <xref target="dCack3"/>.
        All 0's is a NULL bitmap that indicates that the fragmentation process is aborted. 
        All 1's is a FULL bitmap that indicates that the fragmentation process is complete,
        all fragments were received at the reassembly end point.
	    </t>
	    </list>
		</t>
    </section>
	
    </section>


    <section anchor="ffc" title="Fragments Recovery">

	<t>
	The Recoverable Fragment headers RFRAG and RFRAG-ARQ are used to transport
    a fragment and optionally request an RFRAG Acknowledgment that will confirm
    the good reception of a one or more fragments. 
    An RFRAG Acknowledgment can optionally carry an ECN indication; it is    
    carried as a standalone header in a message that is sent back to the
    6LoWPAN endpoint that was the source of the fragments, as known by its MAC
    address. The process ensures that at every hop, the source MAC address and 
    the datagram_tag in the received fragment are enough information to send the
    RFRAG Acknowledgment back towards the source 6LoWPAN endpoint by reversing
    the MPLS operation.
	</t>
	<t>	The 6LoWPAN endpoint that fragments the packets at 6LoWPAN level 
    (the sender) also controls when the reassembling end point sends the RFRAG 
    Acknowledgments by setting the Ack Requested flag in the RFRAG packets. 
    
    It may set the Ack Requested flag on any fragment to perform congestion
    control by limiting the number of outstanding fragments, which are
    the fragments that have been sent but for which reception or loss
    was not positively confirmed by the reassembling endpoint.
    
	When the sender of the fragment knows that an underlying link-layer
    mechanism protects the Fragments, it may refrain from using the RFRAG 
    Acknowledgment mechanism, and never set the Ack Requested bit. 
    When it receives a fragment with the ACK Request flag set, the 6LoWPAN 
    endpoint that reassembles the packets at 6LoWPAN level (the receiver) sends
    back an RFRAG Acknowledgment to confirm reception of all the fragments it has
    received so far.
    <!--, though it may slightly defer it to let additional packets in.-->

	</t>


	
	<!--t>A mechanism based on TCP congestion avoidance dictates the maximum number of outstanding fragments.
	</t>

	<t>
	</t>

	<t>
	The maximum number of outstanding fragments for a given packet toward a given LoWPAN
	endpoint is initially set to a configured value, unless recent history indicates
	otherwise. 
	</t>	
	<t> Each time that maximum number of fragments is fully acknowledged, that
	number can be incremented by 1. ECN echo and packet loss cause the number to
	be divided by 2.
	</t-->	
	<t> 
	The sender transfers a controlled number of fragments and MAY flag the last
	fragment of a series with an RFRAG Acknowledgment Request. The received MUST
    acknowledge a 
	fragment with the acknowledgment request bit set. If any fragment immediately preceding
	an acknowledgment request is still missing, the receiver MAY intentionally 
	delay its acknowledgment to allow in-transit fragments to arrive. Delaying the acknowledgment
	might defeat the round trip delay computation so it should be configurable and not enabled 
	by default.

	</t>
	<t>The receiver MAY issue unsolicited acknowledgments. 
    An unsolicited acknowledgment signals to the 
	sender endpoint that it can resume sending if it had reached its maximum number
	of outstanding fragments. Another use is to inform that the reassembling
    endpoint has canceled the process of an individual datagram.
    Note that acknowledgments might consume precious resources so the use of
    unsolicited acknowledgments should be configurable and not enabled by 
    default.
	</t>
	<t> 
    An observation is that streamlining forwarding of fragments generally 
    reduces the latency over the LLN mesh, providing room for retries within
    existing upper-layer reliability mechanisms.
	The sender protects the transmission over the LLN mesh with a retry timer
    that is computed according to the method detailed in <xref target="RFC6298"/>. 
    It is expected that the upper layer retries obey the recommendations in
    <xref target="RFC8085">"UDP Usage Guidelines"</xref>, in which case a single
    round of fragment recovery should fit within the upper layer recovery timers.
	</t>	
	<!--t> It divides the maximum number of 
	outstanding fragments by 2 and resets the number of outstanding fragments to 0. 
	</t-->

	<t>Fragments are sent in a round robin fashion: the sender sends all the fragments for a first time
	before it retries any lost fragment; lost fragments are retried in sequence, oldest first. 
	This mechanism enables the receiver to acknowledge fragments that were delayed in the network
	before they are actually retried.
	</t>
	
	<t>
    When a single frequency is used by contiguous hops, the sender should wait a reasonable amount of time
    between fragments so as to let a fragment progress a few hops and avoid hidden terminal issues.
    This precaution is not required on channel hopping technologies such as Time Slotted CHannel Hopping (TSCH)
    <xref target="RFC6554"/>
    </t>
	
	<t>    
    When the sender decides that a packet should be dropped and the fragmentation process canceled, it sends a 
	pseudo fragment with the fragment_offset, sequence and fragment_size all set to 0, and no data.
	Upon reception of this message, the receiver should clean up all resources for the packet
	associated to the datagram_tag. If an acknowledgment is requested, the receiver responds with a NULL bitmap.
	</t>
	<t>The receiver might need to cancel the process of a fragmented packet for internal reasons, for instance if
	it is out of reassembly buffers, or considers that this packet is already fully reassembled and passed
	to the upper layer. In that case, the receiver SHOULD indicate so to the sender with a NULL bitmap in a RFRAG Acknowledgment.
	Upon an acknowledgment with a NULL bitmap, the sender endpoint MUST abort the transmission of the fragmented datagram.
	</t>
    </section>
        
<section title="Forwarding Fragments">
    <t> 	
    It is assumed that the first Fragment is large enough to carry the IPv6 header and make
    routing decisions. If that is not so, then this specification MUST NOT be used.
    </t>
	<t> This specification extends the Virtual Reassembly Buffer (VRB) technique
      to forward fragments with no intermediate reconstruction of the entire packet.
      The first fragment carries the IP header and it is routed all the way 
      from the fragmenting end point to the reassembling end point.
      Upon the first fragment, the routers along the path install a label-switched
      path (LSP), and the following fragments are label-switched along that path. 
      As a consequence, alternate routes not possible for individual fragments.
      The datagram_tag is used to carry the label, that is swapped at each hop.
      All fragments follow the same path and fragments are delivered in the order
      at which they are sent.
	</t>

<section anchor="ff" title="Upon the first fragment">
	<t>
	In Route-Over mode, the source and destination MAC addressed in a frame 
    change at each hop.  The label that is formed and placed in the 
    datagram_tag is	associated to the source MAC and only valid (and unique)
    for that source MAC. 
    Upon a first fragment (i.e. with a sequence of zero), a VRB and the associated
    LSP state are created for the tuple (source MAC address, datagram_tag) and the
    fragment is forwarded along the IPv6 route that matches the destination IPv6
    address in the IPv6 header as prescribed by
    <xref target="I-D.watteyne-6lo-minimal-fragment"/>. The LSP state enables to
    match the (previous MAC address, datagram_tag) in an incoming fragment 
    to the tuple (next MAC address, swapped datagram_tag) used in the
    forwarded fragment and points at the VRB.
    In addition, the router also forms a Reverse LSP state indexed by the MAC 
    address of the next hop and the swapped datagram_tag. This reverse LSP state
    also points at the VRB and enables to match the (next MAC address,
    swapped_datagram_tag) found in an RFRAG Acknowledgment to the tuple
    (previous MAC address, datagram_tag) used when forwarding a Fragment
    Acknowledgment (RFRAG-ACK) back to the sender endpoint.
    <!--
    
    Say the first fragment has:
	<list  style="symbols">
		<t>Source IPv6 address = IP_A (maybe hops away) </t>
		<t>Destination IPv6 address = IP_B (maybe hops away) </t>
		<t>Source MAC = MAC_previous </t>
		<t>Datagram_tag= DT_previous</t>
	</list>
	</t>
	<t>
    The intermediate router that forwards individual fragments performs the following action:
		<list  style="numbers">
		<t>a route lookup to get the Next hop IPv6 towards IP_B, which resolves as IP_next.</t>
		<t>a MAC address resolution to get the MAC address associated to IP_next, which resolves as MAC_next</t>

	</list>
	</t>
	<t>Since it is a first fragment of a packet from that source MAC address MAC_previous for that tag DT_previous,
	the router:
		<list style="numbers">
		<t>cleans up any leftover resource associated to the tuple (MAC_previous, DT_previous)</t>
		<t>allocates a new label for that flow, DT_next, from a Least Recently Used pool or
		some similar procedure.</t>
		<t>allocates an abstract label-swap entry indexed by (MAC_previous, DT_previous) that contains (MAC_next, DT_next)</t>
		<t>allocates a reflective abstract label-swap structure indexed by (MAC_next, DT_next) that contains (MAC_previous, DT_previous); this enables the reverse MPLS switching operation that is used to route the RFRAG-ACK.</t>
		<t>change the source MAC address from MAC_prev to MAC_self </t>
		<t>change the destination MAC address to from MAC_self to MAC_next </t>
		<t>Swaps the datagram_tag to DT_next</t>
	</list>
	At this point the router is all set and can forward the fragment to next.
	
	</t>
    -->
	
	</t>
	</section>
<section anchor="nf" title="Upon the next fragments">
	<t>Upon a next fragment (i.e. with a non-zero sequence), the router looks up
    a LSP indexed by the tuple (MAC address, datagram_tag) found in the fragment.
    If it is found, the router forwards the fragment using the associated VRB as
    prescribed by <xref target="I-D.watteyne-6lo-minimal-fragment"/>.
	<!--list  style="numbers">
		<t>looks up the label-swap entry for (MAC_previous, DT_previous), which resolves as (MAC_next, DT_next)</t>
		<t>swaps the MAC info to from self to MAC_next; </t>
		<t>Swaps the datagram_tag to DT_next</t>
	</list-->
	</t>
	<t> if the VRB for the tuple is not found, the router builds an RFRAG-ACK
    to abort the transmission of the packet. The resulting
    message has the following information:
	<list style="symbols">
		<t>The source and destination MAC addresses are swapped from those found 
        in the fragment</t>
		<t>The datagram_tag set to the datagram_tag found in the fragment</t>
		<t>A null bitmap is used to signal the abort condition</t>
	</list>
	At this point the router is all set and can send the RFRAG-ACK back to
    the previous router. The RFRAG-ACK should normally be forwarded all the way
    to the source using the reverse LSP state in the VRBs in the intermediate
    routers as described in the next section.
	</t>

	</section>
<section title="Upon the RFRAG Acknowledgments">

	<t>Upon an RFRAG-ACK, the router looks up a Reverse LSP indexed by the tuple
    (MAC address, datagram_tag), which are respectively the source MAC address
    of the received frame and the received datagram_tag. 
    If it is found, the router forwards the fragment using the associated VRB as
    prescribed by <xref target="I-D.watteyne-6lo-minimal-fragment"/>, but using
    the Reverse LSP so that the RFRAG-ACK flows back to the sender endpoint.
    </t>
    <!--
    DT_next should have been computed by this router and this router should have
    assigned it to this particular datagram. The router:
	<list  style="numbers">
		<t>looks up the label-swap entry for (MAC_next, DT_next), which resolves as (MAC_previous, DT_previous)</t>
		<t>swaps the MAC info to from self to MAC_previous; </t>
		<t>Swaps the datagram_tag to DT_previous</t>
	</list>
	At this point the router is all set and can forward the RFRAG-ACK to previous.
	</t>
	-->
	<t>If the Reverse LSP is not found, the router MUST silently drop the RFRAG-ACK message.</t>
	
	<t>Either way, if the RFRAG-ACK indicates either an error (NULL bitmap) or
    that the fragment was entirely received (FULL bitmap), arms a short timer,
    and upon timeout, the VRB and all associate state are destroyed. During that
    time, fragments of that datagram may still be received, e.g. if the RFRAG-ACK
    was lost on the way back and the source retried the last fragment. In that
    case, the router sends an abort RFRAG-ACK along the Reverse LSP 
    to complete the clean up.</t>


    </section> </section> 
    <section title="Security Considerations">
	<t>	The process of recovering fragments does not appear to create any opening for new threat compared to
	<xref target="RFC4944"> "Transmission of IPv6 Packets over IEEE 802.15.4 Networks"</xref>.
	</t>
        </section>
        <section title="IANA Considerations">
        <t>Need extensions for formats defined in <xref target="RFC4944">
	    "Transmission of IPv6 Packets over IEEE 802.15.4 Networks"</xref>.
		</t>
        </section>


<section title="Acknowledgments">
<t>The author wishes to thank Thomas Watteyne and Michael Richardson
 for in-depth reviews and comments.
Also many thanks to Jonathan Hui, Jay Werb, Christos Polyzois, Soumitri Kolavennu, 
Pat Kinney, Margaret Wasserman, Richard Kelsey, Carsten Bormann and
Harry Courtice for their various contributions.</t>
</section>

    </middle> 

    <back>
    <references title='Normative References'>

	  <?rfc include="reference.RFC.2119"?>
	  <?rfc include="reference.RFC.4944"?>
	  <?rfc include="reference.RFC.6282"?>
	  <?rfc include="reference.RFC.6554"?>
	  <?rfc include="reference.RFC.8025"?>
	  <?rfc include="reference.RFC.8138"?>
	  <?rfc include="reference.RFC.8174"?>
      <?rfc include='reference.I-D.watteyne-6lo-minimal-fragment'?>   
    </references>

    <references title='Informative References'>

	  <?rfc include="reference.RFC.8201"?>
	  <?rfc include="reference.RFC.7567"?>
	  <?rfc include="reference.RFC.3031"?>
	  <?rfc include="reference.RFC.5681"?>
	  <?rfc include="reference.RFC.2914"?>
	  <?rfc include="reference.RFC.3168"?>
	  <?rfc include="reference.RFC.4919"?>
	  <?rfc include="reference.RFC.4963"?>
	  <?rfc include="reference.RFC.6298"?>
	  <?rfc include="reference.RFC.7554"?>
	  <?rfc include="reference.RFC.8200"?>
	  <?rfc include="reference.RFC.8085"?>
	  <?rfc include="reference.RFC.8087"?>
	  <?rfc include="reference.RFC.6606"?>
      <?rfc include='reference.I-D.ietf-6tisch-architecture'?> 
      <reference anchor="IEEE.802.15.4" target ="http://ieeexplore.ieee.org/document/7460875/">
        <front>
            <title>IEEE Standard for Low-Rate Wireless Networks</title>
            <author>
              <organization>IEEE</organization>
            </author>
            <date/>
        </front>
        <seriesInfo name="IEEE" value="Standard 802.15.4"/>
	    <seriesInfo name="DOI" value="10.1109/IEEE P802.15.4-REVd/D01"/>
   
      </reference>
    </references>
  
	
	<section anchor='rationale' title="Rationale">
	  <t>

	  There are a number of uses for large packets in Wireless Sensor Networks. Such usages
	  may not be the most typical or represent the largest amount of traffic over the LLN;
	  however, the associated functionality can be critical enough to justify extra care for 
	  ensuring effective transport of large packets across the LLN.
	  </t>
	  
	  <t>
	  The list of those usages includes:
          <list style='hanging'>
		  
	     <t hangText="Towards the LLN node:">
		 
          <list style='hanging'>
          
		  <t hangText="Firmware update:">
	       For example, a new version of the LLN node software is downloaded from a system
		   manager over unicast or multicast services.
		   Such a reflashing operation typically involves updating a large number of similar
		   LLN nodes over a relatively short period of time.
		 </t>
	      <t hangText="Packages of Commands:">
	       A number of commands or a full configuration can be packaged as a single message
	       to ensure consistency and enable atomic execution or complete roll back. 
		   Until such commands are fully received and interpreted, the intended operation will not take effect.
	     </t>

		 
		</list>
		
	     </t>
	     <t hangText="From the LLN node:">
        <list style='hanging'>
		  
	     <t hangText="Waveform captures:">
	       A number of consecutive samples are measured at a high rate for a short time and then transferred
		   from a sensor to a gateway or an edge server as a single large report.
	     </t>
	     <t hangText="Data logs:">
	       LLN nodes may generate large logs of sampled data
	       for later extraction. LLN nodes may also generate
	       system logs to assist in diagnosing problems on the
	       node or network.
	     </t>
	     <t hangText="Large data packets:">
	       Rich data types might require more than one fragment.		   
	     </t>
		</list>
		
	     </t>
		</list>
	  </t>
	  <t>
		   Uncontrolled firmware download or waveform upload can easily result in a massive 
		   increase of the traffic and saturate the network. 
		</t>
		<t>
		   When a fragment is lost in transmission, the lack of recovery in 
           the original fragmentation system of RFC 4944 implies that all 
           fragments are resent, further contributing
	       to the congestion that caused the initial loss, and potentially leading to congestion collapse.
		   
	  </t>
	  <t>
		   This saturation may lead to excessive radio interference, or random early discard 
		   (leaky bucket) in relaying nodes. Additional queuing and memory congestion may
		   result while waiting for a low power next hop to emerge from its sleeping state.
		   
			   
	  </t>

	  <!--t>
	    To demonstrate the severity of the problem, consider a
	    fairly reliable 802.15.4 frame delivery rate of 99.9% over
	    a single 802.15.4 hop. The expected delivery rate of a
	    5-fragment datagram would be about 99.5% over a single
	    802.15.4 hop. However, the expected delivery rate would
	    drop to 95.1% over 10 hops, a reasonable network diameter
	    for LLN applications. The expected delivery rate for a
	    1280-byte datagram is 98.4% over a single hop and 85.2%
	    over 10 hops.
	  </t-->

	  <t>
	    Considering that RFC 4944
		defines an MTU is 1280 bytes and that in most incarnations
		(but 802.15.4g) a IEEE Std. 802.15.4 frame can limit the MAC payload
		to as few as 74 bytes, a packet might be fragmented into at
	    least 18 fragments at the 6LoWPAN shim layer.  Taking into
	    account the worst-case header overhead for 6LoWPAN
	    Fragmentation and Mesh Addressing headers will increase
	    the number of required fragments to around 32.  This level
	    of fragmentation is much higher than that traditionally
	    experienced over the Internet with IPv4 fragments.  At the
	    same time, the use of radios increases the probability of
	    transmission loss and Mesh-Under techniques compound that
	    risk over multiple hops.
		<!--n the other hand, Layer
		2 retries alleviate the risk of packet loss but lead to less controlled overall latency, 
		monopolize a hop, and might not be as efficient as trying an alternate path entirely.-->
		
		
	  </t>

    
    	  <t>
	    Mechanisms such as TCP or application-layer segmentation
	    could be used to support end-to-end reliable transport. One
	    option to support bulk data transfer over a frame-size-constrained
		LLN is to set the Maximum Segment Size to fit within the link
	    maximum frame size. Doing so, however, can add significant header
	    overhead to each 802.15.4 frame. 


        In addition, deploying such a mechanism requires that the end-to-end
        transport is aware of the delivery properties of the underlying LLN, 
        which is a layer violation, and difficult to achieve from the far end of 
        the IPv6 network.

</t>

<!--
<t>
The
unreliable nature of wireless communication can decrease datagram
delivery rates and multipath forwarding often leads to out-of-order
delivery. As a result, relying completely on transport or
application-layer segmentation is inefficient in both bandwidth and
energy resources and must be adapted to the properties of 6LoWPAN
networks.
	  </t>
	  <t>
	    An alternative mechanism combines the use of 6LoWPAN
	    fragmentation in addition to transport or
	    application-layer segmentation. Increasing the Maximum
	    Segment Size reduces header overhead by the end-to-end
	    transport protocol. It also encourages the transport
	    protocol to reduce the number of outstanding datagrams,
	    ideally to a single datagram, thus reducing the need to
	    support out-of-order delivery common to LLNs.
	  </t>
-->	  
	</section>
    	<section anchor='req' title="Requirements">
	  <t>
	  	<!--
		Because higher QoS packets might require access to the medium, or because an alternate path
		might be globally more efficient over the LoWPAN at a given point of time, 
		--> 
		For one-hop communications, a number of Low Power and Lossy Network (LLN)
        link-layers propose a local acknowledgment mechanism that is enough to
		detect and recover the loss of fragments. In a multihop environment, an
        end-to-end fragment recovery mechanism might be a good complement to a 
		hop-by-hop MAC level recovery.
	    This draft introduces a simple protocol to recover individual fragments
        between 6LoWPAN endpoints that may be multiple hops away. 
        The method addresses the following requirements of a LLN:
		  
	   <list style="hanging">
	   <t hangText="Number of fragments"></t>
	   
	   <t>The recovery mechanism must support highly fragmented packets, with a maximum of 32 fragments per packet.
	   </t>
	   <t hangText="Minimum acknowledgment overhead"></t>  
	   <t> Because the radio is half duplex, and because of silent time spent in the 
	   various medium access mechanisms, an acknowledgment consumes roughly as many resources as data fragment.  
	    </t><t>The new end-to-end fragment recovery mechanism should be able to acknowledge multiple fragments in a single message and
		not require an acknowledgment at all if fragments are already protected at a lower layer.
		</t>
           
	   <t hangText="Controlled latency"></t>
	   
	   <t>The recovery mechanism must succeed or give up within the time boundary imposed by the recovery process 
	   of the Upper Layer Protocols. 
	   </t>
	   <!--t hangText="Support for out-of-order fragment delivery"></t>  
	   <t> Forwarding over a mesh network with rerouting and load balancing can introduce out-of-sequence packets.</t>
	   <t>The recovery mechanism must account for packets that appear lost but are actually only delayed over a different path.
	    </t-->
           
	   <t hangText="Optional congestion control"></t>  
	   <t> The aggregation of multiple concurrent flows may lead to the saturation of the radio network and congestion collapse.
		</t>
		<t>The recovery mechanism should provide means for controlling the number of fragments in transit over the LLN.
	    </t>
<!--
	   <t hangText="Backward compatibility"></t>  
	   <t> A node that implements this draft should be able to communicate with a node that implements 
	   <xref target="RFC4944"/>. This draft assumes that compatibility information about the
	   remote LLN endpoint is obtained by external means.
	    </t>
-->		
	    </list>
	    </t>
	</section>
    
	<section anchor='overview' title="Considerations On Flow Control">	
	 
	<t>Considering that a multi-hop LLN can be a very sensitive environment
	due to the limited queuing capabilities of a
	large population of its nodes, this draft recommends a simple and
	conservative approach to congestion control, based on TCP congestion avoidance.
	</t>
	<t>	Congestion on the forward path is assumed in case of packet loss, and
    packet loss is assumed upon time out. The draft allows to control the number
    of outstanding fragments, that have been transmitted but for which an 
   acknowledgment was not received yet. It must be noted that the number of
   outstanding fragments should not exceed the number of hops in the network,
   but the way to figure the number of hops is out of scope
   for this document.
	</t>
	<t>	Congestion on the forward path can also be indicated by an Explicit
    Congestion Notification (ECN) mechanism.
	Though whether and how ECN <xref target="RFC3168"/> is carried out over the
    LoWPAN is out of scope, this draft provides a way for the destination
    endpoint to echo an ECN indication back to the source endpoint in an
    acknowledgment message as represented in
	<xref target='ackfig'/> in <xref target='ackfrag'/>.
	</t>
	<t>It must be noted that congestion and collision are different topics. 
   In particular, when a mesh operates on a same channel over multiple hops, 
   then the forwarding of a fragment over a certain hop may collide with the 
   forwarding of a next fragment that is following over a previous hop but in a 
   same interference domain. This draft enables an end-to-end flow control, 
   but leaves it to the sender stack to pace individual fragments within a
   transmit window, so that a given fragment is sent only when the previous 
   fragment has had a chance to progress beyond the interference domain of this
   hop. In the case of
   <xref target="I-D.ietf-6tisch-architecture">6TiSCH</xref>, which operates
   over the 
   <xref target="RFC7554">TimeSlotted Channel Hopping</xref> (TSCH) 
   mode of operation of IEEE802.14.5, a fragment is forwarded over a different 
   channel at a different time and it makes full sense to transmit the next fragment as
   soon as the previous fragment has had its chance to be forwarded at the next 
   hop.
	</t>
	<t>	From the standpoint of a source 6LoWPAN endpoint, an outstanding fragment is a fragment that was
	sent but for which no explicit acknowledgment was received yet. 
	This means that the fragment might be on the way, received but not yet acknowledged, 
	or the acknowledgment might be on the way back. It is also possible that either
	the fragment or the acknowledgment was lost on the way.
	</t>
	<t>From the sender standpoint,
	all outstanding fragments might still be in the network and contribute to its congestion.
	There is an assumption, though, that after a certain amount of time, a frame is either received
    or lost, so it is not causing congestion anymore. This amount of time can be estimated based on the round trip
	delay between the 6LoWPAN endpoints. The method detailed in <xref target="RFC6298"/> is recommended for that computation.
	</t>
	<t>The reader is encouraged to read through <xref target="RFC2914">"Congestion Control Principles"</xref>. 
	Additionally <xref target="RFC7567"/> and <xref target="RFC5681"/> provide deeper information on why this
	mechanism is needed and how TCP handles Congestion Control. Basically, the goal here is to
	manage the amount of fragments present in the network; this is achieved by to reducing the number of outstanding
	fragments over a congested path by throttling the sources.
	</t>
	<t> <xref target="ffc"/> describes how the sender decides how many fragments are (re)sent before
	an acknowledgment is required, and how the sender adapts that number to the network conditions.
		</t>
</section>

    </back>

</rfc>
