<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="no"?>
<?rfc subcompact="no"?>
<?rfc authorship="yes"?>
<?rfc tocappendix="yes"?>
<rfc  xmlns:xi="http://www.w3.org/2001/XInclude" category="std" ipr='trust200902' tocInclude="true"  obsoletes="" updates="4944" consensus="true" submissionType="IETF" xml:lang="en" version="3" docName="draft-ietf-6lo-fragment-recovery-19" >
<front>

   <title abbrev='Selective RFRAG'>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>
        This draft updates RFC 4944 with a protocol to forward individual fragments
        across a route-over mesh and recover them end-to-end, with congestion control
        capabilities to protect the network.
	  </t>
	</abstract>
    </front>

    <middle>

	<section anchor='introduction'><name>Introduction</name>


	  <t>

        In most Low Power and Lossy Network (LLN) applications, the bulk of
        the traffic consists of small chunks of data (on the order of a 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 a payload of 74 bytes or more, 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 the firmware upgrade of the LLN nodes or the extraction of logs
        from LLN nodes.
	  </t>
	  <t>
        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 10 kilobytes 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 the reassembly of the packet at each hop. The
        <xref target='I-D.ietf-6tisch-architecture'>"6TiSCH Architecture"</xref>
        indicates that this may cause latency along a path and impact critical
        resources such as memory and battery; to alleviate those
        undesirable effects it recommends using a 6LoWPAN Fragment Forwarding
        (6FF) technique .
	    </t>
	    <t>
        <xref target='I-D.ietf-6lo-minimal-fragment'>
        "LLN Minimal Fragment Forwarding"</xref> specifies the generic behavior
        that all 6FF techniques including this specification follow, and presents
        the associated caveats. In particular, the routing information is fully
        indicated in the first fragment, which is always forwarded first.
        With this specification, the first fragment is identified by a Sequence
        of 0 as opposed to a dispatch type in <xref target='RFC4944'/>.

        A state is formed and used to forward all the next fragments along the
        same path. The Datagram_Tag is locally significant to the Layer-2 source
        of the packet and is swapped at each hop, more in <xref target='ffc'/>.
        This specification encodes the Datagram_Tag in one byte, which will
        saturate if more than 256 datagrams transit in fragmented
        form over a single hop at the same time.
        This is not realistic at the time of this writing.
        Should this happen in a new 6LoWPAN technology, a node will need to use
        several Link-Layer addresses to increase its indexing capacity.
	  </t>
	  <t>
        <xref target='I-D.ietf-lwig-6lowpan-virtual-reassembly'>
        "Virtual reassembly buffers in 6LoWPAN"</xref>(VRB) proposes a 6FF
        technique 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 inherent fragility
        of fragmentation (see <xref target='I-D.ietf-intarea-frag-fragile'/>) in
        particular the issues of resources locked on the reassembling endpoint and the wasted
        transmissions due to the loss of a single fragment in a whole datagram.
        <xref target='Kent'/> compares the unreliable delivery of fragments with
        a mechanism it calls "selective acknowledgements" that recovers the loss
        of a fragment individually. The paper illustrates the benefits that can
        be derived from such a method in figures 1, 2 and 3, on pages 6 and 7.
        <xref target='RFC4944'/> has no selective recovery and the whole datagram
        fails when one fragment is not delivered to the reassembling  endpoint.
        Constrained memory resources are blocked on the reassembling endpoint until
        it times out, possibly causing the loss of subsequent packets
        that cannot be received for the lack of buffers.
	  </t>
	  <t>
        That problem is exacerbated when forwarding fragments over multiple hops
        since a loss at an intermediate hop will not be discovered by either the
        fragmenting and reassembling endpoints, and the source will keep on sending
        fragments, wasting even more resources in the network since the datagram
        cannot arrive in its entirety, and possibly contributing to the
        condition that caused the loss.
        <xref target='RFC4944'/> is lacking a congestion control to avoid
        participating in a saturation that may have caused the loss of the
        fragment.
        It has no 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.

	  </t>
	  <t>
        This specification provides a method to forward fragments over typically
        a few hops in a route-over 6LoWPAN mesh, and a selective acknowledgment
        to recover individual fragments between 6LoWPAN endpoints. The method
        can help limit the congestion loss in the network and addresses the
        requirements in <xref target='req'/>. Flow Control is out of scope since
        the endpoints are expected to be able to store the full datagram.
        Deployments are expected to be managed and homogeneous, and an
        incremental transition requires a flag day.


	  </t>



    </section>


<section><name>Terminology</name>
<section anchor='bcp'><name>BCP 14</name>
<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'><name>References</name>
    <t>
	This document uses 6LoWPAN terms and concepts
	that are presented in  <xref target='RFC4919'>"IPv6 over Low-Power
	Wireless Personal Area Networks (6LoWPANs): Overview, Assumptions,
	    Problem Statement, and Goals"</xref>, <xref target='RFC4944'>
	    "Transmission of IPv6 Packets over IEEE 802.15.4 Networks"</xref>, and
        <xref target='RFC6606'> "Problem Statement and Requirements for
		IPv6 over Low-Power Wireless Personal Area Network (6LoWPAN)
		Routing" </xref>.
           </t>
	 <t><xref target='I-D.ietf-6lo-minimal-fragment'>
        "LLN Minimal Fragment Forwarding"</xref> discusses the generic concept
        of a  Virtual Reassembly Buffer (VRB) and specifies behaviors
        and caveats that are common to a large family of 6FF techniques
        including the mechanism specified by this document,
        which fully inherits from that specification.
        It also defines terms used in this document:  Compressed Form,
        Datagram_Tag, Datagram_Size, Fragment_Offset, and
        6LoWPAN Fragment Forwarding endpoint (commonly abbreviated as only
        "endpoint").
    </t>


  <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 misassociated or lost
        fragments can lead to poor network behavior and, occasionally, trouble
        at the 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.
		That experience led to the definition of <xref target='RFC8201'>"Path
        MTU discovery"</xref> (PMTUD) protocol that limits fragmentation over the
        Internet.
		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><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' along a Label Switched
        Path (LSP).
        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".
        <xref target='I-D.ietf-6lo-minimal-fragment'/> leverages
        MPLS to forward fragments that actually
        do not have a network layer header, since the fragmentation occurs below
        IP, and this specification makes it reversible so the reverse path can
        be followed as well.
           </t>

  </section>	<!-- end section "References" -->

 <section anchor='new'><name>Other Terms</name>

	<t>
    This specification uses the following terms:
      </t><dl>

       <dt>RFRAG:</dt><dd>Recoverable Fragment
	    </dd>
       <dt>RFRAG-ACK:</dt><dd>Recoverable Fragment Acknowledgement
	    </dd>
       <dt>RFRAG Acknowledgment Request:</dt><dd>An RFRAG with the
       Acknowledgement Request flag ('X' flag) set.
	    </dd>
       <dt>NULL bitmap:</dt><dd>Refers to a bitmap with all bits set to zero.
	    </dd>
       <dt>FULL bitmap:</dt><dd>Refers to a bitmap with all bits set to one.
	    </dd>
       <dt>Reassembling endpoint:</dt><dd>The receiving endpoint
	    </dd>
       <dt>Fragmenting endpoint:</dt><dd>The sending endpoint
	    </dd>
       <dt>Forward direction:</dt><dd>The direction of a path, which is followed by the RFRAG.
	    </dd>
       <dt>Reverse direction:</dt><dd>The reverse direction of a path, which is taken by the
       RFRAG-ACK.
	    </dd>
	  </dl><t>
    </t>
</section>	<!-- end section "New Terms" -->
</section>	<!-- end section "Terminology" -->



	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->

    <section><name>Updating RFC 4944</name>

    <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 fragments is introduced and new dispatch types are defined
    in <xref target='dispatch'/>.
    </t>

    <t>
    <xref target='RFC8138'/> allows modifying the size of a packet en route by
    removing the consumed hops in a compressed Routing Header. This requires that
    Fragment_Offset and Datagram_Size (see <xref target='new'/>) are also
    modified en route, which is difficult to do in the uncompressed form.
    This specification expresses those fields in the Compressed Form and
    allows modifying them en route (see <xref target='mod'/>) easily.
    </t>

    <t>
    Consistently with 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 RFC 4944" -->

    <section><name>Extending draft-ietf-6lo-minimal-fragment</name>

    <t>This specification implements the generic 6FF technique defined in
    <xref target='I-D.ietf-6lo-minimal-fragment'>
    "LLN Minimal Fragment Forwarding"</xref>, provides end-to-end fragment
    recovery and congestion control mechanisms.
    </t>


    <section><name>Slack in the First Fragment</name>

    <t>
    <xref target='I-D.ietf-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 need for more space in
    the outgoing fragment than was needed for the incoming fragment arises when
    the 6LoWPAN Header Compression is not as efficient on the outgoing link or
    the Link MTU is reduced.
    <!--
    This happens if the Interface ID (IID) of the source IPv6 address is elided
    by the originator on the first but cannot be on the next hops because the
    source Link-Layer address changes.
    -->
    </t>
    <t>
    This specification cannot allow such a refragmentation operation since
    the fragments are recovered end-to-end based on a sequence number. The
    Fragment_Size MUST be tailored to fit the minimal MTU along the path, and
    the first fragment that contains a 6LoWPAN-compressed header MUST have enough
    slack to enable a less efficient compression in the next hops to still
    fits within the Link MTU.
    If the fragmenting endpoint is also the 6LoWPAN compression endpoint, it will
    elide the IID of the source IPv6 address if it matches the Link-Layer address
    <xref target='RFC6282'/>. In a network with a consistent MTU, it
    MUST compute the Fragment_Size as if the MTU was 8 bytes less, so the next
    hop can expand the IID within the same fragment.
      </t>

    </section> <!-- title="Slack in the First Fragment" -->


    <section anchor='gap'><name>Gap between frames</name>
    <t><xref target='I-D.ietf-6lo-minimal-fragment'/> requires that a
    configurable interval of time is inserted between transmissions to the same
    next hop and in particular between fragments of a same datagram.
    In the case of half duplex interfaces, this inter-frame gap ensures that the
    next hop is done forwarding the previous frame and is capable of receiving
    the next one.
    </t><t>
    In the case of a mesh operating at a single frequency with omnidirectional
    antennas, a larger inter-frame gap is required to protect the frame against
    hidden terminal collisions with the previous frame of the same flow that is
    still progressing along a common path.
    </t><t>
    The inter-frame gap is useful even for unfragmented datagrams, but it
    becomes a necessity for fragments that are typically generated in a fast
    sequence and are all sent over the exact same path.
    </t>
    </section><!-- title="Gap between frames" -->


    <section><name>congestion Control</name>
    <t>
    The inter-frame gap is the only protection that
    <xref target='I-D.ietf-6lo-minimal-fragment'/> imposes by default. This
    document enables to group fragments in windows and request intermediate
    acknowledgements so the number of in-flight fragments can be bounded.
    This document also adds an
    ECN mechanism that can be used to to protect the network by adapting the
    size of the window, the size of the fragments, and/or the inter-frame gap.
    </t><t>
    This specification enables the fragmenting endpoint to apply a congestion control
    mechanism to tune those parameters, but the mechanism itself is out of scope.
    In most cases, the expectation is that most datagrams will require only a
    few fragments, and that only the last fragment will be acknowledged. A
    basic implementation of the fragmenting endpoint is NOT REQUIRED to vary
    the size of the window, the duration of the inter-frame gap or the size of a
    fragment in the middle of the transmission of a datagram, and it MAY ignore
    the ECN signal or simply reset the window to 1 (see <xref target='onECN'/>
    for more) until the end of this datagram upon detecting a congestion.
    </t><t>
    An intermediate node that experiences a congestion MAY set the ECN bit in a
    fragment, and the reassembling endpoint echoes the ECN bit at most once at
    the next opportunity to acknowledge back.
    </t><t>
    The size of the fragments is typically computed from the
    Link MTU to maximize the size of the resulting  frames.
    The size of the window and the duration of the inter-frame
    gap SHOULD be configurable, to reduce the chances of congestion and to
    follow the general recommendations
    in <xref target='I-D.ietf-6lo-minimal-fragment'/>, respectively.
    </t>
    </section> <!-- title="congestion Control"-->

    <section anchor='mod'><name>Modifying the First Fragment</name>
    <!-- +add a hop count to the first fragment to tune Window_Size ??? -->

    <t>
    The compression of the Hop Limit, of the source and destination addresses
    in the IPv6 Header, and of the Routing Header may change en route in a
    Route-Over mesh LLN.
    If the size of the first fragment is modified, then the intermediate node
    MUST adapt the Datagram_Size, encoded in the Fragment_Size field,
    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 Fragment_Offset of all the
    subsequent fragments that it forwards for that datagram.
    </t>
    </section> <!--  title="Modifying the First Fragment" -->



    </section> <!-- itle="Updating draft-ietf-6lo-minimal-fragment" -->

	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->

<section anchor='dispatch'><name>New Dispatch types and headers</name>

    <t> This document specifies an alternative to the 6LoWPAN fragmentation
    sublayer <xref target='RFC4944'/> to emulate an Link MTU up to 2048 bytes
    for 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. This specification also provides a reliable
    transmission of the fragments over a multihop 6LoWPAN route-over mesh
    network and a minimal congestion control to reduce the chances of congestion loss.
    </t>
	<t>
     A 6LoWPAN Fragment Forwarding <xref target='I-D.ietf-6lo-minimal-fragment'/>
     technique derived from MPLS enables the forwarding of individual fragments
     across a 6LoWPAN route-over mesh without reassembly at each hop.
     The Datagram_Tag is used as a label; it is locally unique to the
     node that owns the source Link-Layer address of the fragment, so together
     the Link-Layer address and the label can identify the fragment globally
     within the lifetime of the datagram.
     A node may build the Datagram_Tag in its own locally-significant way,
     as long as the chosen Datagram_Tag stays unique to the particular datagram
     for its lifetime.
     The result is that the label does not need to be globally unique but also
     that it must be swapped at each hop as the source Link-Layer address changes.
    </t>


	<t>
	In the following sections, a "Datagram_Tag" extends the semantics defined in
    <xref target='RFC4944'/> Section 5.3."Fragmentation Type and Header".
    The Datagram_Tag is a locally unique identifier for the datagram from the
    perspective of the sender. This means that the Datagram_Tag identifies a
    datagram uniquely in the network when associated with the source of the
    datagram. As the datagram gets forwarded, the source changes and the
    Datagram_Tag must be swapped as detailed in
    <xref target='I-D.ietf-6lo-minimal-fragment'/>.
	</t>

    	<t>This specification extends <xref target='RFC4944'>RFC 4944</xref>
	with 2 new Dispatch types, for Recoverable Fragment (RFRAG)
    and for the RFRAG Acknowledgment back.

    The new 6LoWPAN Dispatch types are taken from Page 0
    <xref target='RFC8025'/> as indicated in <xref target='difig'/>
    in <xref target='ianacon'/>.</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-Request
</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-Request
</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 Link-Layer address layer technology.
       For IEEE Std. 802.15.4, the unit is byte.
	    </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'><name>Recoverable Fragment Dispatch type and Header </name>

	<t>
	In this specification, if the packet is compressed then the size and offset
    of the fragments are expressed with respect to the Compressed Form of the
    packet form as opposed to the uncompressed (native) form.
    </t>	<t>
	The format of the fragment header is shown in <xref target='RFfigalt'/>.
    It is the same for all fragments though the Fragment_Offset is overloaded.
    The format has a length and an offset, as
    well as a Sequence field. This would be redundant if the offset was computed
    as the product of the Sequence by the length, but this is not the case.
    The position of a fragment in the
    reassembly buffer is neither correlated with the value of the Sequence
    field nor with the order in which the fragments are received.
    This enables refragmenting to cope with an MTU deduction, see the example of
    the fragment seq. 5 that is retried end-to-end as smaller fragments seq. 13
    and 14 in <xref target='ura'/>.
    </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 before it is
    fragmented, 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 stored Datagram_Size of the packet identified by the
    sender Link-Layer address and the Datagram_Tag.


    <!--
	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>

<figure anchor='RFfigalt'><name>RFRAG Dispatch type and Header</name>
<artwork align='center'>
                          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-Request
</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    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   -->
	  <dl >

	   <dt>X:</dt><dd>1 bit; Ack-Request: when set, the fragmenting endpoint requires an
       RFRAG Acknowledgment from the reassembling endpoint.
	    </dd>
        <dt>E:</dt><dd>1 bit; Explicit Congestion Notification; the "E"
       flag is cleared by the source of the fragment and set by intermediate
       routers to signal that this fragment experienced congestion along
       its path.
	    </dd>
	   <dt>Fragment_Size:</dt><dd>10-bit unsigned integer; the size of this
       fragment in a unit that depends on the Link-Layer technology. Unless
       overridden by a more specific specification, that unit is the byte,
       which allows fragments up to 1024 bytes.

	    </dd>

	   <dt>Datagram_Tag:</dt><dd>8 bits; an identifier of the datagram that
       is locally unique to the Link-Layer sender.
	    </dd>
	   <dt>Sequence:</dt><dd>5-bit unsigned integer;
       the sequence number of the fragment in the acknowledgement bitmap.
       Fragments are numbered [0..N] where N is in [0..31].
       A Sequence of 0 indicates the first fragment in a datagram, but non-zero
       values are not indicative of the position in the reassembly buffer.
	    </dd>
	   <dt>Fragment_Offset:</dt>
       <dd>
       <t>16-bit unsigned integer.</t>
       <t>
       When the Fragment_Offset is set to a non-0 value, its semantics depend
       on the value of the Sequence field as follows:
       </t>
       <ul spacing='compact'>
       <li>
       For a first fragment (i.e., with a Sequence of 0), this field indicates
       the Datagram_Size of the compressed datagram, to help the reassembling endpoint
       allocate an adapted buffer for the reception and reassembly operations.
       The fragment may be stored for local reassembly. Alternatively, it may be
       routed based on the destination IPv6 address. In that case, a VRB state
       must be installed as described in <xref target='ff'/>.
       </li>
       <li>
       When the Sequence is not 0, this field indicates the offset of the
       fragment in the Compressed Form of the datagram. The fragment may be
       added to a local reassembly buffer or forwarded based on an existing
       VRB as described in <xref target='nf'/>.
       </li>
	    </ul>
        <t>
       A Fragment_Offset that is set to a value of 0 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:
       </t>
       <ul spacing='compact'>
       <li>
       if a VRB already exists and the next hop is still reachable, the fragment
       is to be
       forwarded along the associated Label Switched Path (LSP)
       as described in <xref target='nf'/>, without checking the value
       of the Sequence field;
       </li><li>
       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.
       In that case, the session if it exists is aborted and the packet is
       also forwarded in an attempt to clean up the next hops along the
       path indicated by the IPv6 header (possibly including a routing header).
       </li><li>
       else (the Sequence is nonzero and either no VRB exists or the next hop
       is unavailable), the fragment cannot be forwarded or routed; the fragment
       is discarded and an abort RFRAG-ACK
       is sent back to the source as described in <xref target='nf'/>.
       </li>
	    </ul>
        <t>
       </t>
	    </dd>
	    </dl>
    <t>
    There is no requirement on the reassembling endpoint to check that the
    received fragments are consecutive and non-overlapping.
    The fragmenting endpoint knows that the datagram is fully received
    when the acknowledged fragments cover the whole datagram, which is always
    the case with a FULL bitmap.

    This may be useful in particular in the case where the MTU changes and a
    fragment Sequence is retried with a smaller Fragment_Size, the remainder of
    the original fragment being retried with new Sequence values.
    </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>

    </section>

	<section anchor='ackfrag'><name>RFRAG Acknowledgment Dispatch type and Header</name>
	<t>This specification also defines a 4-byte RFRAG Acknowledgment bitmap
       that is used by the reassembling endpoint
       to confirm selectively the reception of individual fragments.
       A given offset in the bitmap maps one-to-one with a given sequence number
       and indicates which fragment is acknowledged as follows:
    </t>
	<figure anchor='dCack3'><name>RFRAG Acknowledgment Bitmap Encoding</name>
<artwork align='center'>
                         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 9 was received
     +----------------------- Fragment with Sequence 0 was received
</artwork>
</figure>
<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 were lost and must be retried.
</t>
<figure anchor='dCack2'><name>Example RFRAG Acknowledgment  Bitmap</name>
<artwork align='center'>
                         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>The RFRAG Acknowledgment Bitmap is included in
	an RFRAG Acknowledgment header, as follows:
	</t>
	<figure anchor='ackfig'><name>RFRAG Acknowledgment Dispatch type and Header</name>
<artwork align='center'>

                         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|E|  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)                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



