<?xml version='1.0' encoding='ascii'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc autobreaks="yes"?>
<?rfc tocindent="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc ipr="trust200902" docName="draft-ietf-tram-stun-pmtud-02" category="std" obsoletes="" updates="" submissionType="IETF" xml:lang="en">
  <front>
    <title abbrev="STUN PMTUD">Path MTU Discovery Using Session Traversal Utilities for NAT (STUN)</title>
    <author initials="M." surname="Petit-Huguenin" fullname="Marc Petit-Huguenin">
      <organization>Impedance Mismatch</organization>
      <address>
        <email>marc@petit-huguenin.org</email>
      </address>
    </author>
    
    <author fullname="Gonzalo Salgueiro" initials="G." surname="Salgueiro">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street>7200-12 Kit Creek Road</street>

          <city>Research Triangle Park</city>

          <region>NC</region>

          <code>27709</code>

          <country>United States</country>
        </postal>

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

    
    <date year="2016"/>
    <area>TSV</area>
    <workgroup>TRAM</workgroup>
    <abstract>
      <t>This document describes a Session Traversal Utilities for NAT (STUN) usage for Path MTU Discovery (PMTUD) between a client and a server.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="section.introduction" title="Introduction" toc="default">
      <t><xref target="RFC4821" pageno="false" format="default">The Packetization Layer Path MTU Discovery specification</xref> describes a method to discover the path MTU but does not describe a practical protocol to do so with UDP.  </t>
      <t>This document only describes how probing mechanisms are implemented with Session Traversal Utilities for NAT (STUN).  The algorithm to find the path MTU is described in <xref target="RFC4821" pageno="false" format="default"/>.</t>

