<?xml version="1.0"?>
<?rfc compact="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc toc="yes" ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<rfc ipr="trust200902" docName="draft-andrews-6man-fragopt-01.txt">
  <front>
    <title abbrev="hop by hop frag opts">IPv6 Stateless Fragmentation Identification Options</title>
    <author initials="M." surname="Andrews" fullname="M. Andrews">
      <organization abbrev="ISC">Internet Systems Consortium</organization>
      <address>
        <postal>
          <street>950 Charter Street</street>
          <city>Redwood City</city>
          <region>CA</region>
          <code>94063</code>
          <country>US</country>
        </postal>
        <email>marka@isc.org</email>
      </address>
    </author>
    <date month="Aug" year="2013"/>
    <abstract>
      <t>
	Fragmented IPv6 packets are often dropped because there is no
	way to identify whether a fragment matches a otherwise permitted
	packet as the L4 header information is not available on all the
	fragments.
      </t>
      <t>
	The document defines hop-by-hop options that can be used to
	supply the missing information in non initial fragments.
      </t>
    </abstract>
  </front>
  <middle>
    <section toc="yes" anchor="intro" title="Introduction">
      <t>
	Fragmented IPv6 packets are often dropped because there is no
	way to identify whether a fragment matches a otherwise permitted
	packet as the L4 header information is not available on all the
	fragments.
      </t>
      <t>
	The document defines hop-by-hop options that can be used to
	supply the missing information in non initial fragments.
      </t>
      <t>
 	The information required differs depending upon the L4 packet.
	For TCP and UDP the source and destination ports are needed.
	For ICMP the type of ICMP packet is needed.
      </t>
      <t>
	These options are expected to be used by middle boxes (firewalls
	and load balancers) and end nodes.
      </t>
    </section>
    <section toc="yes" anchor="tcpandudp" title="TCP and UDP Fragments">
      <t>
	For TCP and UDP a skippable hop-by-hop option <xref
	target="RFC2460" /> (for backwards compatibility) containing
	the source and destination ports from the TCP and UDP headers
	is needed. To permit the use of NATs, however undesired,
	the option contents are marked changeable enroute.  The option code
	has mnemonic PORTS and value (TBD) and is added to all
	fragments of UDP and TCP packets when they are fragmented.
	By adding the option to all fragments you reduce the amount
	of fragmentation reassembly failures that would result if
	you only added the option to non-initial fragments and were
	dropping non-initial fragments without this option.
      </t>
      <t>
      	NAT should update the port fields to match those in the TCP
	and UDP headers if it updates those fields as part of the
	NAT processing.
      </t>
      <figure>
        <artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|0|1|  (TBD)  |      4        |           source port         |
   +---------------+---------------+---------------+---------------+
   |       destination port        |
   +-------------------------------+
        </artwork>
      </figure>
    </section>
    <section toc="yes" anchor="icmp" title="ICMPv6 Fragments">
      <t>
	To identify the type of ICMPv6 packet a fragment is part of
	the type and code values need to be copied from the ICMPv6 header.
	As with the TCP and UDP case, a skippable hop-by-hop option
	is required.  ICMPv6 type and code points are not changed
	by NAT so a immutable hop-by-hop option could be used.
      </t>
      <t>
	In most cases a ICMPv6 error message won't need to be fragmented
	as the maximum size of a ICMPv6 
      </t>
      <figure>
        <artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|0|0|  (TBD)  |      2        |     type      |     code      |
   +---------------+---------------+---------------+---------------+
        </artwork>
      </figure>
    </section>
    <section toc="yes" anchor="ipv4inipv6" title="IPv4 in IPv6">
      <t>
	For IPv4 in IPv6 the IPv4 source and destination addresses
	are needed.
      </t>
      <figure>
        <artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|0|0|  (TBD)  |      8        |       IPv4 source address     ~
   +---------------+---------------+---------------+---------------+
   ~       IPv4 source address     |    IPv4 destination address   ~
   +---------------+---------------+---------------+---------------+
   ~     IPv4 destination address  |
   +---------------+---------------+
        </artwork>
      </figure>
    </section>
    <section toc="yes" anchor="ipv6inipv6" title="IPv6 in IPv6">
      <t>
	For IPv6 in IPv6 the IPv6 source and destination addresses
	are needed.
      </t>
      <figure>
        <artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|0|0|  (TBD)  |      32       |       IPv6 source address     ~
   +---------------+---------------+---------------+---------------+
   ~                       IPv6 source address                     ~
   +---------------+---------------+---------------+---------------+
   ~      IPv6 source address      |    IPv6 destination address   ~
   +---------------+---------------+---------------+---------------+
   ~                      IPv6 destination address                 ~
   +---------------+---------------+---------------+---------------+
   ~  IPv6 destination address     | 
   +---------------+---------------+
        </artwork>
      </figure>
    </section>
    <section toc="yes" anchor="open" title="Open Questions">
      <t>
	Should this be a single hop-by-hop option or multiple hop-by-hop
	options?
      </t>
      <t>
	If a single hop-by-hop option, should it include the next header
	field of the fragment header or should this be implicit?
      </t>
    </section>
    <section toc="yes" anchor="iana" title="IANA Considerations">
      <t>
	To be completed.
      </t>
    </section>
    <section toc="yes" anchor="security" title="Security Considerations">
      <t>
	The use of these options will expose nodes to more fragmentation
	based attacks and potentially more traffic which will ultimately
	be dropped if a attacker can guess which option values will be
	permitted.
      </t>
      <t>
	With the exception of the fragmentation based attacks, permitting
	fragments with these options is no worse that permitting multiple
	un-fragmented packets based in the same parameters.
      </t>
      <t>
	When reassembling a packet all fragments of a packet should
	have a identical fragment identification option and it should
	be on all fragment or on none of the fragments.
      </t>
      <t>
	For TCP and UDP the ports values may or may not match up
	with those of the un-fragmented packet when the packet has
	been through a NAT.  When a packet has passed through
	multiple NAT boxes that are unaware of this option both the
	source and destination ports may have been changed so the
	ports may appear to be completely unrelated.  The source
	port is changed by a client NAT and the destination port
	is changed by a NAT acting a load balancer.
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <reference anchor="RFC2460">
        <front>
          <title>Internet Protocol, Version 6 (IPv6) Specification</title>
          <author initials="S." surname="Deering" fullname="S. Deering">
            <organization />
          </author>
          <author initials="R." surname="Hinden" fullname="R. Hinden">
            <organization />
          </author>
          <date month="December" year="1998" />
        </front>
        <seriesInfo name="RFC" value="2460" />
      </reference>
    </references>
  </back>
</rfc>
