<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?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="yes"?>
<?rfc subcompact="no"?>
<rfc category="bcp" docName="draft-bonica-intarea-frag-fragile-03"
     ipr="trust200902">
  <front>
    <title abbrev="IP Fragmentation Fragile">IP Fragmentation Considered
    Fragile</title>

    <author fullname="Ron Bonica" initials="R." surname="Bonica">
      <organization>Juniper Networks</organization>

      <address>
        <postal>
          <street>2251 Corporate Park Drive</street>

          <city>Herndon</city>

          <code>20171</code>

          <region>Virginia</region>

          <country>USA</country>
        </postal>

        <email>rbonica@juniper.net</email>
      </address>
    </author>

    <author fullname="Fred Baker" initials="F." surname="Baker">
      <organization>Unaffiliated</organization>

      <address>
        <postal>
          <street/>

          <city>Santa Barbara</city>

          <region>California</region>

          <code>93117</code>

          <country>USA</country>
        </postal>

        <email>FredBaker.IETF@gmail.com</email>
      </address>
    </author>

    <author fullname="Geoff Huston" initials="G." surname="Huston">
      <organization>APNIC</organization>

      <address>
        <postal>
          <street>6 Cordelia St</street>

          <city>Brisbane</city>

          <region>4101 QLD</region>

          <code/>

          <country>Australia</country>
        </postal>

        <email>gih@apnic.net</email>
      </address>
    </author>

    <author fullname="Robert M. Hinden" initials="R." surname="Hinden">
      <organization>Check Point Software</organization>

      <address>
        <postal>
          <street>959 Skyway Road</street>

          <city>San Carlos</city>

          <region>California</region>

          <code>94070</code>

          <country>USA</country>
        </postal>

        <email>bob.hinden@gmail.com</email>
      </address>
    </author>

    <author fullname="Ole Troan" initials="O." surname="Troan">
      <organization>Cisco</organization>

      <address>
        <postal>
          <street>Philip Pedersens vei 1</street>

          <city>N-1366 Lysaker</city>

          <country>Norway</country>
        </postal>

        <email>ot@cisco.com</email>
      </address>
    </author>

    <author fullname="Fernando Gont" initials="F." surname="Gont">
      <organization>SI6 Networks</organization>

      <address>
        <postal>
          <street>Evaristo Carriego 2644</street>

          <city>Haedo</city>

          <region>Provincia de Buenos Aires</region>

          <country>Argentina</country>
        </postal>

        <email>fgont@si6networks.com</email>
      </address>
    </author>

    <date day="23" month="July" year="2018"/>

    <area>Internet Area</area>

    <workgroup>Internet Area WG</workgroup>

    <keyword>IPv6</keyword>

    <keyword>Fragmentation</keyword>

    <abstract>
      <t>This document provides an overview of IP fragmentation. It also
      explains how IP fragmentation reduces the reliability of Internet
      communication.</t>

      <t>Finally, this document proposes alternatives to IP fragmentation and
      provides recommendations for application developers and network
      operators.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="into" title="Introduction">
      <t><xref target="RFC7872">Operational experience </xref> <xref
      target="Huston"/> reveals that IP fragmentation reduces the reliability
      of Internet communication. This document provides an overview of IP
      fragmentation. It also explains how IP fragmentation reduces the
      reliability of Internet communication.</t>

      <t>Finally, this document proposes alternatives to IP fragmentation and
      provides recommendations for application developers and network
      operators.</t>
    </section>

    <section title="IP Fragmentation">
      <section anchor="pmtu" title="Links, Paths, MTU and PMTU">
        <t>An Internet path connects a source node to a destination node. A
        path can contain links and intermediate systems. If a path contains
        more than one link, the links are connected in series and an
        intermediate system connects each link to the next. An intermediate
        system can be a router or a middle box.</t>

        <t>Internet paths are dynamic. Assume that the path from one node to
        another contains a set of links and intermediate systems. If the
        network topology changes, that path can also change so that it
        includes a different set of links and intermediate systems.</t>

        <t>Each link is constrained by the number of bytes that it can convey
        in a single IP packet. This constraint is called the link Maximum
        Transmission Unit (MTU). <xref target="RFC0791">IPv4</xref> requires
        every link to have an MTU of 68 bytes or greater. <xref
        target="RFC8200">IPv6</xref> requires every link to have an MTU of
        1280 bytes or greater. These are called the IPv4 and IPv6 minimum link
        MTU's.</t>

        <t>Each Internet path is constrained by the number of bytes that it
        can convey in a IP single packet. This constraint is called the Path
        MTU (PMTU). For any given path, the PMTU is equal to the smallest of
        its link MTU's. Because Internet paths are dynamic, PMTU is also
        dynamic.</t>

        <t>For reasons described below, source nodes estimate the PMTU between
        themselves and destination nodes. A source node can produce extremely
        conservative PMTU estimates in which:</t>

        <t><list style="symbols">
            <t>The estimate for each IPv4 path is equal to the IPv4 minimum
            link MTU.</t>

            <t>The estimate for each IPv6 path is equal to the IPv6 minimum
            link MTU.</t>
          </list>While these conservative estimates are guaranteed to be less
        than or equal to the actual PMTU, they are likely to be much less than
        the actual PMTU. This may adversely affect upper-layer protocol
        performance.</t>

        <t>By executing <xref target="RFC1191">Path MTU Discovery
        (PMTUD)</xref> <xref target="RFC8201"/> procedures, a source node can
        maintain a less conservative, running estimate of the PMTU between
        itself and a destination node. According to these procedures, the
        source node produces an initial PMTU estimate. This initial estimate
        is equal to the MTU of the first link along the path to the
        destination node. It can be greater than the actual PMTU.</t>

        <t>Having produced an initial PMTU estimate, the source node sends
        non-fragmentable IP packets to the destination node. If one of these
        packets is larger than the actual PMTU, a downstream router will not
        be able to forward the packet through the next link along the path.
        Therefore, the downstream router drops the packet and sends an <xref
        target="RFC0792">Internet Control Message Protocol (ICMP)</xref> <xref
        target="RFC4443"/> Packet Too Big (PTB) message to the source node.
        The ICMP PTB message indicates the MTU of the link through which the
        packet could not be forwarded. The source node uses this information
        to refine its PMTU estimate.</t>

        <t>PMTUD produces a running estimate of the PMTU between a source node
        and a destination node. Because PMTU is dynamic, at any given time,
        the PMTU estimate can differ from the actual PMTU. In order to detect
        PMTU increases, PMTUD occasionally resets the PMTU estimate to the MTU
        of the first link along path to the destination node. It then repeats
        the procedure described above.</t>

        <t>PMTUD has the following characteristics:</t>

        <t><list style="symbols">
            <t>It relies on the network's ability to deliver ICMP PTB messages
            to the source node.</t>

            <t>It is susceptible to attack because ICMP messages are easily
            <xref target="RFC5927">forged</xref>.</t>
          </list></t>

        <t>FOOTNOTE: According to RFC 0791, every IPv4 host must be capable of
        receiving a packet whose length is equal to 576 bytes. However, the
        IPv4 minimum link MTU is not 576. Section 3.2 of RFC 0791 explicitly
        states that the IPv4 minimum link MTU is 68 bytes.</t>

        <t>FOOTNOTE: In the paragraphs above, the term "non-fragmentable
        packet" is introduced. A non-fragmentable packet can be fragmented at
        its source. However, it cannot be fragmented by a downstream node. An
        IPv4 packet whose DF-bit is set to zero is fragmentable. An IPv4
        packet whose DF-bit is set to one is non-fragmentable. All IPv6
        packets are also non-fragmentable.</t>

        <t>FOOTNOTE: In the paragraphs above, the term "ICMP PTB message" is
        introduced. The ICMP PTB message has two instantiations. In <xref
        target="RFC0792">ICMPv4</xref>, the ICMP PTB message is Destination
        Unreachable message with Code equal to (4) fragmentation needed and DF
        set. This message was augmented by <xref target="RFC1191"/> to
        indicates the MTU of the link through which the packet could not be
        forwarded. In <xref target="RFC4443">ICMPv6</xref>, the ICMP PTB
        message is a Packet Too Big Message with Code equal to (0). This
        message also indicates the MTU of the link through which the packet
        could not be forwarded.</t>
      </section>

      <section title="Upper-layer Protocols">
        <t>When an upper-layer protocol submits data to the underlying IP
        module, and the resulting IP packet's length is greater than the PMTU,
        IP fragmentation may be required. IP fragmentation divides a packet
        into fragments. Each fragment includes an IP header and a portion of
        the original packet.</t>

        <t><xref target="RFC0791"/> describes IPv4 fragmentation procedures.
        IPv4 packets whose DF-bit is set to one cannot be fragmented. IPv4
        packets whose DF-bit is set to zero can be fragmented at the source
        node or by any downstream router. <xref target="RFC8200"/> describes
        IPv6 fragmentation procedures. IPv6 packets can be fragmented at the
        source node only.</t>

        <t>IPv4 fragmentation differs slightly from IPv6 fragmentation.
        However, in both IP versions, the upper-layer header appears in the
        first fragment only. It does not appear in subsequent fragments.</t>

        <t>Upper-layer protocols can operate in the following modes:</t>

        <t><list style="symbols">
            <t>Do not rely on IP fragmentation.</t>

            <t>Rely on IP source fragmentation only (i.e., fragmentation at
            the source node).</t>

            <t>Rely on IP source fragmentation and downstream fragmentation
            (i.e., fragmentation at any node along the path).</t>
          </list></t>

        <t>Upper-layer protocols running over IPv4 can operate in all of the
        above-mentioned modes. Upper-layer protocols running over IPv6 can
        operate in the first and second modes only.</t>

        <t>Upper-layer protocols that operate in the first two modes (above)
        require access to the PMTU estimate. In order to fulfil this
        requirement, they can</t>

        <t><list style="symbols">
            <t>Estimate the PMTU to be equal to the IPv4 or IPv6 minimum link
            MTU.</t>

            <t>Access the estimate that PMTUD produced.</t>

            <t>Execute PMTUD procedures themselves.</t>

            <t>Execute <xref target="RFC4821">Packetization Layer PMTUD
            (PLPMTUD)</xref> <xref
            target="I-D.fairhurst-tsvwg-datagram-plpmtud"/> procedures.</t>
          </list>According to PLPMTUD procedures, the upper-layer protocol
        maintains a running PMTU estimate. It does so by sending probe packets
        of various sizes to its peer and receiving acknowledgements. This
        strategy differs from PMTUD in that it relies of acknowledgement of
        received messages, as opposed to ICMP PTB messages concerning dropped
        messages. Therefore, PLPMTUD does not rely on the network's ability to
        deliver ICMP PTB messages to the source.</t>

        <t>An upper-layer protocol that does not rely on IP fragmentation
        never causes the underlying IP module to emit</t>

        <t><list style="symbols">
            <t>A fragmentable IP packet (i.e., an IPv4 packet with the DF-bit
            set to zero).</t>

            <t>An IP fragment.</t>

            <t>A packet whose length is greater than the PMTU estimate.</t>
          </list>However, when the PMTU estimate is greater than the actual
        PMTU, the upper-layer protocol can cause the underlying IP module to
        emit a packet whose length is greater than the actual PMTU. When this
        occurs, a downstream router drops the packet and the source node
        refines its PMTU estimate, employing either PMTUD or PLPMTUD
        procedures.</t>

        <t>When an upper-layer protocol that relies on IP source fragmentation
        only submits data to the underlying IP module, and the resulting
        packet is larger than the PMTU estimate, the underlying IP module
        fragments the packet and emits the fragments. However, the upper-layer
        protocol never causes the underlying IP module to emit</t>

        <t><list style="symbols">
            <t>A fragmentable IP packet.</t>

            <t>A packet whose length is greater than the PMTU estimate.</t>
          </list>When the PMTU estimate is greater than the actual PMTU, the
        upper-layer protocol can cause the underlying IP module to emit a
        packet whose length is greater than the actual PMTU. When this occurs,
        a downstream router drops the packet and the source node refines its
        PMTU estimate, employing either PMTUD or PLPMTUD procedures.</t>

        <t>An upper-layer protocol that relies on IP source fragmentation and
        downstream fragmentation can cause the underlying IP module to
        emit</t>

        <t><list style="symbols">
            <t>A fragmentable IP packet.</t>

            <t>An IP fragment.</t>

            <t>A packet whose length is greater than the PMTU estimate.</t>
          </list>A protocol that relies on IP source fragmentation and
        downstream fragmentation does not require access to the PMTU estimate.
        For these protocols, the underlying IP module:</t>

        <t><list style="symbols">
            <t>Fragments all packets whose length exceeds the MTU of the first
            link along the path to the destination.</t>

            <t>Sets the DF-bit to zero, so that downstream nodes can fragment
            the packet.</t>
          </list></t>
      </section>
    </section>

    <section title="Requirements Language">
      <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 <xref
      target="RFC2119">BCP 14</xref> <xref target="RFC8174"/> when, and only
      when, they appear in all capitals, as shown here.</t>
    </section>

    <section anchor="dr" title="IP Fragmentation Reduces Reliability">
      <t>This section explains how IP fragmentation reduces the reliability of
      Internet communication.</t>

      <section anchor="mb" title="Middle Box Failures">
        <t>Many middle boxes require access to the transport-layer header.
        However, when a packet is divided into fragments, the transport-layer
        header appears in the first fragment only. It does not appear in
        subsequent fragments. This omission can prevent middle boxes from
        delivering their intended services.</t>

        <t>For example, assume that a router diverts selected packets from
        their normal path towards network appliances that support deep packet
        inspection and lawful intercept. The router selects packets for
        diversion based upon the following 5-tuple:</t>

        <t><list style="symbols">
            <t>IP Source Address.</t>

            <t>IP Destination Address.</t>

            <t>IPv4 Protocol or IPv6 Next Header.</t>

            <t>transport-layer source port.</t>

            <t>transport-layer destination port.</t>
          </list></t>

        <t>IP fragmentation causes this selection algorithm to behave
        suboptimally, because the transport-layer header appears only in the
        first fragment of each packet.</t>

        <t>In another example, a middle box remarks a packet's <xref
        target="RFC2474">Differentiated Services Code Point </xref> based upon
        the above-mentioned 5-tuple. IP fragmentation causes this process to
        behave suboptimally, because the transport-layer header appears only
        in the first fragment of each packet.</t>

        <t>In all of the above-mentioned examples, the middle box cannot
        deliver its intended service without reassembling fragmented
        packets.</t>
      </section>

      <section anchor="icf" title="Partial Filtering">
        <t>IP fragments cause problems for firewalls whose filter rules
        include decision making based on TCP and UDP ports. As the port
        information is not in the trailing fragments the firewall may elect to
        accept all trailing fragments, which may admit certain classes of
        attack, or may elect to block all trailing fragments, which may block
        otherwise legitimate traffic, or may elect to reassemble all
        fragmented packets, which may be inefficient and negatively affect
        performance.</t>
      </section>

      <section title="Telemetry and Monitoring and monitoring  Failures">
        <t>Stateless telemetry and monitoring strategies may require the
        transport-layer header to appear in every packet. However, when a
        packet is divided into fragments, the transport-layer header appears
        in the first fragment only. It does not appear in subsequent
        fragments. This omission can prevent some stateless telemetry
        strategies from functioning correctly.</t>
      </section>

      <section anchor="loadblalnce" title="Suboptimal Load Balancing">
        <t>Many stateless load-balancers require access to the transport-layer
        header. Assume that a load-balancer distributes flows among parallel
        links. In order to optimize load balancing, the load-balancer sends
        every packet or packet fragment belonging to a flow through the same
        link.</t>

        <t>In order to assign a packet or packet fragment to a link, the
        load-balancer executes an algorithm. If the packet or packet fragment
        contains a transport-layer header, the load balancing algorithm
        accepts the following 5-tuple as input:</t>

        <t><list style="symbols">
            <t>IP Source Address.</t>

            <t>IP Destination Address.</t>

            <t>IPv4 Protocol or IPv6 Next Header.</t>

            <t>transport-layer source port.</t>

            <t>transport-layer destination port.</t>
          </list>However, if the packet or packet fragment does not contain a
        transport-layer header, the load balancing algorithm accepts only the
        following 3-tuple as input:</t>

        <t><list style="symbols">
            <t>IP Source Address.</t>

            <t>IP Destination Address.</t>

            <t>IPv4 Protocol or IPv6 Next Header.</t>
          </list></t>

        <t>Therefore, non-fragmented packets belonging to a flow can be
        assigned to one link while fragmented packets belonging to the same
        flow can be divided between that link and another. This can cause
        suboptimal load balancing.</t>
      </section>

      <section anchor="at" title="Security Vulnerabilities">
        <t>Security researchers have documented several attacks that rely on
        IP fragmentation. The following are examples:</t>

        <t><list style="symbols">
            <t>Overlapping fragment attack <xref target="RFC1858"/><xref
            target="RFC3128"/> <xref target="RFC5722"/></t>

            <t>Resource exhaustion attacks (such as the Rose Attack)</t>

            <t>Attacks based on predictable fragment identification values
            <xref target="RFC7739"/></t>

            <t>Attacks based on bugs in the implementation of the fragment
            reassembly algorithm</t>

            <t>Evasion of Network Intrusion Detection Systems (NIDS) <xref
            target="Ptacek1998"/></t>
          </list>In the overlapping fragment attack, an attacker constructs a
        series of packet fragments. The first fragment contains an IP header,
        a transport-layer header, and some transport-layer payload. This
        fragment complies with local security policy and is allowed to pass
        through a stateless firewall. A second fragment, having a non-zero
        offset, overlaps with the first fragment. The second fragment also
        passes through the stateless firewall. When the packet is reassembled,
        the transport layer header from the first fragment is overwritten by
        data from the second fragment. The reassembled packet does not comply
        with local security policy. Had it traversed the firewall in one
        piece, the firewall would have rejected it.</t>

        <t>A stateless firewall cannot protect against the overlapping
        fragment attack. However, destination nodes can protect against the
        overlapping fragment attack by implementing the reassembly procedures
        described in RFC 1858, RFC 3128 and RFC 8200. These reassembly
        procedures detect the overlap and discard the packet.</t>

        <t>The fragment reassembly algorithm is a stateful procedure for an
        otherwise stateless protocol. As such, it can be exploited for
        resource exhaustion attacks. An attacker can construct a series of
        fragmented packets, with one fragment missing from each packet so that
        the reassembly process cannot complete. Thus, this attack causes
        resource exhaustion on the destination node, possibly denying
        reassembly services to other flows. This type of attack can be
        mitigated by flushing fragment reassembly buffers when necessary, at
        the expense of possibly dropping legitimate fragments.</t>

        <!---->

        <t>An IP fragment contains an "Identification" field that, together
        with the IP Source Address and Destination Address of a packet,
        identifies fragments that correspond to the same original datagram, so
        that they can be reassembled together by the receiving host. Many
        implementations have employed predictable values for the
        Identification field, thus making it easy for an attacker to forge
        malicious IP fragments that would cause the reassembly procedure for
        legitimate packets to fail.</t>

        <t>Over the years multiple IPv4 and IPv6 implementations have been
        found to have flaws in their implementation of the IP fragment
        reassembly algorithm, typically resulting in buffer overflows. These
        buffer overflows have been exploitable for denial of service and
        remote code execution attacks.</t>

        <t>NIDS aims at identifying malicious activity by analyzing network
        traffic. Ambiguity in the possible result of the fragment reassembly
        process may allow an attacker to evade these systems. Many of these
        systems try to mitigate some of these evasion techniques by e.g.
        Computing all possible outcomes of the fragment reassembly process, at
        the expense of increased processing requirements.</t>
      </section>

      <section anchor="PTB" title="Blackholing Due to ICMP Loss">
        <t>As stated above, an upper-layer protocol requires access the PMTU
        estimate if it:</t>

        <t><list style="symbols">
            <t>Does not rely on IP fragmentation.</t>

            <t>Relies on IP source fragmentation only (i.e., fragmentation at
            the source node).</t>
          </list>In order to satisfy this requirement, the upper-layer
        protocol can:</t>

        <t><list style="symbols">
            <t>Estimate the PMTU to be equal to the IPv4 or IPv6 minimum link
            MTU.</t>

            <t>Access the estimate that PMTUD produced.</t>

            <t>Execute PMTUD procedures itself.</t>

            <t>Execute PLPMTUD procedures.</t>
          </list>PMTUD relies upon the network's ability to deliver ICMP PTB
        messages to the source node. Therefore, if an upper-layer protocol
        relies on PMTUD, it also relies on the network's ability to deliver
        ICMP PTB messages to the source node.</t>

        <t>According to <xref target="RFC4890"/>, ICMP PTB messages must not
        be filtered. However, ICMP PTB delivery is not reliable. It is subject
        to both transient and persistent loss.</t>

        <t>Transient loss of ICMP PTB messages causes PMTUD to perform less
        efficiently, but does not cause it to fail completely. When the
        conditions contributing to transient loss abate, the network regains
        its ability to deliver ICMP PTB messages and PMTUD regains its ability
        to function. <xref target="transLoss"/> of this document describes
        conditions that lead to transient loss of ICMP PTB messages.</t>

        <t>However, persistent loss of ICMP PTB messages causes PMTUD to fail
        completely. <xref target="CPE"/> and <xref target="Anycast"/> of this
        document describe conditions that lead to persistent loss of ICMP PTB
        messages.</t>

        <t>The problem described in this section is specific to PMTUD. It does
        not occur when the upper-layer protocol obtains its PMTU estimate from
        PLPMTUD or any other source.</t>

        <section anchor="transLoss" title="Transient Loss">
          <t>The following factors can contribute to transient loss of ICMP
          PTB messages:</t>

          <t><list style="symbols">
              <t>Network congestion.</t>

              <t>Packet corruption.</t>

              <t>Transient routing loops.</t>

              <t>ICMP rate limiting.</t>
            </list></t>

          <t>The effect of rate limiting may be severe, as RFC 4443 recommends
          strict rate limiting of IPv6 traffic.</t>
        </section>

        <section anchor="CPE"
                 title="Incorrect Implementation of Security Policy">
          <t>Incorrect implementation of security policy can cause persistent
          loss of ICMP PTB messages.</t>

          <t>Assume that a Customer Premise Equipment (CPE) router implements
          the following zone-based security policy:</t>

          <t><list style="symbols">
              <t>Allow any traffic to flow from the inside zone to the outside
              zone.</t>

              <t>Do not allow any traffic to flow from the outside zone to the
              inside zone unless it is part of an existing flow (i.e., it was
              elicited by an outbound packet).</t>
            </list>When a correct implementation of the above-mentioned
          security policy receives an ICMP PTB message, it examines the ICMP
          PTB payload in order to determine the original packet (i.e., the
          packet that elicited the ICMP PTB message) belonged to an existing
          flow. If the original packet belonged to an existing flow, the
          implementation allows the ICMP PTB to flow from the outside zone to
          the inside zone. If not, the implementation discards the ICMP PTB
          message.</t>

          <t>When a incorrect implementation of the above-mentioned security
          policy receives an ICMP PTB message, it discards the packet because
          its source address is not associated with an existing flow.</t>

          <t>The security policy described above is implemented incorrectly on
          many consumer CPE routers.</t>
        </section>

        <section anchor="Anycast" title="Persistant Loss Caused By Anycast ">
          <t>Anycast can cause persistent loss of ICMP PTB messages. Consider
          the example below:</t>

          <t>A DNS client sends a request to an anycast address. The network
          routes that DNS request to the nearest instance of that anycast
          address (i.e., a DNS Server). The DNS server generates a response
          and sends it back to the DNS client. While the response does not
          exceed the DNS server's PMTU estimate, it does exceed the actual
          PMTU.</t>

          <t>A downstream router drops the packet and sends an ICMP PTB
          message the packet's source (i.e., the anycast address). The network
          routes the ICMP PTB message to the anycast instance closest to the
          downstream router. Sadly, that anycast instance may not be the DNS
          server that originated the DNS response. It may be another DNS
          server with the same anycast address. The DNS server that originated
          the response may never receive the ICMP PTB message and may never
          updates it PMTU estimate.</t>
        </section>
      </section>

      <section title="Blackholing Due To Filtering">
        <t>In RFC 7872, researchers sampled Internet paths to determine
        whether they would convey packets that contain IPv6 extension headers.
        Sampled paths terminated at popular Internet sites (e.g., popular web,
        mail and DNS servers).</t>

        <t>The study revealed that at least 28% of the sampled paths did not
        convey packets containing the IPv6 Fragment extension header. In most
        cases, fragments were dropped in the destination autonomous system. In
        other cases, the fragments were dropped in transit autonomous
        systems.</t>

        <t>Another <xref target="Huston">recent study</xref> confirmed this
        finding. It reported that 37% of sampled endpoints used IPv6-capable
        DNS resolvers that were incapable of receiving a fragmented IPv6
        response.</t>

        <t>It is difficult to determine why network operators drop fragments.
        Possible causes follow:</t>

        <t><list style="symbols">
            <t>Hardware inability to process fragmented packets.</t>

            <t>Failure to change a vendor defaults.</t>

            <t>Unintentional misconfiguration.</t>

            <t>Intentional configuration (e.g., network operators consciously
            chooses to drop IPv6 fragments in order to address the issues
            raised in <xref target="mb"/> through <xref target="PTB"/>,
            above.)</t>
          </list></t>
      </section>
    </section>

    <section title="Alternatives to IP Fragmentation">
      <t/>

      <section title="Transport Layer Solutions">
        <t>The <xref target="RFC0793">Transport Control Protocol (TCP)</xref>)
        can be operated in a mode that does not require IP fragmentation.</t>

        <t>Applications submit a stream of data to TCP. TCP divides that
        stream of data into segments, with no segment exceeding the TCP
        Maximum Segment Size (MSS). Each segment is encapsulated in a TCP
        header and submitted to the underlying IP module. The underlying IP
        module prepends an IP header and forwards the resulting packet.</t>

        <t>If the TCP MSS is sufficiently small, the underlying IP module
        never produces a packet whose length is greater than the actual PMTU.
        Therefore, IP fragmentation is not required.</t>

        <t>TCP offers the following mechanisms for MSS management:</t>

        <t><list style="symbols">
            <t>Manual configuration</t>

            <t>PMTUD</t>

            <t>PLPMTUD</t>
          </list></t>

        <t>For IPv6 nodes, manual configuration is always applicable. If the
        MSS is manually configured to 1220 bytes and the packet does not
        contain extension headers, the IP layer will never produce a packet
        whose length is greater than the IPv6 minimum link MTU (1280 bytes).
        However, manual configuration prevents TCP from taking advantage of
        larger link MTU's.</t>

        <t>RFC 8200 strongly recommends that IPv6 nodes implement PMTUD, in
        order to discover and take advantage of path MTUs greater than 1280
        bytes. However, as mentioned in <xref target="pmtu"/>, PMTUD relies
        upon the network's ability to deliver ICMP PTB messages. Therefore,
        PMTUD is applicable only in environments where the risk of ICMP PTB
        loss is acceptable.</t>

        <t>By contrast, PLPMTUD does not rely upon the network's ability to
        deliver ICMP PTB messages. However, in many loss-based TCP congestion
        control algorithms, the dropping of a packet may cause the TCP control
        algorithm to drop the congestion control window, or even re-start with
        the entire slow start process. For high capacity, long round-trip
        time, large volume TCP streams, the deliberate probing with large
        packets and the consequent packet drop may impose too harsh a penalty
        on total TCP throughput for it to be a viable approach. <xref
        target="RFC4821"/> defines PLPMTUD procedures for TCP.</t>

        <t>While TCP will never cause the underlying IP module to emit a
        packet that is larger than the PMTU estimate, it can cause the
        underlying IP module to emit a packet that is larger than the actual
        PMTU. If this occurs, the packet is dropped, the PMTU estimate is
        updated, the segment is divided into smaller segments and each smaller
        segment is submitted to the underlying IP module.</t>

        <t>The <xref target="RFC4340">Datagram Congestion Control Protocol
        (DCCP)</xref> and the <xref target="RFC4960">Stream Control Protocol
        (SCP)</xref> also can be operated in a mode that does not require IP
        fragmentation. They both accept data from an application and divide
        that data into segments, with no segment exceeding a maximum size.
        Both DCCP and SCP offer manual configuration, PMTUD and PLPMTUD as
        mechanisms for managing that maximum size. <xref
        target="I-D.fairhurst-tsvwg-datagram-plpmtud"/> proposes PLPMTUD
        procedures for DCCP and SCP.</t>

        <t>Currently, <xref target="RFC0768">User Data Protocol (UDP)</xref>
        lacks a fragmentation mechanism of its own and relies on IP
        fragmentation. However, <xref target="I-D.ietf-tsvwg-udp-options"/>
        proposes a fragmentation mechanism for UDP.</t>
      </section>

      <section title="Application Layer Solutions">
        <t><xref target="RFC8085"/> recognizes that IP fragmentation reduces
        the reliability of Internet communication. It also recognizes that UDP
        lacks a fragmentation mechanism of its own and relies on IP
        fragmentation. Therefore, <xref target="RFC8085"/> offers the
        following advice regarding applications the run over the UDP.</t>

        <t>"An application SHOULD NOT send UDP datagrams that result in IP
        packets that exceed the Maximum Transmission Unit (MTU) along the path
        to the destination. Consequently, an application SHOULD either use the
        path MTU information provided by the IP layer or implement Path MTU
        Discovery (PMTUD) itself to determine whether the path to a
        destination will support its desired message size without
        fragmentation."</t>

        <t>RFC 8085 continues:</t>

        <t>"Applications that do not follow the recommendation to do
        PMTU/PLPMTUD discovery SHOULD still avoid sending UDP datagrams that
        would result in IP packets that exceed the path MTU. Because the
        actual path MTU is unknown, such applications SHOULD fall back to
        sending messages that are shorter than the default effective MTU for
        sending (EMTU_S in <xref target="RFC1122"/>). For IPv4, EMTU_S is the
        smaller of 576 bytes and the first-hop MTU. For IPv6, EMTU_S is 1280
        bytes. The effective PMTU for a directly connected destination (with
        no routers on the path) is the configured interface MTU, which could
        be less than the maximum link payload size. Transmission of
        minimum-sized UDP datagrams is inefficient over paths that support a
        larger PMTU, which is a second reason to implement PMTU
        discovery."</t>

        <t>RFC 8085 assumes that for IPv4, an EMTU_S of 576 is sufficiently
        small, even though the IPv4 minimum link MTU is 68 bytes.</t>

        <t>This advice applies equally to application that run directly over
        IP.</t>
      </section>
    </section>

    <section title="Applications That Rely on IPv6 Fragmentation">
      <t>The following applications rely on IPv6 fragmentation:</t>

      <t><list style="symbols">
          <t><xref target="RFC1035">DNS </xref></t>

          <t><xref target="RFC5340">OSPFv3</xref></t>

          <t>Packet-in-packet encapsulations</t>
        </list>Each of these applications relies on IPv6 fragmentation to a
      varying degree. In some cases, that reliance is essential, and cannot be
      broken without fundamentally changing the protocol. In other cases, that
      reliance is incidental, and most implementations already take
      appropriate steps to avoid fragmentation.</t>

      <t>This list is not comprehensive, and other protocols that rely on IPv6
      fragmentation may exist. They are not specifically considered in the
      context of this document.</t>

      <section title="DNS">
        <t>DNS relies on UDP for efficiency, and the consequence is the use of
        IP fragmentation for large responses, as permitted by the DNS EDNS(0)
        options in the query. It is possible to mitigate the issue of
        fragmentation-based packet loss by having queries use smaller EDNS(0)
        UDP buffer sizes, but then the operational issue of the partial level
        of support for DNS over TCP over IPv6 becomes a limiting factor of the
        efficacy of this approach in an IPv6 context <xref
        target="Damas"/>.</t>

        <t>Larger DNS responses can normally be avoided by aggressively
        pruning the Additional section of DNS responses. One scenario where
        such pruning is ineffective is in the use of DNSSEC, where large key
        sizes act to increase the response size to certain DNS queries. There
        is no effective response to this situation within the DNS other than
        using smaller cryptographic keys and adoption of DNSSEC administrative
        practices that attempt to keep DNS response as short as possible.</t>
      </section>

      <section title="OSPFv3">
        <t>OSPFv3 implementations can emit messages large enough to cause IPv6
        fragmentation. However, in keeping with the recommendations of
        RFC8200, and in order to optimize performance, most OSPFv3
        implementations restrict their maximum message size to the IPv6
        minimum link MTU.</t>
      </section>

      <section title="Packet-in-Packet Encapsulations">
        <t>In this document, packet-in-packet encapsulations include <xref
        target="RFC2003">IP-in-IP </xref>, <xref target="RFC2784">Generic
        Routing Encapsulation (GRE) </xref>, <xref
        target="RFC8086">GRE-in-UDP</xref> and <xref target="RFC2473">Generic
        Packet Tunneling in IPv6</xref>. <xref target="RFC4459"/> describes
        fragmentation issues associated with all of the above-mentioned
        encapsulations.</t>

        <t>The fragmentation strategy described for GRE in <xref
        target="RFC7588"/> has been deployed for all of the above-mentioned
        encapsulations. This strategy does not rely on IPv6 fragmentation
        except in one corner case. (see Section 3.3.2.2 of RFC 7588 and
        Section 7.1 of RFC 2473). Section 3.3 of <xref target="RFC7676"/>
        further describes this corner case.</t>
      </section>
    </section>

    <section title="Recommendations">
      <t/>

      <section title="For Application Developers">
        <t>Application developers SHOULD NOT develop applications that rely on
        IPv6 fragmentation.</t>

        <t>Application-layer protocols then depend upon IPv6 fragmentation
        SHOULD be updated to break that dependency.</t>
      </section>

      <section title="For Network Operators">
        <t>As per RFC 4890, network operators MUST NOT filter ICMPv6 PTB
        messages unless they are known to be forged or otherwise illegitimate.
        As stated in <xref target="PTB"/>, filtering ICMPv6 PTB packets causes
        PMTUD to fail. Operators MUST ensure proper PMTUD operation in their
        network, including making sure the network generates PTB packets when
        dropping packets too large compared to outgoing interface MTU.</t>

        <t>Many upper-layer protocols rely on PMTUD.</t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document makes no request of IANA.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document mitigates some of the security considerations
      associated with IP fragmentation by discouraging the use of IP
      fragmentation. It does not introduce any new security vulnerabilities,
      because it does not introduce any new alternatives to IP fragmentation.
      Instead, it recommends well-understood alternatives.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>Thanks to Mikael Abrahamsson, Lorenzo Colitti, Mike Heard, Tom
      Herbert, Tatuya Jinmei, Paolo Lucente, Eric Nygren, and Joe Touch for
      their comments.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.8085'?>

      <?rfc include='reference.RFC.8200'?>

      <?rfc include='reference.RFC.0791'?>

      <?rfc include='reference.RFC.8201'?>

      <?rfc include='reference.RFC.4821'?>

      <?rfc include='reference.RFC.1191'?>

      <?rfc include='reference.RFC.0792'?>

      <?rfc include='reference.RFC.0793'?>

      <?rfc include='reference.RFC.0768'?>

      <?rfc include='reference.RFC.1035'?>

      <?rfc include='reference.RFC.4443'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.7872'?>

      <?rfc include='reference.RFC.1122'?>

      <?rfc include='reference.RFC.2474'?>

      <?rfc include='reference.RFC.1858'?>

      <?rfc include='reference.RFC.2473'?>

      <?rfc include='reference.RFC.4960'?>

      <?rfc include='reference.RFC.5927'?>

      <?rfc ?>

      <?rfc include='reference.RFC.4340'?>

      <?rfc include='reference.RFC.2003'?>

      <?rfc include='reference.RFC.5340'?>

      <?rfc include='reference.RFC.4890'?>

      <?rfc include='reference.RFC.2784'?>

      <?rfc include='reference.RFC.7676'?>

      <?rfc include='reference.RFC.5722'?>

      <?rfc include='reference.RFC.7739'?>

      <?rfc include='reference.RFC.7588'?>

      <?rfc include='reference.RFC.8086'?>

      <?rfc include='reference.RFC.4459'?>

      <?rfc include='reference.I-D.fairhurst-tsvwg-datagram-plpmtud'?>

      <?rfc include='reference.I-D.ietf-tsvwg-udp-options'?>

      <?rfc ?>

      <?rfc include='reference.RFC.3128'?>

      <reference anchor="Huston">
        <front>
          <title>IPv6, Large UDP Packets and the DNS
          (http://www.potaroo.net/ispcol/2017-08/xtn-hdrs.html)</title>

          <author fullname="Geoff Huston" initials="G." surname="Huston">
            <organization/>
          </author>

          <date month="August" year="2017"/>
        </front>
      </reference>

      <reference anchor="Damas"
                 target="http://www.potaroo.net/ispcol/2018-04/atr.html">
        <front>
          <title>Measuring ATR</title>

          <author fullname="Joao Damas" initials="J." surname="Damas">
            <organization/>
          </author>

          <author fullname="Geoff Huston" initials="G." surname="Huston">
            <organization/>
          </author>

          <date month="April" year="2018"/>
        </front>
      </reference>

      <reference anchor="Ptacek1998"
                 target="http://www.aciri.org/vern/Ptacek-Newsham-Evasion-98.ps">
        <front>
          <title>Insertion, Evasion and Denial of Service: Eluding Network
          Intrusion Detection</title>

          <author fullname="T. H. Ptacek" initials="T. H." surname="Ptacek">
            <organization>Secure Networks, Inc.</organization>
          </author>

          <author fullname="T. N. Newsham" initials="T. N." surname="Newsham">
            <organization>Secure Networks, Inc.</organization>
          </author>

          <date year="1998"/>
        </front>
      </reference>
    </references>

    <section title="Contributors' Address">
      <figure>
        <artwork><![CDATA[
]]></artwork>
      </figure>

      <t/>
    </section>
  </back>
</rfc>
