<?xml version="1.0"?>
<?rfc compact="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc toc="yes" ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc1191 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1191.xml'>
<!ENTITY rfc2119 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc3542 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3542.xml'>
]>
<rfc ipr="trust200902" category="info" docName="draft-andrews-tcp-and-ipv6-use-minmtu-00">
  <front>
    <title abbrev="tcp-and-ipv6-use-minmtu">TCP Fails To Respect IPV6_USE_MINMTU</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="October" year="2015"/>
    <abstract>
      <t>
	The IPV6_USE_MINMTU socket option is used to set the maximum
	IPv6 packet size to be used on a socket.  Many implementations
	of TCP running over IPv6 neglect to check the IPV6_USE_MINMTU
	value when performing MSS negotiation and when contructing
	a TCP segment.  This lead to oversized IPv6 packets being
	sent resulting in  unintended Path Maximum Transport Unit
	Discovery (PMTUD) being performed and to fragmented IPv6
	packets being sent.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" title="Introduction">
      <t>
	The IPV6_USE_MINMTU <xref target="RFC3542" /> socket option
	is used to set the maximum IPv6 packet size to be used on
	a socket.  Many implementations of TCP running over IPv6
	neglect to check this value when performing MSS negotiation
	and when contructing a TCP segment.  This lead to oversized
	IPv6 packets being sent resulting unintended PMTUD <xref
	target="RFC1191" /> being performed and to fragmented IPv6
	packets being sent.
      </t>
      <t>
	TCP when running over IPv6 SHOULD check the state of
	the IPV6_USE_MINMTU when performing MSS negotiation.
	TCP implementions already use learnt PMTU and interface
	MTU when performing MSS negotiation.
      </t>
      <t>
	TCP, when running over IPv6, SHOULD check the state of the
	IPV6_USE_MINMTU when calculating the segment size to send.
	TCP implementions already use learnt PMTU and interface MTU
	when performing calculating the segment size to send.
      </t>
      <section anchor="reserved" title="Reserved Words">
        <t>
          The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
          and "OPTIONAL" in this document are to be interpreted as
          described in <xref target="RFC2119" />.
        </t>
      </section>
    </section>
    <section title="MSS Negotiation">
      <t>
	TCP when running over IPv6 SHOULD check the state of
        the IPV6_USE_MINMTU when performing MSS negotiation.
	If the value of IPV6_USE_MINMTU is one (1) then the
	application has requested that PMTUD not be performed
	on the is socket and that IPv6 packets be sent at a
	size no greater then the network minumum MTU of 1280
	bytes.  This means that the TCP MSS negotiation size
	SHOULD be no bigger than 1220 (1280 - 40 - 20) to
	account for the IPv6 header and the TCP header and MAY
	be smaller.
      </t>
      <t>
	If this negotiation is properly performed then PMTUD
	of reply traffic should not normally occur.
      </t>
    </section>
    <section title="Segment Size Calculation">
      <t>
	TCP when running over IPv6 SHOULD check the state of
        the IPV6_USE_MINMTU when calculation the next segment
	to send.  If the value of IPV6_USE_MINMTU is one (1)
	them the maximum segment size SHOULD be 1220.
      </t>
      <t>
	If the TCP layer neglects to check the value of IPV6_USE_MINMTU
	and it is one (1), the packet, when passed to the IPv6
	layer, will be fragmented if the resulting packet is bigger
	that 1280 octets.  This can result in communications failures
	due too itermediate nodes not passing fragmented packets.
      </t>
    </section>
    <section title="Current Usage">
      <t>
	The IPV6_USE_MINMTU and TCP are used together in DNS nameservers
	as TCP message streams are normally no more than a couple of
	IPv6 packets, there are lots of servers / clients and there
	are external time contraints where recovery from lost ICMPv6
	PTB will fall outside of the time constraint window.
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
     &rfc1191; &rfc2119; &rfc3542;
    </references>
  </back>
</rfc>