-->    <dl>


	   <dt>E:</dt><dd>1 bit; Explicit Congestion Notification Echo</dd>

	    <dt></dt><dd>When set, the fragmenting endpoint 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. More in
        <xref target='onECN'/>.
	    </dd>

	   <dt>Datagram_Tag:</dt><dd>8 bits; an identifier of the datagram that
       is locally unique to the Link-Layer recipient.
	    </dd>
	   <dt>RFRAG Acknowledgment Bitmap:</dt>
       <dd>An RFRAG Acknowledgment Bitmap, whereby setting the bit at offset x
        indicates that fragment x was received, as shown in <xref target='dCack3'/>.
        A NULL bitmap indicates that the fragmentation process is aborted.
        A FULL bitmap indicates that the fragmentation process is complete;
        all fragments were received at the reassembly endpoint.
	    </dd>
	    </dl>
    </section>

    </section>


    <section anchor='ffc'><name>Fragment Recovery</name>

	<t>
	The Recoverable Fragment header RFRAG is used to transport
    a fragment and optionally request an RFRAG Acknowledgment RFRAG_ACK that
    confirms the reception of one or more fragments.
    An RFRAG_ACK is carried as a standalone fragment header (i.e.,
    with no 6LoWPAN payload) in a message that is propagated back to the
    fragmenting endpoint.

    To achieve this, each hop that performed an MPLS-like operation on fragments
    reverses that operation for the RFRAG_ACK by sending a frame from the next
    hop to the previous hop as known by its Link-Layer address in the VRB.
    The Datagram_Tag in the RFRAG_ACK is unique to the reassembling endpoint and is enough
    information for an intermediate hop to locate the VRB that contains the
    Datagram_Tag used by the previous hop and the Layer-2 information associated with it (interface and Link-Layer address).
	</t>
	<t>	The fragmenting endpoint (i.e., the node fragments the packets at the 6LoWPAN level)
     also controls the number of acknowledgments by setting the Ack-Request flag in the RFRAG packets.
        </t>
	<t>
    The fragmenting endpoint may set the Ack-Request 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. The maximum
    number of outstanding fragments is controlled by the Window-Size. It is configurable and
    may vary in case of ECN notification. When the endpoint that
    reassembles the packets at the 6LoWPAN level receives a fragment with the Ack-Request flag set, it MUST send an
    RFRAG_ACK back to the originator to confirm reception of all the
    fragments it has received so far.
	</t>
	<t>
    The Ack-Request ('X') set in an RFRAG marks the end of a window. This flag
    MUST be set on the last fragment if the fragmenting endpoint wishes to perform
    an automatic repeat request (ARQ) process for the datagram,
    and it MAY be set in any intermediate fragment for the purpose of congestion control.
	</t>
	<t>
    This ARQ process MUST be protected by a Retransmission Time Out (RTO) timer,
    and the fragment that carries the 'X'
    flag MAY be retried upon a time out for a configurable number of times (see
    <xref target='protp'/>) with an exponential backoff.
    Upon exhaustion of the retries the fragmenting endpoint may either abort the
    transmission of the datagram or resend the first fragment with an 'X' flag
    set in order to establish a new path for the datagram and obtain the list of
    fragments that were received over the old path in the acknowledgment bitmap.
	When the  knows that an underlying link-layer
    mechanism protects the fragments, it may refrain from using the RFRAG
    Acknowledgment mechanism, and never set the Ack-Request bit.
    </t>

	<t>The reassembling endpoint MAY issue unsolicited acknowledgments.
    An unsolicited acknowledgment signals to the fragmenting endpoint that it
    can resume sending in case it has reached its maximum number
	of outstanding fragments. Another use is to inform the fragmenting endpoint
    that the reassembling endpoint aborted the processing of an individual
    datagram.
	</t>
	<t>
    The RFRAG Acknowledgment carries an ECN indication for congestion
    control (see <xref target='onECN'/>).
    The reassembling endpoint of a fragment with the 'E' (ECN) flag set MUST
    echo that information at most once by setting the 'E' (ECN) flag
    in the next RFRAG_ACK.
    <!--, 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>
	In order to protect the datagram, the fragmenting endpoint transfers a controlled number
    of fragments and flags the last
	fragment of a window with an RFRAG Acknowledgment Request. The reassembling endpoint MUST
    acknowledge a fragment with the acknowledgment request bit set.
    If any fragment immediately preceding
	an acknowledgment request is still missing, the reassembling endpoint MAY intentionally
	delay its acknowledgment to allow in-transit fragments to arrive.
    Because it might defeat the round-trip time computation, delaying the
    acknowledgment should be configurable and not enabled by default.

	</t>
    <t>
    When enough fragments are received to cover the whole datagram, the reassembling endpoint reconstructs
    the packet, passes it to the upper layer, sends an RFRAG_ACK on
    the reverse path with a FULL bitmap, and arms a short timer, e.g.,
    on the order of an average round-trip time in the network. The FULL bitmap
    is used as opposed to a bitmap that acknowledges only the received fragments
    to let the intermediate nodes know that the datagram is fully received.
    As the timer runs, the reassembling endpoint absorbs the fragments that were
    still in flight for that datagram without creating a new state, acknowledging
    the ones that that bear an Ack-Request with an FRAG Acknowledgment and the
    FULL bitmap.
    The reassembling endpoint aborts the communication if fragments with
    matching source and Datagram-Tag continue to be received
    after the timer expires.</t>

	<t>
    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 fragmenting endpoint protects the transmission over the LLN mesh with a retry timer
    that is configured for a use case and may be adapted dynamically, e.g.,
    according to the method detailed in <xref target='RFC6298'/>.
    It is expected that the upper layer retries obey the recommendations in
    <xref target='RFC8085'/>, 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 MUST be sent in a round-robin fashion: the sender MUST send all
    the fragments for a first time before it retries any lost fragment; lost
    fragments MUST be retried in sequence, oldest first.  This mechanism
    enables the receiver to acknowledge fragments that were delayed in
    the network before they are retried.

	</t>

	<t>
    When a single radio frequency is used by contiguous hops, the fragmenting endpoint SHOULD insert a delay between the frames (e.g., carrying fragments) that are sent to the same next hop. The delay SHOULD cover multiple transmissions so as to let a frame 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'/>, where nodes that communicate at Layer-2 are scheduled to send
    and receive respectively, and different hops operate on different channels.
    </t>


