<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY bom    "&#65279;">
  <!ENTITY wd     "&#x2011;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902"
     docName="draft-li-ippm-stamp-bfd-tlv-00"
     category="std" submissionType="IETF" consensus="true" version="3"
     xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title abbrev="STAMP BFD TLV">A STAMP Extension for Carrying Bidirectional Forwarding Detection Control Messages</title>
    <seriesInfo name="Internet-Draft" value="draft-li-ippm-stamp-bfd-tlv-00"/>

    <author fullname="Zhiqiang Li" initials="Z." surname="Li">
      <organization>China Mobile</organization>
      <address>
        <postal><city>Beijing</city><code>100053</code>
        <country>China</country></postal>
        <email>lizhiqiangyjy@chinamobile.com</email>
      </address>
    </author>
    <author fullname="Zongpeng Du" initials="Z." surname="Du">
      <organization>China Mobile</organization>
      <address>
        <postal><city>Beijing</city><code>100053</code>
        <country>China</country></postal>
        <email>duzongpeng@chinamobile.com</email>
      </address>
    </author>
    <author fullname="Junjie Wang" initials="J." surname="Wang">
      <organization>Centec</organization>
      <address>
        <postal><city>Shanghai</city><code>201203</code>
        <country>China</country></postal>
        <email>wangjj@centec.com</email>
      </address>
    </author>
    <author fullname="Wei Cheng" initials="W." surname="Cheng">
      <organization>Centec</organization>
      <address>
        <postal><city>Shanghai</city><code>201203</code>
        <country>China</country></postal>
        <email>chengw@centec.com</email>
      </address>
    </author>
    <author fullname="Guoying Zhang" initials="G." surname="Zhang">
      <organization>Centec</organization>
      <address>
        <postal><city>Shanghai</city><code>201203</code>
        <country>China</country></postal>
        <email>zhanggy@centec.com</email>
      </address>
    </author>
    <author fullname="Xun Sun" initials="X." surname="Sun">
      <organization>Inesa</organization>
      <address>
        <postal><city>Shanghai</city><code>200030</code>
        <country>China</country></postal>
        <email>sunxun@inesa.com</email>
      </address>
    </author>
    <author fullname="Chunhao Zhao" initials="C." surname="Zhao">
      <organization>SAIA</organization>
      <address>
        <postal><city>Shanghai</city><code>200125</code>
        <country>China</country></postal>
        <email>chunhao.zhao@sh-aia.com</email>
      </address>
    </author>

    <date year="2026" month="July" day="4"/>
    <area>TSV</area>
    <workgroup>IPPM</workgroup>
    <keyword>STAMP</keyword>
    <keyword>BFD</keyword>
    <keyword>TLV</keyword>
    <keyword>performance measurement</keyword>
    <keyword>fault detection</keyword>
    <abstract>
      <t>Network operators frequently run both Bidirectional Forwarding Detection (BFD) for rapid fault detection and an active measurement protocol such as STAMP for delay and loss measurement between the same pair of nodes, resulting in two parallel packet streams with overlapping timing requirements.</t>
      <t>This document defines an optional STAMP TLV that carries a BFD Control message within STAMP test packets, using the extension format of RFC 8972. A single test packet stream can then drive both the BFD state machine and STAMP performance measurement. The BFD protocol itself is unchanged.</t>
    </abstract>
  </front>

  <middle>
