<?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 rfc2460 PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2460.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-02">
  <front>
    <title abbrev="tcp-and-ipv6-use-min-mtu">TCP Fails To Respect IPV6_USE_MIN_MTU</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_MIN_MTU <xref target="RFC3542" />, Section
	11.1, socket option directs the IP layer to limit the IPv6
	packet size to the minimum required supported MTU from the
	base IPv6 specification <xref target="RFC2460" />, i.e. 1280 bytes.  Many
	implementations of TCP running over IPv6 neglect to check
	the IPV6_USE_MIN_MTU value when performing MSS negotiation
	and when constructing a TCP segment.  This leads to oversized
	IPv6 packets being sent resulting in unintended Path Maximum
	Transport Unit Discovery (PMTUD) <xref target="RFC1191" />
	being performed and to fragmented IPv6 packets being sent.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" title="Introduction">
      <t>
	The IPV6_USE_MIN_MTU <xref target="RFC3542" />, Section
	11.1, socket option directs the IP layer to limit the IPv6
	packet size to the minimum required supported MTU from the
	base IPv6 specification [RFC2460], i.e. 1280 bytes.  Many
	implementations of TCP running over IPv6 neglect to check
	the IPV6_USE_MIN_MTU value when performing MSS negotiation
	and when constructing a TCP segment.  This leads to oversized
	IPv6 packets being sent resulting in unintended Path Maximum
	Transport Unit Discovery (PMTUD) <xref target="RFC1191" />
	being performed and to fragmented IPv6 packets being sent.
      </t>
      <t>
	TCP, when running over IPv6, SHOULD check the value of
	IPV6_USE_MIN_MTU when performing MSS negotiation.  TCP
	implementations already use learnt PMTU and interface MTU
	when performing MSS negotiation.  This is yet another
	constaint on the MTU which SHOULD be considered.
      </t>
      <t>
	TCP, when running over IPv6, SHOULD check the value of
	IPV6_USE_MIN_MTU when calculating the segment size to send.
	TCP implementations already use learnt PMTU and interface
	MTU when 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 value of
	IPV6_USE_MIN_MTU when performing MSS negotiation.  If the
	value of IPV6_USE_MIN_MTU is one (1) then the application
	has requested that PMTUD not be performed on the socket and
	that IPv6 packets be sent at a size no greater then the
	network minimum 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 value of
	IPV6_USE_MIN_MTU when calculation the next segment to send.
	If the value of IPV6_USE_MIN_MTU 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_MIN_MTU
	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 to intermediate nodes not passing fragmented packets.
      </t>
    </section>
    <section title="Current Usage">
      <t>
	A example of current usage of IPV6_USE_MIN_MTU=1 and TCP
	is in DNS nameservers.  This is done as the TCP message
	streams are normally no more than a couple of IPv6 packets
	so there is little benefit in using maximum sized packet,
	and no real negative effects from using smaller packets.
	There are lots of servers / clients that these servers talk
	to and maintaining PMTU knowledge is not effective for long
	enough resulting in PMTUD being repeated performed.  There
	are external time constraints where recovery from lost
	ICMPv6 PTB will result in a elapsed transaction time that
	falls outside of the time constraint window.
      </t>
    </section>
    <section title="Acknowlegments">
      <t>
	I would like to thank Havard Eidnes, Sander Steffann and
	John Leslie for their feedback.
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      &rfc1191; &rfc2119; &rfc2460; &rfc3542;
    </references>
  </back>
</rfc>