<t>The STUN usage defined in this document for Path MTU Discovery (PMTUD) between a client and a server simplifies troubleshooting and has multiple applications across a wide variety of technologies.</t>  

      <t>Additional network characteristics like the network path (using the STUN Traceroute mechanism described in
   <xref target="I-D.martinsen-tram-stuntrace"/>) and bandwidth availability (using the mechanism described in <xref target="I-D.martinsen-tram-turnbandwidthprobe"/>) can be discovered using complementary techniques.</t>   
    </section>
    <section anchor="section.terminology" title="Terminology" toc="default">
      <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" pageno="false" format="default"/>.  When these words are not in ALL CAPS (such as "must" or "Must"), they have their usual English meanings, and are not to be interpreted as RFC 2119 key words.  </t>
    </section>
    <section anchor="section.probing" title="Probing Mechanisms" toc="default">
      <t>A client MUST NOT send a probe if it does not have knowledge that the server supports this specification.  This is done by an external mechanism specific to each UDP protocol.  <xref target="section.mechanisms" pageno="false" format="default"/> describes some of this mechanisms.  </t>
      <t>The probe mechanism is used to discover the path MTU in one direction only, from the client to the server.  </t>
      <t>Two probing mechanisms are described, a simple probing mechanism and a more complete mechanism that can converge quicker.  </t>
      <t>The simple probing mechanism is implemented by sending a Probe Request with a <xref target="RFC5780" pageno="false" format="default">PADDING</xref> attribute and the DF bit set over UDP.  A router on the path to the server can reject this request with an ICMP message or drop it.  The client SHOULD cease retransmissions after 3 missing responses.  </t>
      <t>The complete probing mechanism is implemented by sending one or more Probe Indication with a PADDING attribute and the DF bit set over UDP then a Report Request to the same server.  A router on the path to the server can reject this indication with an ICMP message or drop it.  The server keeps a time ordered list of identifiers of all packets received (including retransmitted packets) and sends this list back to the client in the Report Response.  The client analyzes this list to find which packets were not received.  Because UDP packets does not contain an identifier, the complete probing mechanism needs a way to identify each packet received.  While there are other possible packet identification schemes, this document describes two different ways to identify a specific packet.  </t>
      <t>In the first packet identifier mechanism, the server computes a checksum over each packet received and sends back to the sender the ordered list of checksums.  The client compares this list to its own list of checksums.  </t>
      <t>In the second packet identifier mechanism, the client adds a sequential number in front of each UDP packet sent.  The server sends back the ordered list of sequential numbers received that the client compares to its own list </t>
    </section>
    <section anchor="section.simple" title="Simple Probing Mechanism" toc="default">
      <section anchor="section.simple.send-request" title="Sending a Probe Request" toc="default">
        <t>A client forms a Probe Request by following the rules in Section 7.1 of <xref target="RFC5389" pageno="false" format="default"/>.  No authentication method is used.  The client adds a <xref target="RFC5780" pageno="false" format="default">PADDING</xref> attribute with a length that, when added to the IP and UDP headers and the other STUN components, is equal to the Selected Probe Size, as defined in <xref target="RFC4821" pageno="false" format="default"/> section 7.3.  The client MUST add the FINGERPRINT attribute.  </t>
        <t>Then the client sends the Probe Request to the server over UDP with the DF bit set.  The client SHOULD stop retransmitting after 3 missing responses.  </t>
      </section>
      <section anchor="section.simple.receive-request" title="Receiving a Probe Request" toc="default">
        <t>A server receiving a Probe Request MUST process it as specified in <xref target="RFC5389" pageno="false" format="default"/>.  The server MUST NOT challenge the client.  </t>
        <t>The server then creates a Probe Response.  The server MUST add the FINGERPRINT attribute.  The server then sends the response to the client.  </t>
      </section>
      <section anchor="section.simple.receive-response" title="Receiving a Probe Response" toc="default">
        <t>A client receiving a Probe Response MUST process it as specified in  <xref target="RFC5389" pageno="false" format="default"/>.  If a response is received this is interpreted as a Probe Success as defined in <xref target="RFC4821" pageno="false" format="default"/> section 7.6.1.  If an ICMP packet "Fragmentation needed" is received then this is interpreted as a Probe Failure as defined in <xref target="RFC4821" pageno="false" format="default"/> section 7.6.2.  If the Probe transactions fails in timeout, then this is interpreted as a Probe Inconclusive as defined in <xref target="RFC4821" pageno="false" format="default"/> section 7.6.4.  </t>
      </section>
    </section>
    <section anchor="section.complete" title="Complete Probing Mechanism" toc="default">
      <section title="Sending the Probe Indications and Report Request" toc="default">
        <t>A client forms a Probe Indication by following the rules in <xref target="RFC5389" pageno="false" format="default"/> section 7.1.  The client adds to the Probe Indication a PADDING attribute with a size that, when added to the IP and UDP headers and the other STUN components, is equal to the Selected Probe Size, as defined in <xref target="RFC4821" pageno="false" format="default"/> section 7.3.  The client MUST add the FINGERPRINT attribute.  </t>
        <t>Then the client sends the Probe Indication to the server over UDP with the DF bit set.  </t>
        <t>Then the client forms a Report Request by following the rules in <xref target="RFC5389" pageno="false" format="default"/> section 7.1.  No authentication method is used.  The client MUST add the FINGERPRINT attribute.  </t>
        <t>Then the client waits half the RTO if it is known or 50 milliseconds after sending the Probe Indication and sends the Report Request to the server over UDP.  </t>
      </section>
      <section anchor="section.complete.icmp" title="Receiving an ICMP packet" toc="default">
        <t>If an ICMP packet "Fragmentation needed" is received then this is interpreted as a Probe Failure as defined in <xref target="RFC4821" pageno="false" format="default"/> section 7.5.  </t>
      </section>
      <section anchor="section.complete.receive-request" title="Receiving a Probe Indication and Report Request" toc="default">
        <t>A server supporting this specification and knowing that the client also supports it will keep the identifiers of all packets received in a list ordered by receiving time.  The same identifier can appear multiple times in the list because of retransmission.  The maximum size of this list is calculated so that when the list is added to the Report Response, the total size of the packet does not exceed the unknown path MTU as defined in <xref target="RFC5389" pageno="false" format="default"/> section 7.1.  Older identifiers are removed when new identifiers are added to a list already full.  </t>
        <t>A server receiving a Report Request MUST process it as specified in <xref target="RFC5389" pageno="false" format="default"/>.  The server MUST NOT challenge the client.  </t>
        <t>The server creates a Report Response and adds an IDENTIFIERS attribute that contains the list of all identifiers received so far.  The server MUST add the FINGERPRINT attribute.  The server then sends the response to the client.  </t>
      </section>
      <section anchor="section.complete.receive-response" title="Receiving a Report Response" toc="default">
        <t>A client receiving a Report Response processes it as specified in  <xref target="RFC5389" pageno="false" format="default"/>.  If the response IDENTIFIERS attribute contains the identifier of the Probe Indication, then this is interpreted as a Probe Success for this probe as defined in <xref target="RFC4821" pageno="false" format="default"/> Section 7.5.  If the Probe Indication identifier cannot be found in the Report Response, this is interpreted as a Probe Failure as defined in <xref target="RFC4821" pageno="false" format="default"/> Section 7.5.  If the Probe Indication identifier cannot be found in the Report Response but other packets identifier sent before or after the Probe Indication cannot also be found, this is interpreted as a Probe Inconclusive as defined in <xref target="RFC4821" pageno="false" format="default"/> Section 7.5.  If the Report Transaction fails in timeout, this is interpreted as a Full-Stop Timeout as defined in <xref target="RFC4821" pageno="false" format="default"/> Section 3.  </t>
      </section>
      <section anchor="section.complete.checksum" title="Using Checksum as Packet Identifiers" toc="default">
        <t>When using checksum as packet identifiers, the client calculate the checksum for each packet sent over UDP and keep this checksum in an ordered list.  The server does the same thing and send back this list in the Report Response.  </t>
        <t>It could have been possible to use the checksum generated in the UDP checksum for this, but this value is generally not accessible to applications.  Also sometimes the checksum is not calculated or off-loaded to the network card.  </t>
      </section>
      <section anchor="section.complete.numbers" title="Using Sequential Numbers as Packet Identifiers" toc="default">
        <t>When using sequential numbers, a small header similar to the TURN ChannelData header is added in front of all non-STUN packets.  The sequential number is incremented for each packet sent.  The server collects the sequence number of the packets sent.</t>
        <figure title="" suppress-title="false" align="left" alt="" width="" height="">
          <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Channel Number        |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