<section anchor="introduction" numbered="true" toc="include"><name>Introduction</name>
<t>Bidirectional Forwarding Detection (BFD) <xref target="RFC5880"/> provides rapid detection of path failures. The Simple Two-Way Active Measurement Protocol (STAMP) <xref target="RFC8762"/> provides delay and loss measurement, with an extension format defined in <xref target="RFC8972"/> that allows optional TLVs to follow the base test packet fields. In many deployments, both run concurrently between the same node pair: BFD at sub-second intervals for fault detection, and STAMP for performance measurement.</t>
<t>Operating two packet streams consumes additional bandwidth and processing, and the two streams may take different paths in multipath environments, so the measured path may not be the path whose liveness is being verified.</t>
<t>This document defines a BFD TLV for STAMP test packets. When present, the TLV carries a complete BFD Control message as specified in Section 4.1 of <xref target="RFC5880"/>. The receiving node passes the carried BFD Control message to its BFD state machine and includes its own current BFD Control message in the reflected packet, so that a single STAMP session simultaneously sustains a BFD session over the same path. The BFD protocol state machine, message format, and timer negotiation are used unchanged; this document defines only the carriage of BFD Control messages within STAMP.</t>
<section anchor="requirements-language" numbered="true" toc="include"><name>Requirements Language</name>
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
</section></section>
<section anchor="bfd-tlv" numbered="true" toc="include"><name>BFD TLV</name>
<t>The BFD TLV follows the TLV format defined in Section 4 of <xref target="RFC8972"/>:</t>
<ul><li>Type: TBD1, to be assigned by IANA from the STAMP TLV Type registry created by <xref target="RFC8972"/>.</li><li>Length: the length of the Value field in octets, equal to the length of the carried BFD Control message.</li><li>Value: a complete BFD Control message, exactly as specified in Section 4.1 of <xref target="RFC5880"/>, including any BFD Authentication Section the BFD session is configured to use.</li></ul>
<t>A STAMP test packet MUST NOT carry more than one BFD TLV.</t>
</section>
<section anchor="procedures" numbered="true" toc="include"><name>Procedures</name>
<section anchor="session-sender" numbered="true" toc="include"><name>Session-Sender Behavior</name>
<t>A Session-Sender configured to run BFD over a STAMP session includes a BFD TLV in transmitted test packets. The carried BFD Control message MUST reflect the current local BFD session state (State, Discriminators, Detect Mult, and timer values), exactly as if it were sent in a standalone BFD Control packet.</t>
<t>The STAMP transmission interval MUST satisfy the negotiated BFD transmission interval that results from the procedures of Section 6.8.2 of <xref target="RFC5880"/>; otherwise the peer's BFD Detection Timer may expire despite path liveness. If the operator configures a STAMP interval larger than the BFD requirement, the implementation MUST either reject the configuration or renegotiate BFD timers accordingly.</t>
</section>
<section anchor="session-reflector" numbered="true" toc="include"><name>Session-Reflector Behavior</name>
<t>A Session-Reflector that supports this TLV and receives a test packet containing a BFD TLV MUST (a) process the STAMP base fields per <xref target="RFC8762"/>, and (b) deliver the carried BFD Control message to the local BFD state machine, which processes it per <xref target="RFC5880"/>.</t>
<t>In the reflected test packet, the Session-Reflector MUST include a BFD TLV carrying its own current BFD Control message. BFD Detection Time expiry at either node is handled exactly as in standalone BFD, including session state transition and fault notification.</t>
<t>A Session-Reflector that does not support this TLV handles it per the unrecognized-TLV procedures of <xref target="RFC8972"/>; the Session-Sender detects the lack of support through the TLV flags of the reflected packet and MUST NOT treat the absence of BFD processing as a path failure.</t>
</section>
<section anchor="path-consistency" numbered="true" toc="include"><name>Path Consistency</name>
<t>Because the BFD Control message and the measurement fields travel in the same packet, fault detection and performance measurement apply to the same forwarding path, including in ECMP environments. This is a primary motivation for combined operation.</t>
</section></section>
<section anchor="security-considerations" numbered="true" toc="include"><name>Security Considerations</name>
<t>The security considerations of <xref target="RFC8762"/>, <xref target="RFC8972"/>, and <xref target="RFC5880"/> apply. The carried BFD Control message retains BFD's native authentication: if the BFD session uses an Authentication Section, it is carried and validated unchanged. In addition, STAMP authenticated mode SHOULD be used to protect the integrity of the test packet as a whole. An attacker able to inject test packets with forged BFD TLVs could tear down BFD sessions; the combination of BFD authentication and STAMP authenticated mode mitigates this.</t>
</section>
<section anchor="iana-considerations" numbered="true" toc="include"><name>IANA Considerations</name>
<t>IANA is requested to assign one new TLV Type (TBD1, "BFD") from the "STAMP TLV Types" registry defined by <xref target="RFC8972"/>, with this document as the reference.</t>
</section>
  </middle>

  <back>
      <references title="Normative References">
    <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
      <front>
        <title>Key words for use in RFCs to Indicate Requirement Levels</title>
        <author initials="S." surname="Bradner" fullname="Scott Bradner"/>
        <date year="1997" month="March"/>
      </front>
      <seriesInfo name="BCP" value="14"/>
      <seriesInfo name="RFC" value="2119"/>
      <seriesInfo name="DOI" value="10.17487/RFC2119"/>
    </reference>
    <reference anchor="RFC5880" target="https://www.rfc-editor.org/info/rfc5880">
      <front>
        <title>Bidirectional Forwarding Detection (BFD)</title>
        <author initials="D." surname="Katz" fullname="Dave Katz"/>
        <author initials="D." surname="Ward" fullname="David Ward"/>
        <date year="2010" month="June"/>
      </front>
      <seriesInfo name="RFC" value="5880"/>
      <seriesInfo name="DOI" value="10.17487/RFC5880"/>
    </reference>
    <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
      <front>
        <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
        <author initials="B." surname="Leiba" fullname="Barry Leiba"/>
        <date year="2017" month="May"/>
      </front>
      <seriesInfo name="BCP" value="14"/>
      <seriesInfo name="RFC" value="8174"/>
      <seriesInfo name="DOI" value="10.17487/RFC8174"/>
    </reference>
    <reference anchor="RFC8762" target="https://www.rfc-editor.org/info/rfc8762">
      <front>
        <title>Simple Two-Way Active Measurement Protocol</title>
        <author initials="G." surname="Mirsky" fullname="Greg Mirsky"/>
        <author initials="G." surname="Jun" fullname="Guy Jun"/>
        <author initials="H." surname="Nydell" fullname="Henrik Nydell"/>
        <author initials="R." surname="Foote" fullname="Richard Foote"/>
        <date year="2020" month="March"/>
      </front>
      <seriesInfo name="RFC" value="8762"/>
      <seriesInfo name="DOI" value="10.17487/RFC8762"/>
    </reference>
    <reference anchor="RFC8972" target="https://www.rfc-editor.org/info/rfc8972">
      <front>
        <title>Simple Two-Way Active Measurement Protocol Optional Extensions</title>
        <author initials="G." surname="Mirsky" fullname="Greg Mirsky"/>
        <author initials="X." surname="Min" fullname="Xiao Min"/>
        <author initials="H." surname="Nydell" fullname="Henrik Nydell"/>
        <author initials="R." surname="Foote" fullname="Richard Foote"/>
        <author initials="A." surname="Masputra" fullname="Andres Masputra"/>
        <author initials="E." surname="Ruffini" fullname="Enrico Ruffini"/>
        <date year="2021" month="January"/>
      </front>
      <seriesInfo name="RFC" value="8972"/>
      <seriesInfo name="DOI" value="10.17487/RFC8972"/>
    </reference>
      </references>
      <references title="Informative References">
    <reference anchor="RFC5357" target="https://www.rfc-editor.org/info/rfc5357">
      <front>
        <title>A Two-Way Active Measurement Protocol (TWAMP)</title>
        <author initials="K." surname="Hedayat" fullname="Kaynam Hedayat"/>
        <author initials="R." surname="Krzanowski" fullname="Radoslaw Krzanowski"/>
        <author initials="A." surname="Morton" fullname="Al Morton"/>
        <author initials="K." surname="Yum" fullname="Kaan Yum"/>
        <author initials="J." surname="Babiarz" fullname="Joel Babiarz"/>
        <date year="2008" month="October"/>
      </front>
      <seriesInfo name="RFC" value="5357"/>
      <seriesInfo name="DOI" value="10.17487/RFC5357"/>
    </reference>
      </references>
      <section anchor="acknowledgements" numbered="false" toc="include">
        <name>Acknowledgements</name>
        <t>The authors would like to thank the members of the IPPM and BFD Working Groups for their review and feedback.</t>
      </section>
  </back>
</rfc>
