<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-bergeon-flowspec-ttl-match-00"
     ipr="trust200902" submissionType="IETF">
  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the
        full title is longer than 39 characters -->

    <title abbrev="Flowspec TTL (Time to Live) Match">Flowspec TTL (Time to Live) Match</title>

    <author fullname="Philippe Bergeon" initials="P." role="editor"
            surname="Bergeon">
      <organization>Nokia</organization>
      <address>
        <email>philippe.bergeon@nokia.com</email>
      </address>
    </author>

    <date day="12" month="July" year="2021"/>

    <area>RTG</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions.
   If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>BGP</keyword>

    <keyword>Flowspec</keyword>

    <keyword>TTL</keyword>

    <abstract>
      <t>This document defines a new component type to match TTL (Time to Live) values using BGP Flow Specification rules.</t>

    </abstract>

  </front>

  <middle>
    <section title="Introduction">
      <t>One general purpose of BGP Flowspec <xref target="RFC8955"/> is to distribute firewall rules, also known as filtering or Access Control Lists (ACLs) rules,
      in receiving routers for mitigation of denial-of-service (DoS) attacks using flows specifications encoded as BGP NLRI <xref target="RFC4271"/>. </t>

      <t>BGP Flowspec <xref target="RFC8955"/> defines 12 component types that can be used as match criteria in filtering rules with destination prefix,
      source prefix, IP protocol, port, destination port, source port, ICMP type, ICMP code, TCP flags, packet length, DSCP and fragment.</t>

      <t>The IP header field Time to Live (TTL) is a notable absent of the component types defined in BGP Flowspec <xref target="RFC8955"/>.</t>

      <t>This document proposes to address this by adding support for a new Flowspec component type to add support for TTL match.</t>


    </section>

    <section anchor="terminology" title="Definitions of Terms Used in This Memo">
      <t>
        <list hangIndent="4" style="hanging">

          <t hangText="NLRI - ">Network Layer Reachability Information.</t>

        </list>
      </t>

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

    </section>

    <section title="Motivation">
      <t>As defined in <xref target="RFC0791"/>, the TTL is an indication of an upper bound on the lifetime of an internet datagram. It is set by the sender of the datagram and
      reduced by each router along the route where it is processed.</t>

      <t>This unique property of the IP header TTL field can make it particularly useful for security and distributed-denial-of-service (DDoS) mitigation.</t>

      <t>Studies such as the one presented at NANOG 82 <eref target="https://www.nanog.org/news-stories/nanog-tv/nanog-82-webcast/tracing-ddos-end-to-end-in-2021/">Tracing DDoS End-to-End</eref>
        highlight how filtering traffic based on TTL values can be used as an effective mitigation for DDoS attacks at the IP edge of the network. In particular, the TTL value can be used to differentiate
        legitimate traffic from DDoS attack traffic generated by DDoS for hire services.</t>

      <t>Different IP edge routers of a given network under attack may see the same attack traffic using slightly different TTL values, however these routers can use a common set of filtering rules
         propagated via BGP flowspec to mitigatie the attack using range(s) of TTL values.</t>
    </section>

    <section title="Specification">
      <t> This document defines a new Flowspec component type, value TBD, named "TTL (Time to Live)". </t>

      <t>Encoding: &lt;type (1 octet), [numeric_op, value]+&gt;</t>

      <t>Defines a list of {numeric_op, value} pairs used to match the 8-bit TTL field value.</t>

      <t>This component type uses the Numeric Operator (numeric_op) as defined already in <xref target="RFC8955"/> section 4.2.1.1.</t>

      <t>Type TBD component values SHOULD be encoded as single octet (numeric_op len=00).</t>
    </section>

    <section anchor="Ordering" title="Ordering of Flow Specifications Considerations">
      <t>The ordering of Flow Specifications rules defined in <xref target="RFC8955"/> remains unchanged and applies to the component type introduced in this document.</t>

    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The new component type introduced in this document does not introduce new security considerations other than the ones already defined in <xref target="RFC8955"/>.</t>

    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>IANA <!-- --> is requested to assign <!-- when procedure is
    done, update this to "has assigned", and update the various TBD
    accordingly --> a type from the First Come First Served range of the "Flow
      Spec Component Types" registry:</t>

      <texttable>
        <ttcol align="center">Type Value</ttcol>

        <ttcol align="center">Name</ttcol>

        <ttcol align="center">Reference</ttcol>

        <c>TBD</c>

        <c>TTL (Time to Live)</c>

        <c>this document</c>
      </texttable>

      <t>Reference: this document</t>

      <t>Registry Owner/Change Controller: IESG</t>

      <t>Registration procedures:</t>

      <texttable>
        <ttcol align="center">Range</ttcol>

        <ttcol align="left">Registration Procedures</ttcol>

        <c>0-127</c>

        <c>IETF Review</c>

        <c>128-249</c>

        <c>First Come First Served</c>

        <c>250-254</c>

        <c>Experimental</c>

        <c>255</c>

        <c>Reserved</c>
      </texttable>

      <t>Note: a separate "owner" column is not provided because the owner of
      all registrations, once made, is "IESG". </t>

    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <references title="Normative References">

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml"?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.0791.xml"?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8955.xml"?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml"?>

    </references>

  </back>
</rfc>