/                       Application Data                        /
/                                                               /
|                                                               |
|                               +-------------------------------+
|                               |
+-------------------------------+
					</artwork>
        </figure>
        <t>The Channel Number is always 0xFFFF.</t>
      </section>
    </section>
    <section anchor="section.mechanisms" title="Probe Support Discovery Mechanisms" toc="default">
      <section title="Implicit Mechanism" toc="default">
        <t>An endpoint acting as a client for the STUN usage described in this specification MUST also act as a server for this STUN usage.  This means that a server receiving a probe can assumes that it can acts as a client to discover the path MTU to the IP address and port from which it received the probe.  </t>
      </section>
      <section anchor="section.mechanisms.turn" title="Probe Support Discovery with TURN" toc="default">
        <t>A TURN client supporting this STUN usage will add a PMTUD-SUPPORTED attribute to the Allocate Request sent to the TURN server.  The TURN server can immediately start to send probes to the TURN client on reception of an Allocation Request with a PMTUD-SUPPORTED attribute.  The TURN client will then use the Implicit Mechanism described above to send probes.  </t>
      </section>
      <section anchor="section.mechanisms.ice" title="Probe Support Discovery with ICE" toc="default">
        <t>An <xref target="RFC5245" pageno="false" format="default">ICE</xref> client supporting this STUN usage will add a PMTUD-SUPPORTED attribute to the Binding Request sent during a connectivity check.  The ICE server can immediately start to send probes to the ICE client on reception of a Binding Request with a PMTUD-SUPPORTED attributed.  Local candidates receiving Binding Request with the PMTUD-SUPPORTED flag must not start PMTUD with the remote candidate if already done so.  The ICE client will then use the Implicit Mechanism described above to send probes.  </t>
      </section>
    </section>
    <!--section anchor="section.ref-impl" title="Implementation Status"> <t>[[Note to RFC Editor: Please remove this section and the reference to <xref target="RFC6982" /> before publication.]]</t> <t> This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in <xref target="RFC6982" />.  The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs.  Please note that the listing of any individual implementation here does not imply endorsement by the IETF.  Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors.  This is not intended as, and must not be construed to be, a catalog of available implementations or their features.  Readers are advised to note that other implementations may exist.  </t> <t> According to <xref target="RFC6982" />, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature.  It is up to the individual working groups to use this information as they see fit".  </t> <section anchor="section.impl-status." title=""> <t> <list style="hanging"> <t hangText="Organization: "></t> <t hangText="Name: "></t> <t hangText="Description: "></t> <t hangText="Level of maturity: "></t> <t hangText="Coverage: "></t> <t hangText="Licensing: "></t> <t hangText="Implementation experience: "></t> <t hangText="Contact: "></t> </list> </t> </section> </section-->
    <section anchor="section.security" title="Security Considerations">