<section anchor='ffg'><name>Forwarding Fragments</name>
    <t>

    This specification inherits from <xref target='I-D.ietf-6lo-minimal-fragment'/>
    and proposes a Virtual Reassembly technique to forward fragments with no intermediate reconstruction of the entire datagram.

    </t><t>
    The IPv6 Header MUST be placed in full in the first fragment to enable the routing decision. The first fragment is routed and creates an LSP from the fragmenting endpoint to the reassembling endpoint. The next fragments are label-switched along that LSP.
    As a consequence, the next fragments can only follow the path that was set
    up by the first fragment and cannot follow an alternate route.
      The Datagram_Tag is used to carry the label, which is swapped in each hop.
    </t><t>
    If the first fragment is too large for the path MTU, it will repeatedly fail
    and never establish an LSP. In that case,
    the fragmenting endpoint MAY retry the same datagram with a smaller
    Fragment_Size, in which case it MUST abort the original attempt and use a
    new Datagram_Tag for the new attempt.
	</t>

<section anchor='ff'><name>Receiving the first fragment</name>
	<t>
	In Route-Over mode, the source and destination Link-Layer addresses in a frame
    change at each hop.  The label that is formed and placed in the
    Datagram_Tag by the sender is associated with the source Link-Layer address and only valid (and temporarily unique) for that source Link-Layer address.
    </t>
    <t>
    Upon receiving the first fragment (i.e., with a Sequence of 0), an intermediate router
    creates a VRB and the associated
    LSP state indexed by the incoming interface, the previous-hop Link-Layer address,
    and the Datagram_Tag, and forwards the fragment along the IPv6 route that matches
    the destination IPv6 address in the IPv6 header until it reaches the
    reassembling endpoint, as prescribed by
    <xref target='I-D.ietf-6lo-minimal-fragment'/>.
    The LSP state enables to match the next incoming fragments of a datagram to
    the abstract forwarding information of next interface, source and next-hop
    Link-Layer addresses, and swapped Datagram_Tag.
    </t>
    <t>
    In addition, the router also forms a reverse LSP state indexed by the interface to the next hop, the Link-Layer address the router uses as source for that datagram, and the swapped Datagram_Tag. This reverse LSP state
    enables matching the tuple (interface, destination Link-Layer address, Datagram_Tag) found in an RFRAG_ACK to the abstract forwarding information (previous interface, previous Link-Layer address, Datagram_Tag) used to forward the RFRAG-ACK back to the fragmenting endpoint.
	</t>


	</section>

