<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc comments="yes"?>
<?rfc compact="yes"?>
<?rfc inline="yes"?>
<?rfc sortrefs="yes"?>
<?rfc subcompact="yes"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc tocompact="yes"?>

<rfc 
    xmlns:xi="http://www.w3.org/2001/XInclude"
    category="std"
    docName="draft-ietf-bfd-large-packets-06"
    ipr="trust200902"
    submissionType="IETF"
    xml:lang="en"
    tocInclude="true"
    tocDepth="4"
    symRefs="true"
    sortRefs="true"
    version="3"
>
    <front>
	<title>BFD Encapsulated in Large Packets</title>

	<author fullname="Jeffrey Haas" initials="J." surname="Haas">
	    <organization>Juniper Networks, Inc.</organization>
	    <address>
		<postal>
		<street>1133 Innovation Way</street>
		<city>Sunnyvale</city>
		<region>CA</region>
		<code>94089</code>
		<country>US</country>
		</postal>
		<email>jhaas@juniper.net</email>
	    </address>
	</author>

	<author fullname="Albert Fu" initials="A." surname="Fu">
	    <organization>Bloomberg L.P.</organization>
	    <address>
		<email>afu14@bloomberg.net</email>
	    </address>
	</author>
	<date year="2024" />

	<abstract>
	    <t>
	    The Bidirectional Forwarding Detection (BFD) protocol is commonly used to verify
	    connectivity between two systems.  BFD packets are typically very small.  It is
	    desirable in some circumstances to know that not only is the path between two systems
	    reachable, but also that it is capable of carrying a payload of a particular size.  This
	    document discusses thoughts on how to implement such a mechanism using BFD in
	    Asynchronous mode.
	    </t>
	</abstract>
    </front>

    <middle>
	<section anchor="intro" title="Introduction">
	    <t>
	    The Bidirectional Forwarding Detection (BFD) <xref target="RFC5880"/> protocol is commonly
	    used to verify connectivity between two systems.  However, some applications may require
	    that the Path MTU <xref target="RFC1191"/> between those two systems meets a certain
	    minimum criteria.  When the Path MTU decreases below the minimum threshold, those
	    applications may wish to consider the path unusable.
	    </t>

	    <t>
	    BFD may be encapsulated in a number of transport protocols.  An example of this is
	    single-hop BFD <xref target="RFC5881"/>.  In that case, the link MTU configuration is
	    typically enough to guarantee communication between the two systems for that size MTU.
	    BFD Echo mode (Section 6.4 of <xref target="RFC5880"/>) is sufficient to permit
	    verification of the Path MTU of such directly connected systems.  Previous proposals 
	    (<xref target="I-D.haas-xiao-bfd-echo-path-mtu"/>)
	    have been made for testing Path MTU for such directly connected systems.
	    However, in the case of multi-hop BFD <xref target="RFC5883"/>, this guarantee does not hold.
	    </t>

	    <t>
	    The encapsulation of BFD in multi-hop sessions is a simple UDP packet.  The BFD elements
	    of procedure (Section 6.8.6 of <xref target="RFC5880"/>) covers validating the BFD
	    payload.  However, the specification is silent on the length of the encapsulation that is
	    carrying the BFD PDU.  While it is most common that the transport protocol payload (i.e.
	    UDP) length is the exact size of the BFD PDU, this is not required by the elements of
	    procedure.  This leads to the possibility that the transport protocol length may be
	    larger than the contained BFD PDU.
	    </t>
        </section>

        <section>
            <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 title="BFD Encapsulated in Large Packets">
	    <t>
	    Support for BFD between two systems is typically configured, even if the actual session
	    may be dynamically created by a client protocol.  A new BFD variable is defined in this
	    document:
	    </t>

            <dl newline='true'>
            <dt>bfd.PaddedPduSize</dt>
            <dd>
	      The BFD transport protocol payload size is increased to this value.  The contents of
	      this additional payload MUST be zero.  The minimum size of this variable MUST NOT be
	      smaller than permitted by the element of BFD procedure; 24 or 26 - see Section 6.8.6
	      of <xref target="RFC5880"/>. 
	    </dd>
            </dl>

	    <t>
	    The Don't Fragment bit (Section 2.3 of <xref target="RFC0791"/>)
	    of the IP payload, when using IPv4 encapsulation, MUST be set.
	    </t>
	</section>

	<section title="Implementation and Deployment Considerations">
	    <section title="Implementations that do not support Large BFD Packets">
	      <t>
	      While this document proposes no change to the BFD protocol, implementations may not
	      permit arbitrarily padded transport PDUs to carry BFD packets.  While Section 6 of 
	      <xref target="RFC5880"/> warns against excessive pedantry, implementations may not work
	      with this mechanism without additional support.
	      </t>

	      <t>
	      <xref target="RFC5880"/>, section 6.8.6, discusses the procedures for receiving
	      BFD Control packets.  When an implementation is incapable of processing Large
	      BFD Packets, it could manifest in one of two possible ways:
	      </t>

              <ul>
	      <li>
	      A receiving BFD implementation is incapable of accepting Large BFD Packets.
	      This is identical to the packet being discarded.
	      </li>
	      <li>
	      A receiving BFD implementation is capable of accepting Large BFD Packets,
	      but the Control packet is improperly rejected during validation procedures.
	      This is identical to the packet being discarded.
	      </li>
	      </ul>

	      <t>
	      In each of these cases, the BFD state machine would behave as if it were not
	      receiving Control packets and the implementation would follow normal BFD
	      procedures with regards to not having received control packets.
	      </t>

	      <t>
              If Large BFD Packets is enabled on a session that is already in the Up state
              and the remote BFD system does not, or cannot support receiving the padded
              BFD control packets, the session will go Down.
	      </t>
	    </section>

	    <section title="Selecting MTU size to be detected">
	      <t>
	      Since the consideration is path MTU, BFD sessions using this feature only need to use a
	      bfd.PaddedPduSize appropriate to exercise the path MTU for the desired application.
	      This may be significantly smaller than the system's link MTU; e.g. desired path MTU is
	      1512 bytes while the interface MTU that BFD with large packets is running on is 9000
	      bytes.
	      </t>

	      <t>
	      In the case multiple BFD clients desire to test the same BFD endpoints using
	      different bfd.PaddedPduSize parameters, implementations should select the largest
	      bfd.PaddedPduSize parameter from the configured sessions.  This is similar to
	      how implementations of BFD select the most aggressive timing parameters
	      for multiple sessions to the same endpoint.
	      </t>
	    </section>

	    <section title="Detecting MTU mismatches">
	      <t>
	      The accepted MTU for an interface is impacted by packet encapsulation
	      considerations at a given layer; e.g. layer 2, layer 3, tunnel, etc.  A common
	      misconfiguration of interface parameters is inconsistent MTU.  In the presence
	      of inconsistent MTU, it is possible for applications to have unidirectional
	      connectivity.
	      </t>

	      <t>
	      When it is necessary for an application using BFD with Large Packets to test
	      the bi-directional Path MTU, it is necessary to configure the
	      bfd.PaddedPduSize parameter on both sides of an interface.  E.g., if
	      the desire is to verify a 1500 byte MTU in both directions on an Ethernet or
	      point to point link, each side of the BFD session must have bfd.PaddedPduSize
	      set to 1500.  In the absence of such consistent configuration, BFD with 
	      Large Packets may correctly determine unidirectional connectivity at the
	      tested MTU, but bi-directional MTU may not be properly validated.
	      </t>

	      <t>
	      It should be noted that some interfaces may intentionally have different MTUs.
	      Setting the bfd.PaddedPduSize appropriately for each side of the interface
	      supports such scenarios.
	      </t>
	    </section>

	    <section title="Equal Cost Multiple Paths (ECMP) or other Load Balancing Considerations">
	      <t>
	      Various mechanisms are utilized to increase throughput between two endpoints
	      at various network layers.  Such features include Link Aggregate Groups (LAGs)
	      or ECMP forwarding. Such mechanisms balance traffic across multiple physical
	      links while hiding the details of that balancing from the higher networking
	      layers.  The details of that balancing are highly implementation specific.
	      </t>

	      <t>
	      In the presence of such load balancing mechanisms, it is possible to have
	      member links that are not properly forwarding traffic.  In such circumstances,
	      this will result in dropped traffic when traffic is chosen to be load balanced
	      across those member links.
	      </t>

	      <t>
	      Such load balancing mechanisms may not permit all link members to be properly
	      tested by BFD.  This is because the BFD Control packets may be forwarded only
	      along links that are up.  BFD on LAG, <xref target="RFC7130"/>, was developed
	      to help cover one such scenario.  However, for testing forwarding over
	      multiple hops, there is no such specified general purpose BFD mechanism for
	      exercising all links in an ECMP.  This may result in a BFD session being in
	      the Up state while some traffic may be dropped or otherwise negatively
	      impacted along some component links.
	      </t>

	      <t>
	      Some BFD implementations utilize their internal understanding of the component
	      links and their resultant forwarding to exercise BFD in such a way to better
	      test the ECMP members and to tie the BFD session state to the health of that
	      ECMP.  Due to the implementation specific load balancing, it is not possible
	      to standardize such additional mechanisms for BFD.
	      </t>

	      <t>
	      Mis-configuration of some member MTUs may lead to Load Balancing that may have
	      an inconsistent Path MTU depending on how the traffic is balanced.  While the
	      intent of BFD with Large Packets is to verify path MTU, it is subject to the
	      same considerations above.
	      </t>


	    </section>

	    <section title="S-BFD">
	    <t>
	    This mechanism also can be applied to other forms of BFD, including S-BFD 
	    <xref target="RFC7880"/>.
	    </t>
	    </section>
	</section>


        <section anchor="yang-module" title="BFD Encapsulated in Large Packets YANG Module">
            <section anchor="data-model-overview" title="Data Model Overview">
                <t>
                This YANG module augments the "ietf-bfd" module to add a flag
                'padding' to enable this feature. The feature statement
                'padding' needs to be enabled to indicate that BFD Encapsulated
                in Large Packet is supported by the implementation.
                </t>

                <figure>
                <artwork><![CDATA[
INSERT_TEXT_FROM_FILE(../bin/ietf-bfd-large@YYYY-MM-DD-tree.txt,69)
]]>
                </artwork>
                </figure>
            </section>

            <section title="YANG Module">
                <t>
                This YANG module imports 
                <xref target="RFC8349">A YANG Data Model for Routing</xref>,
                and 
                <xref target="RFC9314">YANG Data Model for Bidirectional Forwading Detection (BFD)</xref>.
                </t>
                <figure>
                    <artwork><![CDATA[
<CODE BEGINS> file "ietf-bfd-large@YYYY-MM-DD.yang"
    INSERT_TEXT_FROM_FILE(../bin/ietf-bfd-large@YYYY-MM-DD.yang,69)
<CODE ENDS>
]]>
                    </artwork>
                </figure>
            </section>
        </section>

	<section title="Security Considerations">
	    <t>
	    This document does not change the underlying security considerations of the BFD protocol
	    or its encapsulations.
	    </t>

            <section title="YANG Security Considerations">
                <t>
                  The YANG module specified in this document defines a schema
                  for data that is designed to be accessed via network
                  management protocols such as <xref
                  target="RFC6241">NETCONF</xref> or <xref
                  target="RFC8040">RESTCONF</xref>. The lowest NETCONF layer is
                  the secure transport layer, and the mandatory-to-implement
                  secure transport is <xref target="RFC6242">Secure Shell
                  (SSH)</xref>. The lowest RESTCONF layer is HTTPS, and the
                  mandatory-to-implement secure transport is <xref
                  target="RFC8446">TLS</xref>. The <xref
                  target="RFC8341">NETCONF Access Control Model (NACM) </xref>
                  provides the means to restrict access for particular NETCONF
                  or RESTCONF users to a preconfigured subset of all available
                  NETCONF or RESTCONF protocol operations and content.
                </t>

                <t>
                  There are a number of data nodes defined in this YANG module
                  that are writable/creatable/deletable (i.e., config true,
                  which is the default).  These data nodes may be considered
                  sensitive or vulnerable in some network environments. Write
                  operations (e.g., edit-config) to these data nodes without
                  proper protection can have a negative effect on network
                  operations. Some of the subtrees and data nodes and their
                  sensitivity/vulnerability are described here.
                </t>

                <ul>
                  <li>
                    'padded-pdu-size' specifies the targeted size of BFD control packets
                    encapsulated according to this proposal.  Changing this value for a
                    session in the Up state may cause the session to go down, perhaps
                    intentionally, if the session cannot accommodate such BFD control
                    packets.  Operators should be mindful that multiple BFD clients may
                    rely on the status of a given BFD session when changing this value.
                  </li>
                </ul>

                <t>
                  Some of the readable data nodes in this YANG module may be
                  considered sensitive or vulnerable in some network
                  environments. It is thus important to control read access
                  (e.g., via get, get-config, or notification) to these data
                  nodes.
                </t>

                <t>
                  There are no read-only data nodes defined in this model.
                </t>

                <t>
                  Some of the RPC operations in this YANG module may be
                  considered sensitive or vulnerable in some network
                  environments. It is thus important to control access to these
                  operations.
                </t>

                <t>
                  There are no RPC operations defined in this model.
                </t>
            </section>

	</section>

	<section title="IANA Considerations">
	    <t>
	    This document introduces no additional considerations to IANA.
	    </t>
	</section>

	<section title="Acknowledgments">
	    <t>
	    The authors would like to thank Les Ginsberg, Mahesh Jethandani, Robert Raszuk,
	    and Ketan Talaulikar, for their valuable feedback on this proposal.
	    </t>
	</section>

    </middle>

    <back>
	<references title="Normative References">
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.0791.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.5880.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.5881.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.5883.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6241.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6242.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7130.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7880.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8040.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8341.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8349.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8446.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9314.xml"/>
	</references>
	<references title="Informative References">
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.1191.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.3719.xml"/>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.haas-xiao-bfd-echo-path-mtu.xml"/>
	</references>
	<section title="Related Features">
	    <t>
	    <xref target="RFC3719">IS-IS</xref> supports a Padding feature for its hellos.  This
	    provides the ability to detect inconsistent link MTUs.
	    </t>
	</section>
    </back>
</rfc>