<t>
The PMTUD mechanism described in this document does not introduce any specific security considerations beyond those described in <xref target="RFC4821" />.</t>
<t>The attack described in <xref target="RFC4821" /> applies equally to the mechanism described in this document.
</t>
</section>
    <section anchor="section.iana" title="IANA Considerations" toc="default">
      <t>This specification defines two new STUN method and two new STUN attributes.  IANA added these new protocol elements to the "STUN Parameters Registry" created by <xref target="RFC5389" pageno="false" format="default"/>.</t>
    <section anchor="section.iana.methods" title="New STUN Methods">
    <t>This section lists the codepoints for the new STUN methods defined in this specification.  See Sections <xref target="section.simple" /> and <xref target="section.complete" /> for the semantics of these new methods.</t>
      <t><list><t>0xXXX : Probe</t><t>0xXXX : Report</t></list> </t>  
      </section>
      <section anchor="section.iana.attributes" title="New STUN Attributes">
    <t>This document defines the IDENTIFIERS STUN attribute, described in <xref target="section.complete" />.  IANA has allocated the comprehension-required codepoint 0xXXXX for this attribute.</t>

   <t>This document also defines the PMTUD-SUPPORTED STUN attribute, described in <xref target="section.mechanisms" />.  IANA has allocated the comprehension-optional codepoint 0xXXXX for this attribute.</t>
   </section>  
    </section>
    <section anchor="section.acknowledgments" title="Acknowledgements" toc="default">
      <t>Thanks to Eilon Yardeni, Geir Sandbakken and Paal-Erik Martinsen for their review comments, suggestions and questions that helped to improve this document.</t>
      <t>Special thanks to Dan Wing, who supported this document since its first publication back in 2008.</t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      
      <?rfc include="reference.RFC.2119" ?>
      <?rfc include="reference.RFC.4821" ?>
      <?rfc include="reference.RFC.5245" ?>      
      <?rfc include="reference.RFC.5389" ?>

    </references>
    
    <references title="Informative References">

      <?rfc include="reference.I-D.martinsen-tram-stuntrace"?>
      <?rfc include="reference.I-D.martinsen-tram-turnbandwidthprobe"?>
      <?rfc include="reference.RFC.5780" ?>
      
    </references>
    
    <section title="Release Notes" toc="default">
      <t>This section must be removed before publication as an RFC.  </t>
      <section title="Modifications between draft-ietf-tram-stun-pmtud-02 and draft-ietf-tram-stun-pmtud-01"><t>
      <list style="symbols"><t>Cleaned up references.</t>
      </list> </t>
</section>
      <section title="Modifications between draft-ietf-tram-stun-pmtud-01 and draft-ietf-tram-stun-pmtud-00"><t>
      <list style="symbols"><t>Added Security Considerations Section.</t><t>Added IANA Considerations Section.</t>
      </list> </t>
</section>
      <section title="Modifications between draft-ietf-tram-stun-pmtud-00 and draft-petithuguenin-tram-stun-pmtud-01" toc="default">
        <t><list style="symbols"><t>Adopted by WG - Text unchanged.</t></list> </t>
      </section>
      <section title="Modifications between draft-petithuguenin-tram-stun-pmtud-01 and draft-petithuguenin-tram-stun-pmtud-00" toc="default">
        <t><list style="symbols"><t>Moved some Introduction text to the Probing Mechanism section.</t><t>Added cross-reference to the other two STUN troubleshooting mechanism drafts.</t><t>Updated references.</t><t>Added Gonzalo Salgueiro as co-author.</t></list> </t>
      </section>
      <section title="Modifications between draft-petithuguenin-tram-stun-pmtud-00 and draft-petithuguenin-behave-stun-pmtud-03" toc="default">
        <t><list style="symbols"><t>General refresh for republication.</t></list> </t>
      </section>
      <section title="Modifications between draft-petithuguenin-behave-stun-pmtud-03 and draft-petithuguenin-behave-stun-pmtud-02" toc="default">
        <t><list style="symbols"><t>Changed author address.</t><t>Changed the IPR to trust200902.</t></list> </t>
      </section>
      <section title="Modifications between draft-petithuguenin-behave-stun-pmtud-02 and draft-petithuguenin-behave-stun-pmtud-01" toc="default">
        <t><list style="symbols"><t>Replaced the transactions identifiers by packet identifiers</t><t>Defined checksum and sequential numbers as possible packet identifiers.</t><t>Updated the reference to RFC 5389</t><t>The FINGERPRINT attribute is now mandatory.</t><t>Changed the delay between Probe indication and Report request to be RTO/2 or 50 milliseconds.</t><t>Added ICMP packet processing.</t><t>Added Full-Stop Timeout detection.</t><t>Stated that Binding request with PMTUD-SUPPORTED does not start the PMTUD process if already started.</t></list> </t>
      </section>
      <section title="Modifications between draft-petithuguenin-behave-stun-pmtud-01 and draft-petithuguenin-behave-stun-pmtud-00" toc="default">
        <t><list style="symbols"><t>Removed the use of modified STUN transaction but shorten the retransmission for the simple probing mechanism.  </t><t>Added a complete probing mechanism.  </t><t>Removed the PADDING-RECEIVED attribute.  </t><t>Added release notes.  </t></list> </t>
      </section>
      <!--section title="Design Notes"> <t> <list style="symbols"> </list> </t> </section-->
      <!--section title="TODO List"> <t> <list style="symbols"> </list> </t> </section-->
    </section>
  </back>
</rfc>