<section anchor='nf'><name>Receiving the next fragments</name>
	<t>Upon receiving the next fragment (i.e., with a non-zero Sequence),
    an intermediate router looks up
    a LSP indexed by the tuple (incoming interface, previous-hop Link-Layer 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.ietf-6lo-minimal-fragment'/>.
	<!--list  style="numbers">
		<t>looks up the label-swap entry for (Link-Layer address_previous, DT_previous), which resolves as (Link-Layer address_next, DT_next)</t>
		<t>swaps the Link-Layer address info to from self to Link-Layer address_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:
	</t><ul spacing='compact'>
		<li>The source and destination Link-Layer addresses are swapped from those found
        in the fragment and the same interface is used</li>
		<li>The Datagram_Tag is set to the Datagram_Tag found in the fragment</li>
		<li>A NULL bitmap is used to signal the abort condition</li>
	</ul><t>
	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>
	<t>
    <xref target='I-D.ietf-6lo-minimal-fragment'/> indicates that the
    reassembling endpoint stores
    "the actual packet data from the fragments received so far, in a form that
    makes it possible to detect when the whole packet has been received and can
    be processed or forwarded". How this is computed is implementation specific
    but relies on receiving all the bytes up to the Datagram_Size indicated in
    the first fragment.
    An implementation may receive overlapping fragments as the result of retries
    after an MTU change.
	</t>
	</section>
</section>
<section anchor='ura'><name>Receiving RFRAG Acknowledgments</name>

	<t>Upon receipt of an RFRAG-ACK, the router looks up a reverse LSP indexed by the interface and destination Link-Layer address of the received frame and the received Datagram_Tag in the RFRAG-ACK.
    If it is found, the router forwards the fragment using the associated VRB as
    prescribed by <xref target='I-D.ietf-6lo-minimal-fragment'/>, but using
    the reverse LSP so that the RFRAG-ACK flows back to the fragmenting 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 (Link-Layer address_next, DT_next), which resolves as (Link-Layer address_previous, DT_previous)</t>
		<t>swaps the Link-Layer address info to from self to Link-Layer address_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 that the fragment was entirely received (FULL bitmap), it arms a short timer, and upon timeout, the VRB and all the associated state are destroyed. Until the timer elapses, fragments of that datagram may still be received, e.g. if the RFRAG-ACK was lost on the path back and the source retried the last fragment. In that
    case, the router generates an RFRAG-ACK with a FULL bitmap back to the fragmenting endpoint if an acknowledgement was requested, else it silently drops the fragment. </t>

    <t>
    This specification does not provide a method to discover the number of hops
    or the minimal value of MTU along those hops. In a typical case, the MTU is
    constant and the same across the network. But should the minimal MTU along
    the path decrease, it is possible to retry a long fragment (say Sequence of 5) with
    several shorter fragments with a Sequence that was not used before (e.g.,
    13 and 14). Fragment 5 is marked as abandoned and will not be retried
    anymore. Note that when this mechanism is in place, it is hard to predict
    the total number of fragments that will be needed or the final shape of the
    bitmap that would cover the whole packet. This is why the FULL bitmap is used
    when the reassembling endpoint gets the whole datagram regardless of which
    fragments were actually used to do so. Intermediate nodes will unabiguously
    know that the process is complete.
    Note that Path MTU Discovery is out of scope for this document.
    </t>

    </section>

    <section><name>Aborting the Transmission of a Fragmented Packet</name>
	<t>
	A reset is signaled on the forward path with a pseudo fragment that has the Fragment_Offset set to 0. The sender of a reset SHOULD also set the Sequence and Fragment_Size  field to 0.
	</t>
	<t>
    When the fragmenting endpoint or a router on the path decides that a packet should be dropped and the fragmentation process aborted, it generates a reset pseudo fragment and forwards it down the fragment path.
	</t>
	<t>Each router next along the path the way forwards the pseudo fragment based on the VRB state. If an acknowledgment is not requested, the VRB and all associated state are destroyed.
	</t>
	<t>
	Upon reception of the pseudo fragment, the reassembling endpoint cleans up all resources for the packet
	associated with the Datagram_Tag. If an acknowledgment is requested, the reassembling endpoint responds with a NULL bitmap.
	</t>
	<t>The other way around, the reassembling endpoint might need to abort the processing of a fragmented packet for internal reasons, for instance if it is out of reassembly buffers, already uses all 256 possible values of the Datagram_Tag, or if it keeps receiving fragments beyond a reasonable time while it considers that this packet is already fully reassembled and was passed to the upper layer. In that case, the reassembling endpoint SHOULD indicate so to the fragmenting endpoint with a NULL bitmap in an RFRAG_ACK.
	</t>
	<t>
    The RFRAG_ACK is forwarded all the way back to the source of the packet and cleans up all resources on the path.
	Upon an acknowledgment with a NULL bitmap, the fragmenting endpoint MUST abort the transmission of the fragmented datagram with one exception: In the particular case of the first fragment, it MAY decide to retry via an alternate next hop instead.
	</t>
    </section>

    <section><name>Applying Recoverable Fragmentation along a Diverse Path</name>
    <t>
    The text above can be read with the assumption of a serial path between a
    source and a destination. Section 4.5.3 of the
    <xref target='I-D.ietf-6tisch-architecture'>"6TiSCH Architecture"</xref>
    defines the concept of a Track that can be a complex path between a source
    and a destination with Packet ARQ, Replication,
    Elimination and Overhearing (PAREO) along the Track. This specification
    can be used along any subset of
    the complex Track where the first fragment is flooded. The last RFRAG
    Acknowledgment is flooded on that same subset in the reverse direction.
    Intermediate RFRAG Acknowledgments can be flooded on any sub-subset of that
    reverse subset that reach back to the source.
    </t>
    </section>
    </section>

    <section><name>Management Considerations</name>
    <t>

    This specification extends  <xref target='I-D.ietf-6lo-minimal-fragment'>"On Forwarding 6LoWPAN Fragments over a Multihop IPv6 Network"</xref> and requires the same parameters in the reassembling endpoint and on intermediate nodes. There is no new parameter as echoing ECN is always on. These parameters typically include the reassembly timeout at the reassembling endpoint and an inactivity clean-up timer on the intermediate nodes, and the number of messages that can be processed in parallel in all nodes.
    </t>
    <t>

    The configuration settings introduced by this specification only apply to the fragmenting endpoint, which is in full control of the transmission.
    LLNs vary a lot in size (there can be thousands of nodes in a mesh), in speed (from 10 Kbps to several Mbps at the PHY layer), in traffic density, and in optimizations that are desired (e.g., the selection of a RPL <xref target='RFC6550'/> Objective Function <xref target='RFC6552'/> impacts the shape of the routing graph).

    </t>
    <t>
    For that reason, only a very generic guidance can be given on the settings of the fragmenting endpoint and on whether complex algorithms are needed to perform congestion control or estimate the round-trip time. To cover the most complex use cases, this specification enables the fragmenting endpoint to vary the fragment size, the window size, and the inter-frame gap, based on the number of losses, the observed variations of the round-trip time and the setting of the ECN bit.
    </t>

    <section anchor='protp'><name>Protocol Parameters</name>

    <t>
    The management system SHOULD be capable of providing the parameters listed in this section and an
    implementation MUST abide by those parameters and in particular never exceed the minimum and maximum configured boundaries.
    </t>
    <t>
<!--
    An implementation must control the rate at which it sends packets via the same next-hop router to allow the next hop to forward a packet before it gets the next.
    -->

    An implementation should consider the generic recommendations from the IETF in the matter of congestion control and rate management for IP datagrams in
    <xref target='RFC8085'/>.
    An implementation may perform a congestion control by using a dynamic value of the window size (Window_Size), adapting the fragment size (Fragment_Size), and may
    reduce the load by  inserting an inter-frame gap that is longer than necessary. In a large network where nodes contend for the bandwidth, a larger Fragment_Size consumes less bandwidth but also reduces fluidity and incurs higher chances of loss in transmission. </t>
    <t>
    This is controlled by the following parameters:
    </t>
    <dl>
       <dt>inter-frame gap:</dt><dd>
       The inter-frame gap indicates the minimum amount of time between transmissions.
       The inter-frame gap controls the rate at which fragments are sent, the ratio of air time, and the amount of memory in intermediate nodes that a particular datagram will use. It can be used as a flow control, a congestion control, and/or a collision
       control measure.
       It MUST be set at a minimum to a value that protects the propagation of one transmission against collision with next <xref target='I-D.ietf-6lo-minimal-fragment'/>. In a wireless network that uses the same frequency along a path, this may represent the time for a frame to progress over multiple hops (more in <xref target='gap'/>).
       It SHOULD be augmented beyond this as necessary to protect the network against congestion.
       </dd>
       <dt>MinFragmentSize:</dt><dd>
       The MinFragmentSize is the minimum value for the Fragment_Size. It MUST be lower than the minimum value of smallest 1-hop MTU that can be encountered along the path.
       </dd>
       <dt>OptFragmentSize:</dt><dd>
       The OptFragmentSize is the value for the Fragment_Size that the fragmenting endpoint
       should use to start with. It is greater than or equal to MinFragmentSize. It is less than or equal to MaxFragmentSize. For the
       first fragment, it must account for the expansion of the IPv6 addresses and of the Hop Limit field within MTU. For all fragments, it is a balance between the expected fluidity and the overhead of Link-Layer and 6LoWPAN headers. For a small MTU, the idea is to keep it close to the maximum, whereas for larger MTUs, it might makes sense to keep it short enough, so that the duty cycle of the transmitter is bounded, e.g., to transmit at least 10 frames per second.
       </dd>
       <dt>MaxFragmentSize:</dt><dd>
       The MaxFragmentSize is the maximum value for the Fragment_Size.
       It MUST be lower than the maximum value of smallest 1-hop MTU that can be encountered along the path. A large
       value augments the chances of buffer bloat and transmission loss.
       The value MUST be less than 512 if the unit that is defined
       for the PHY layer is the byte.
       </dd>
       <!--
       <dt>MinWindowSize:</dt><dd>
       The minimum value of Window_Size that the fragmenting endpoint can use. A value of 1 is RECOMMENDED.
       </dd>
       -->
       <dt>Window_Size:</dt><dd>
       <!--
       The OptWindowSize is the value for the Window_Size that the fragmenting endpoint
       should use to start with. It is greater than or equal to MinWindowSize. It is less than or equal to MaxWindowSize. A rule of a thumb for OptWindowSize could be an estimation of the one-way trip time divided by the inter-frame gap. If the acknowledgement back is too costly, it is possible to set this to 32, meaning that only the last Fragment is acknowledged in the first round.
       -->

       <t>
       The Window_Size MUST be at least 1 and less than 33.
       </t>

       <ul>
       <li>
       If the round-trip time is known, the Window_Size SHOULD be set to the round-trip time divided by the time per fragment, that is the time to transmit a fragment plus the inter-frame gap.
       </li>
       </ul>

       <t>
       Otherwise:
       </t>

       <ul>
       <li>
       Setting the window_size to 32 is to be understood as only the last Fragment is
       acknowledged in each round. This is the RECOMMENDED value in a half-duplex LLN
       where the fragment acknowledgement consumes roughly the same bandwidth on the
       same links as the fragments themselves
       </li><li>
       If it is set to a smaller value, more acks are generated.
       In a full-duplex network, the load on the forward path will be lower, and
       a small value of 3 SHOULD be configured.
       </li>
       </ul>

       </dd>
       <!--
       <dt>MaxWindowSize:</dt><dd>
       The maximum value of Window_Size that the fragmenting endpoint can use. The value
       MUST be strictly less than 33.
       </dd>
       -->
    </dl>
    <t>
    An implementation may perform its estimate of the RTO or use a configured one. The ARQ process is controlled by the following parameters:
    </t>
    <dl>
       <dt>MinARQTimeOut:</dt><dd>
       The minimum amount of time a node should wait for an RFRAG Acknowledgment before it takes the next action.
       It MUST be more than the maximum expected round-trip time in the respective network.
       </dd>
       <dt>OptARQTimeOut:</dt><dd>
       The initial value of the RTO, which is the amount of time that a fragmenting endpoint should wait for an RFRAG Acknowledgment before it takes the next action. It is greater than or equal to MinARQTimeOut. It is less than or equal to MaxARQTimeOut. See <xref target='onECN'/> for recommendations on computing the round-trip time. By default a value of 3 times the maximum expected round-trip time in the respective network is RECOMMENDED.


       </dd>
       <dt>MaxARQTimeOut:</dt><dd>
       The maximum amount of time a node should wait for the RFRAG Acknowledgment before it takes the next action. It must cover the longest expected round-trip time, and be several times less than the timeout that covers the recomposition buffer at the reassembling endpoint, which is typically on the order of the minute.
       An upper bound can be estimated to ensure that the datagram is either fully transmitted or dropped
       before an upper layer decides to retry it.
       </dd>
       <dt>MaxFragRetries:</dt><dd>
       The maximum number of retries for a particular fragment. A default value of 3 is RECOMMENDED.
       An upper bound can be estimated to ensure that the datagram is either fully transmitted or dropped
       before an upper layer decides to retry it.
       </dd>
       <dt>MaxDatagramRetries:</dt><dd>
       The maximum number of retries from scratch for a particular datagram.
       A default value of 1 is RECOMMENDED.
       An upper bound can be estimated to ensure that the datagram is either fully transmitted or dropped
       before an upper layer decides to retry it.
       </dd>
    </dl>
    <t>
    An implementation may be capable of performing congestion control based on ECN; see in <xref target='onECN'/>. This is controlled by the following parameter:
    </t>
    <dl>
       <dt>UseECN:</dt><dd>
       Indicates whether the fragmenting endpoint should react to ECN.
       The fragmenting endpoint may react to ECN by varying the Window_Size between
       MinWindowSize and MaxWindowSize, varying the Fragment_Size between MinFragmentSize and MaxFragmentSize, and/or by increasing or reducing the inter-frame gap.
       With this specification, if UseECN is set and a fragmenting endpoint detects a congestion, it may apply a congestion control method until the end of the datagram, whereas if UseECN is reset, the endpoint does not react to congestion.
       Future specifications may provide additional parameters and capabilities.
       </dd>
    </dl>
    </section> <!-- Protocol parameters -->


    <section><name>Observing the network</name>
    <t>The management system should monitor the number of retries
    and of ECN settings that can be observed from the perspective of
    both the fragmenting endpoint and the reassembling endpoint with regards to the other endpoint.
    It may then tune the optimum size of
    Fragment_Size and of Window_Size, OptFragmentSize, and OptWindowSize,
    respectively, at the fragmenting endpoint towards a particular reassembling endpoint, applicable to the
    next datagrams.
    <!--The values should be bounded by the expected
    number of hops and reduced beyond that when the number of datagrams that can
    traverse an intermediate point may exceed its capacity and cause a
    congestion loss. -->
    It will preferably tune the inter-frame gap to
    increase the spacing between fragments of the same datagram and reduce the
    buffer bloat in intermediate node that holds one or more fragments of that
    datagram.
	</t>

    </section><!-- Observing the network -->
    </section> <!-- Management Considerations -->

    <section><name>Security Considerations</name>

        <t>
    This document specifies an instantiation of a 6FF technique and inherits
    from the generic description in <xref target='I-D.ietf-6lo-minimal-fragment'/>.
    The considerations in the Security Section of <xref target='I-D.ietf-6lo-minimal-fragment'/>  equally apply to this document.
    </t>
    <t>
    In addition to the threats detailed therein, an attacker that is on-path can
    prematurely end the transmission of a datagram by sending a RFRAG Acknowledgment
    to the fragmenting endpoint. It can also cause extra transmissions of
    fragments by resetting bits in the RFRAG Acknowledgment bitmap, and of
    RFRAG Acknowledgments by forcing the  Ack-Request bit in fragments that it
    forwards.
    </t>
    <t>
    As indicated in <xref target='I-D.ietf-6lo-minimal-fragment'/>, Secure joining and the Link-Layer security are REQUIRED to protect against those attacks, as the fragmentation protocol does not include any native
    security mechanisms.
    </t>
    <t>
    This specification does not recommend a particular algorithm for the
    estimation of the duration of the RTO that covers the detection of the
    loss of a fragment with the 'X' flag set; regardless, an attacker on the
    path may slow down or discard packets, which in turn can affect the
    throughput of fragmented packets.
    </t>
	<t>Compared to
	<xref target='RFC4944'> "Transmission of IPv6 Packets over IEEE 802.15.4
    Networks"</xref>, this specification reduces the Datagram_Tag to 8 bits and
    the tag wraps faster than with <xref target='RFC4944'/>.
    But for a constrained network where a node is expected to be able to hold
    only one or a few large packets in memory, 256 is still a large number.
    Also, the acknowledgement mechanism allows cleaning up the state rapidly
    once the packet is fully transmitted or aborted.

	</t>
    <t>
    The abstract Virtual Recovery Buffer inherited from
    <xref target='I-D.ietf-6lo-minimal-fragment'/> may be used to perform a
    Denial-of-Service (DoS) attack against the intermediate Routers since the
    routers need to maintain a state per flow. The particular VRB implementation
    technique described in
    <xref target='I-D.ietf-lwig-6lowpan-virtual-reassembly'/> allows realigning
    which data goes in which fragment, which causes the intermediate node to
    store a portion of the data, which adds an attack vector that is not present
    with this specification. With this specification, the data that is
    transported in each fragment is conserved and the state to keep does not
    include any data that would not fit in the previous fragment.
	</t>
        </section>
        <section anchor='ianacon'><name>IANA Considerations</name>
        <t>

    This document allocates 2 patterns for a total of 4 dispatch values in Page 0 for recoverable fragments from the
   "Dispatch Type Field" registry that was created by <xref target='RFC4944'>
	"Transmission of IPv6 Packets over IEEE 802.15.4 Networks"</xref> and
     reformatted by <xref target='RFC8025'>"6LoWPAN Paging Dispatch"</xref>.
     </t><t>
    The suggested patterns (to be confirmed by IANA) are indicated in
    <xref target='difig'/>.
		</t>


   <table  anchor="difig"><name>Additional Dispatch Value Bit Patterns</name>
   <thead>
      <tr><td>Bit Pattern</td><td>Page</td><td align='center'>Header Type</td><td>Reference</td></tr>
   </thead><tbody>
      <tr><td>11  10100x</td><td>0</td><td>RFRAG - Recoverable Fragment</td>    <td>THIS RFC</td></tr>
      <tr><td>11  10100x</td><td>1-14</td><td>Unassigned</td>    <td></td></tr>
      <tr><td>11  10100x</td><td>15</td><td>Reserved for Experimental Use</td>    <td>RFC 8025</td></tr>

      <tr><td>11  10101x</td><td>0</td><td>RFRAG-ACK - RFRAG Acknowledgment</td><td>THIS RFC</td></tr>
      <tr><td>11  10101x</td><td>1-14</td><td>Unassigned</td>    <td></td></tr>
      <tr><td>11  10101x</td><td>15</td><td>Reserved for Experimental Use</td>    <td>RFC 8025</td></tr>
   </tbody>
   </table>
        </section>

<section><name>Acknowledgments</name>
<t>The author wishes to thank Michel Veillette, Dario Tedeschi, Laurent Toutain,
Carles Gomez Montenegro, Thomas Watteyne, and Michael Richardson for in-depth
reviews and comments.
Also many thanks to Roman Danyliw, Peter Yee, Colin Perkins, Tirumaleswar Reddy Konda, Eric Vyncke, Warren Kumari, Magnus Westerlund, Erik Nordmark, and especially Benjamin Kaduk and Mirja Kuhlewind for
their careful reviews and for helping through the IETF Last Call and IESG review process,
and to Jonathan Hui, Jay Werb, Christos Polyzois, Soumitri Kolavennu,
Pat Kinney, Margaret Wasserman, Richard Kelsey, Carsten Bormann, and
Harry Courtice for their various contributions in the long process that lead to this document.</t>
</section>

    </middle>

    <back>
   <displayreference   target="I-D.ietf-intarea-frag-fragile"                   to="FRAG-ILE"/>
   <displayreference   target="I-D.ietf-6lo-minimal-fragment"                  to="FRAG-FWD"/>
   <displayreference   target="I-D.ietf-lwig-6lowpan-virtual-reassembly"       to="LWIG-FRAG"/>

    <references><name>Normative References</name>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6298.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4944.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4919.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6282.xml'/>
      <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6606.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8025.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8138.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8200.xml'/>
      <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-6lo-minimal-fragment.xml'/>
    </references>

    <references><name>Informative References</name>

	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8201.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7567.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3031.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5681.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2914.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3168.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4963.xml'/>
      <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5033.xml'/>

	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6550.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6552.xml'/>
      <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6554.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7554.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8085.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8087.xml'/>
      <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-lwig-6lowpan-virtual-reassembly.xml'/>
      <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-intarea-frag-fragile.xml'/>
      <!--xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-core-cocoa.xml'/-->
      <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-6tisch-architecture.xml'/>
      <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>

      <reference anchor='Kent' target='http://www.hpl.hp.com/techreports/Compaq-DEC/WRL-87-3.pdf'><front>
          <title>"Fragmentation Considered Harmful", In Proc. SIGCOMM '87
          Workshop on Frontiers in Computer Communications Technology

          </title>
          <author fullname='Kent' initials='C. ' surname='Kent'>
                  <organization/>
          </author>
          <author fullname='Mogul' initials='J.' surname='Mogul'>
                  <organization/>
          </author>
          <date month='August' year='1987'/>
          </front>
        <seriesInfo name='DOI' value='10.1145/55483.55524'/>
      </reference>
    </references>


	<section anchor='rationale'><name>Rationale</name>
	  <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:
          </t>
       <dl >

	     <dt>Towards the LLN node:</dt><dd>

         <dl>
		  <dt>Firmware update:</dt><dd>
	       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.
		 </dd>
	      <dt>Packages of Commands:</dt><dd>
	       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.
	     </dd>


		</dl>

	     </dd>
	     <dt>From the LLN node:</dt><dd>

          <dl >

	     <dt>Waveform captures:</dt><dd>
	       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.
	     </dd>
	     <dt>Data logs:</dt><dd>
	       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.
	     </dd>
	     <dt>Large data packets:</dt><dd>
	       Rich data types might require more than one fragment.
	     </dd>
		</dl>

	     </dd>
		</dl>

	  <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 would need to be 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
		(except 802.15.4g) a IEEE Std. 802.15.4 frame can limit the Link-Layer 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 and cause extraneous acknowledgements
        across the LLN compared to the method in this specification.

<!--
        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'><name>Requirements</name>
	  <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 recovery.
	    This draft introduces a simple protocol to recover individual fragments
        between 6FF endpoints that may be multiple hops away.

	  </t><t>
        The method addresses the following requirements of an LLN:

	   </t><dl>
	   <dt>Number of fragments:</dt><dd>The recovery mechanism must support highly fragmented packets, with a maximum of 32 fragments per packet.
	   </dd>
	   <dt>Minimum acknowledgment overhead:</dt><dd> 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 a data fragment.
	    </dd><dt></dt><dd>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.
		</dd>

	   <dt>Controlled latency:</dt><dd>The recovery mechanism must succeed or give up within the time boundary imposed by the recovery process
	   of the Upper Layer Protocols.
	   </dd>
	   <!--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-->

	   <dt>Optional congestion control:</dt><dd> The aggregation of multiple concurrent flows may lead to the saturation of the radio network and congestion collapse.
		</dd>
		<dt></dt><dd>The recovery mechanism should provide means for controlling the number of fragments in transit over the LLN.
	    </dd>
<!--
	   <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>
-->
	    </dl><t>
	    </t>
	</section>

	<section anchor='onECN'><name>Considerations on Congestion Control</name>

	<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 controlling the number
    of outstanding fragments that have been transmitted but for which an
   acknowledgment was not received yet and are still covered by the ARQ timer.

	</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 fragmenting endpoint in an
    acknowledgment message as represented in
	<xref target='ackfig'/> in <xref target='ackfrag'/>.
    While the support of echoing the ECN at the reassembling endpoint is mandatory, this
    specification only provides a minimalistic behaviour on the fragmenting endpoint,
    that is to reset the window to 1 so the fragments are sent and acknowledged one by one
    till the end of the datagram.
	</t>
	<t>It must be noted that though an inter-frame gap can be as a flow control
    or a congestion control measure, collision avoidance is yet another topic.
    	</t>
	<t>
   In particular, when a mesh operates on the same channel over multiple hops,
   then the forwarding of a fragment over a certain hop may collide with the
   forwarding of the next fragment that is following over a previous hop but in the same interference domain. To prevent this, the fragmenting endpoint is required to pace individual fragments within a transmit window with an inter-frame gap. This is needed to ensure 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 path, received but not yet
    acknowledged, or the acknowledgment might be on the path back. It is also
    possible that either the fragment or the acknowledgment was lost on the
    way.
	</t>
	<t>From the fragmenting endpoint 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
	time between the 6LoWPAN endpoints. For the lack of a more adapted technique, the method detailed in <xref target='RFC6298'>"Computing TCP's Retransmission Timer"</xref> may be used for that computation.
	</t>
	<t>The reader is encouraged to read through <xref target='RFC2914'>"Congestion Control Principles"</xref> and <xref target='RFC5033'>"Specifying New Congestion Control Algorithms"</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 number 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 fragmenting endpoint decides how many fragments are (re)sent before
	an acknowledgment is required, and how the fragmenting endpoint adapts that number to the network con


    ditions.
		</t-->
</section>

    </back>

</rfc>
