<?xml version="1.0" encoding="iso-8859-1"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="std" ipr="trust200902" docName="draft-ietf-bfd-unaffiliated-echo-07" updates="5880" consensus="true" submissionType="IETF">

<front>
    <title abbrev="Unaffiliated BFD Echo"> Unaffiliated BFD Echo </title>

    <author fullname="Weiqiang Cheng" initials="W" surname="Cheng">
    <organization>China Mobile</organization>
    <address>
        <postal>
        <street></street>
        <!-- Reorder these if your country does things differently -->
        <city>Beijing</city>
        <region></region>
        <code></code>
        <country>China</country>
        </postal>
        <phone></phone>
        <email>chengweiqiang@chinamobile.com</email>
        <!-- uri and facsimile elements may also be added -->
    </address>
    </author>


    <author fullname="Ruixue Wang" initials="R" surname="Wang">
    <organization>China Mobile</organization>
    <address>
        <postal>
        <street></street>
        <!-- Reorder these if your country does things differently -->
        <city>Beijing</city>
        <region></region>
        <code></code>
        <country>China</country>
        </postal>
        <phone></phone>
        <email>wangruixue@chinamobile.com</email>
        <!-- uri and facsimile elements may also be added -->
    </address>
    </author>
	
    <author fullname="Xiao Min" initials="X" surname="Min" role="editor">
    <organization>ZTE Corp.</organization>
    <address>
        <postal>
        <street></street>
        <!-- Reorder these if your country does things differently -->
        <city>Nanjing</city>
        <region></region>
        <code></code>
        <country>China</country>
        </postal>
       <phone></phone>
        <email>xiao.min2@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
    </address>
    </author>

    <author fullname="Reshad Rahman" initials="R" surname="Rahman">
    <organization>Graphiant</organization>
    <address>
        <postal>
        <street></street>
        <!-- Reorder these if your country does things differently -->
        <city>Kanata</city>
        <region></region>
        <code></code>
        <country>Canada</country>
        </postal>
        <phone></phone>
        <email>reshad@yahoo.com</email>
        <!-- uri and facsimile elements may also be added -->
    </address>
    </author>
	
    <author fullname="Raj Chetan Boddireddy" initials="R" surname="Boddireddy">
    <organization>Juniper Networks</organization>
    <address>
        <postal>
        <street></street>
        <!-- Reorder these if your country does things differently -->
        <city></city>
        <region></region>
        <code></code>
        <country></country>
        </postal>
        <phone></phone>
        <email>rchetan@juniper.net</email>
        <!-- uri and facsimile elements may also be added -->
    </address>
    </author>
	
    <date year="2023"/>
  
    <area>Routing</area>
    <workgroup>BFD Working Group</workgroup>

    <keyword>Request for Comments</keyword>
    <keyword>RFC</keyword>
    <keyword>Internet Draft</keyword>
    <keyword>I-D</keyword>

    <abstract>
	
    <t> 
	Bidirectional Forwarding Detection (BFD) is a fault detection protocol that can quickly 
	determine a communication failure between two forwarding engines. This document proposes 
	a use of the BFD Echo where the local system supports BFD but the neighboring system 
	does not support BFD. BFD Async procedures can be executed over the BFD Echo port where 
	the neighboring system only loops packets back to the local system.
	</t>
    <t> 
	This document updates RFC 5880.
	</t>
	
    </abstract>
    
</front>
  
<middle>

    <section title="Introduction">

    <t>
	To minimize the impact of device/link faults on services and improve network availability, 
	a network device must be able to quickly detect faults in communication with adjacent 
	devices.  Measures can then be taken to promptly rectify the faults to ensure service 
	continuity.
	</t>

    <t> 
	BFD <xref target="RFC5880"/> is a low-overhead, short-duration method to detect faults 
	on the communication path between adjacent forwarding engines. The faults can be on interfaces, 
	data link(s), and even the forwarding engines. It is a single, unified mechanism to monitor any 
	media and protocol layers in real time.
	</t>

    <t> 
	BFD defines Asynchronous and Demand modes to satisfy various deployment scenarios. It also supports 
	an Echo function to reduce the device requirement for BFD. When the Echo function is activated, the 
	local system sends BFD Echo packets and the remote system loops back the received Echo packets 
	through the forwarding path. If several consecutive BFD Echo packets are not received by the 
	local system, then the BFD session is declared to be Down. Section 5 of <xref target="RFC5880"/> 
	indicates that the payload of a BFD Echo packet is a local matter and hence its contents are outside 
	the scope of that specification. This document, on the other hand, specifies the contents of the Echo 
	packets and what to do with them.
	</t>
	
    <t> 
	When using BFD Echo function, there are two typical scenarios as below:
	<list style="symbols">
    <t> 
	Full BFD protocol capability with affiliated Echo function. This scenario requires both the 
	local device and the neighboring device to support the full BFD protocol.
	</t>
    <t>
	BFD Echo-Only method without full BFD protocol capability. This scenario requires only the 
	local device to support sending and demultiplexing BFD Control packets. In this scenario, 
	the BFD Control packets are sent over the BFD Echo port, but that the BFD Async procedures 
	are used with the modifications described in this document.
	</t>
    </list>
	The former scenario is not changed by this document in any way. The latter scenario is referred to as 
	Unaffiliated BFD Echo in this document. The BFD Control packets sent over the BFD Echo port is referred 
	to as Unaffiliated BFD Echo packets in this document.
	</t>
	
    <t> 
	Section 6.2.2 of <xref target="BBF-TR-146"/> describes one use case of the Unaffiliated BFD Echo. 
	Section 2 of <xref target="I-D.wang-bfd-one-arm-use-case"/> describes another use case of the 
	Unaffiliated BFD Echo.
	</t>
	
    <t> 
	This document describes the use of the Unaffiliated BFD Echo over IPv4 and IPv6 for single 
	IP hop.
	</t>

    <section title="Conventions Used in This Document">
	
	<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 title="Unaffiliated BFD Echo Procedures">
	
    <figure anchor="Figure_1" title="Unaffiliated BFD Echo diagram">
    <artwork align="left"><![CDATA[
Device A                                         Device B
                                                 
BFD Enabled                                      BFD packets looped
+--------+     Unaffiliated BFD Echo session     +--------+
|   A    |---------------------------------------|   B    |
|        |Interface 1                 Interface 1|        |
+--------+                                       +--------+
BFD is supported.                      BFD is not supported.
     ]]></artwork>
    </figure>
			
    <t>
    As shown in Figure 1, device A supports BFD, whereas device B does not support BFD.	Device A would send 
	Unaffiliated BFD Echo packets, and after receiving the Unaffiliated BFD Echo packets sent from device A, 
	the one-hop-away BFD peer device B immediately loops them back by normal IP forwarding, this allows device 
	A to rapidly detect a connectivity loss to device B. Note that device B would not intercept any received 
	Unaffiliated BFD Echo packet or parse any BFD protocol field within the Unaffiliated BFD Echo packet.
	</t>
    <t>
	For unaffiliated echo, a Unaffiliated BFD Echo session is created on device A, and the Unaffiliated BFD 
	Echo session MUST follow the BFD state machine defined in Section 6.2 of <xref target="RFC5880"/>, except 
	that the received state is not sent but echoed from the remote system. Unaffiliated BFD Echo does not use 
	the AdminDown state. BFD Control packets are transmitted and received as BFD Echo packets using destination 
	UDP port 3785, as defined in <xref target="RFC5881"/>. The procedures for BFD Async sessions are executed 
	for the looped BFD Control packets as per <xref target="RFC5880"/>, including validation and authentication.
	</t>
    <t>
	Once a Unaffiliated BFD Echo session is created on device A, it starts sending Unaffiliated BFD Echo packets. 
	Device A performs its initial demultiplexing of a Unaffiliated BFD Echo session using the source IP address or 
	UDP source port, once the remote system echoes back the local discriminator, all further received packets are 
	demultiplexed based on the "Your Discriminator" field only, which is conformed to the procedure specified in 
	Section 6.3 of <xref target="RFC5880"/>. Regarding the selection of IP address, as specified in Section 4 of 
	<xref target="RFC5881"/>, the destination address MUST be chosen in such a way as to cause the remote system 
	to forward the packet back to the local system. The source address MUST be chosen in such a way as to preclude 
	the remote system from generating ICMP or Neighbor Discovery Redirect messages. In particular, the source address 
	SHOULD NOT be part of the subnet bound to the interface over which the BFD Echo packet is being transmitted, 
	and it SHOULD NOT be an IPv6 link-local address, unless it is known by other means that the remote system will 
	not send Redirects. All Unaffiliated BFD Echo packets for the session MUST be sent with a Time to Live (TTL) or 
	Hop Limit value of 255, and received with a TTL or Hop Limit value of 254, otherwise the received packets MUST 
	be dropped <xref target="RFC5082"/>.
	</t>
    <t>
	Within the Unaffiliated BFD Echo packet, the "Desired Min TX Interval" and "Required Min RX Interval" defined 
	in <xref target="RFC5880"/> SHOULD be populated with an expected value. A suggested value is 1 second (1,000,000 
	microseconds). These values, however, MUST be ignored on receipt. Furthermore, these values MUST NOT be used to 
	calculate the Detection Time.
	</t>
    <t>
	The "Required Min Echo RX Interval" defined in <xref target="RFC5880"/> SHOULD be populated with an expected value. 
	A suggested value is 0. This value MUST be ignored on receipt. The transmission interval for Unaffiliated BFD Echo 
	packets in the Up state MUST be provisioned on device A. The method for provisioning device B to loop back BFD 
	Unaffiliated Echo packets is outside the scope of this document.
	</t>
    <t>
	Similar to what's specified in <xref target="RFC5880"/>, the Unaffiliated BFD Echo session begins with the 
	periodic, slow transmission of Unaffiliated BFD Echo packets. The slow transmission rate SHOULD be no less then 
	one second per packet, until the session is Up. Afterwards, the provisioned transmission interval is used. When 
	the Unaffiliated BFD Echo session goes Down, the slow transmission rate is resumed. The "Detect Mult" defined in 
	<xref target="RFC5880"/> MUST be set to a value provisioned on device A. When the bfd.SessionState is Up and a 
	Detect Mult number of Unaffiliated BFD Echo packets have not arrived at device A as they should, the device A 
	MUST set bfd.SessionState to Down and bfd.LocalDiag to 2 (Echo Function Failed), as specified in Section 6.8.5 
	of <xref target="RFC5880"/>.
	</t>
    <t>
	In summary, the Unaffiliated BFD Echo packet reuses the format of the BFD Control packet defined in <xref target="RFC5880"/>, 
	and the fields within the Unaffiliated BFD Echo packet are populated as follows:
	    <list style='symbols'>
	     <t>My Discriminator MUST be set to the provisioned local discriminator.</t>
	     <t>Your Discriminator MUST be set to 0 initially, and then MUST be set to the same as My Discriminator echoed back.</t>
	     <t>Desired Min TX Interval SHOULD be set to an expected value. A suggested value is 1 second (1,000,000 microseconds).</t>
	     <t>Required Min RX Interval SHOULD be set to an expected value. A suggested value is 1 second (1,000,000 microseconds).</t>
	     <t>Required Min Echo RX Interval SHOULD be set to an expected value. A suggested value is 0.</t>
	     <t>Detect Mult MUST be set to the provisioned maximum allowable number of consecutively lost Unaffiliated BFD Echo packets.</t>
	    </list>
	</t>

    </section>
	
    <section title="Updates to RFC 5880">
	
    <t> 
	The Unaffiliated BFD Echo described in this document reuses the BFD Echo function as 
	described in <xref target="RFC5880"/> and <xref target="RFC5881"/>, but does not require BFD 
	Asynchronous or Demand mode. When using the Unaffiliated BFD Echo, only the local system has 
	the BFD protocol enabled; the remote system just loops back the received BFD Echo packets 
	as regular data packets.
	</t>
	
    <t> 
	This document updates <xref target="RFC5880"/> with respect to its descriptions on the BFD Echo 
	function as follows.
	</t>
	
    <t>
	The 4th paragraph of Section 3.2 of <xref target="RFC5880"/> is updated as below:
	</t>
	
	<t>
	<list>
	<t>
	OLD TEXT<br/>An adjunct to both modes is the Echo function.
	</t>
	<t>
	NEW TEXT<br/>An adjunct to both modes is the Echo function, which can also be running independently.
	</t>
	<t>
	OLD TEXT<br/>Since the Echo function is handling the task of detection, the rate of
    periodic transmission of Control packets may be reduced (in the case
    of Asynchronous mode) or eliminated completely (in the case of Demand mode).
	</t>
	<t>
	NEW TEXT<br/>Since the Echo function is handling the task of detection, the rate of
    periodic transmission of Control packets may be reduced (in the case
    of Asynchronous mode) or eliminated completely (in the case of Demand mode).
	The Echo function may also be used independently, with neither Asynchronous nor Demand mode.
	</t>
	</list>	
	</t>
	
    <t>
	The 3rd and 9th paragraphs of Section 6.1 of <xref target="RFC5880"/> are updated as below:
	</t>
	
    <t>
	<list>
	<t>
	OLD TEXT<br/>Once the BFD session is Up, a system can choose to start the Echo
    function if it desires and the other system signals that it will
    allow it. The rate of transmission of Control packets is typically 
	kept low when the Echo function is active.
	</t>
	<t>
	NEW TEXT<br/>When a system is running with Asynchronous or Demand mode, 
	once the BFD session is Up, it can choose to start the Echo
    function if it desires and the other system signals that it will
    allow it. The rate of transmission of Control packets is typically 
	kept low for Asynchronous mode or eliminated completely for Demand mode 
	when the Echo function is active.
	</t>
	<t>
	OLD TEXT<br/>If the session goes Down, the transmission of Echo packets (if any)
    ceases, and the transmission of Control packets goes back to the slow
    rate.
	</t>
	<t>
	NEW TEXT<br/>In Asynchronous mode, if the session goes Down, the transmission of Echo packets (if any)
    ceases, and the transmission of Control packets goes back to the slow
    rate. Demand mode MUST NOT be active if the session goes Down.
	</t>
	</list>
	</t>

    <t>
	The 2nd paragraph of Section 6.4 of <xref target="RFC5880"/> is updated as below:
	</t>
	
    <t>
	<list>
	<t>
	OLD TEXT<br/>When a system is using the Echo function, it is advantageous to
    choose a sedate reception rate for Control packets, since liveness
    detection is being handled by the Echo packets. This can be controlled 
	by manipulating the Required Min RX Interval field (see section 6.8.3).
	</t>
	<t>
	NEW TEXT<br/>When a system is using the Echo function with Asynchronous mode, it is advantageous to
    choose a sedate reception rate for Control packets, since liveness
    detection is being handled by the Echo packets. This can be controlled 
	by manipulating the Required Min RX Interval field (see section 6.8.3).
	Note that a system operating in Demand mode would direct the remote system to cease 
	the periodic transmission of BFD Control packets, by setting the Demand (D) bit in its 
	BFD Control packets.
	</t>
	</list>
	</t>

    <t>
	The 2nd paragraph of Section 6.8 of <xref target="RFC5880"/> is updated as below:
	</t>
	
    <t>
	<list>
	<t>
	OLD TEXT<br/>When a system is said to have "the Echo function active" it means
    that the system is sending BFD Echo packets, implying that the
    session is Up and the other system has signaled its willingness to
    loop back Echo packets.
	</t>
	<t>
	NEW TEXT<br/>When a system in Asynchronous or Demand mode is said to have "the Echo function active" it means
    that the system is sending BFD Echo packets, implying that the
    session is Up and the other system has signaled its willingness to
    loop back Echo packets.
	</t>
	</list>
	</t>

    <t>
	The 7th paragraph of Section 6.8.3 of <xref target="RFC5880"/> is updated as below:
	</t>
	
    <t>
	<list>
	<t>
	OLD TEXT<br/>When the Echo function is active, a system SHOULD set
    bfd.RequiredMinRxInterval to a value of not less than one second
    (1,000,000 microseconds). This is intended to keep received BFD 
	Control traffic at a negligible level, since the actual detection 
	function is being performed using BFD Echo packets.
	</t>
	<t>
	NEW TEXT<br/>When the Echo function is active with Asynchronous mode, a system SHOULD set
    bfd.RequiredMinRxInterval to a value of not less than one second
    (1,000,000 microseconds). This is intended to keep received BFD 
	Control traffic at a negligible level, since the actual detection 
	function is being performed using BFD Echo packets. While a system operating in 
	Demand mode would not receive BFD Control traffic.
	</t>
	</list>
	</t>

    <t>
	The 1st and 2nd paragraphs of Section 6.8.9 of <xref target="RFC5880"/> are updated as below:
	</t>
	
    <t>
	<list>
	<t>
	OLD TEXT<br/>BFD Echo packets MUST NOT be transmitted when bfd.SessionState is not
    Up.  BFD Echo packets MUST NOT be transmitted unless the last BFD
    Control packet received from the remote system contains a nonzero
    value in Required Min Echo RX Interval.
	</t>
	<t>
	NEW TEXT<br/>When a system is using the Echo function with either Asynchronous or Demand mode, 
	BFD Echo packets MUST NOT be transmitted when bfd.SessionState is not
    Up, and BFD Echo packets MUST NOT be transmitted unless the last BFD
    Control packet received from the remote system contains a nonzero
    value in Required Min Echo RX Interval.
	</t>
	<t>
	OLD TEXT<br/>BFD Echo packets MAY be transmitted when bfd.SessionState is Up.  The
    interval between transmitted BFD Echo packets MUST NOT be less than
    the value advertised by the remote system in Required Min Echo RX
    Interval...
	</t>
	<t>
	NEW TEXT<br/>When a system is using the Echo function with either Asynchronous or Demand mode, 
    BFD Echo packets MAY be transmitted when bfd.SessionState is Up, and the
    interval between transmitted BFD Echo packets MUST NOT be less than
    the value advertised by the remote system in Required Min Echo RX
    Interval...
	</t>
	</list>
	</t>

	</section>
		
    <section title="Unaffiliated BFD Echo Applicability">

    <t> 
	Some devices that would benefit from the use of BFD may be unable to support the full BFD protocol.  Examples of 
	such devices include servers running virtual machines, or Internet of Things (IoT) devices.
	</t>
	
    <t> 
	Unaffiliated BFD Echo can be used when two devices are connected and only one of them supports the BFD protocol, 
	and the other is capable of looping Unaffiliated BFD Echo packets.
	</t>
	
    </section> 

    <section title="Security Considerations">
	
    <t>
	All Security Considerations from <xref target="RFC5880"/> and <xref target="RFC5881"/> apply.
	</t>
    <t>
	Unaffiliated BFD Echo requires the remote device to loop Unaffiliated BFD Echo packets. In order to provide this 
	service, the remote device cannot make use of Unicast Reverse Path Forwarding (URPF) <xref target="RFC3704"/> 
	<xref target="RFC8704"/> in strict mode.
	</t>
    <t>
	As specified in Section 5 of <xref target="RFC5880"/>, since BFD Echo packets may be spoofed, some form of 
	authentication SHOULD be included. Considering the Unaffiliated BFD Echo packets in this document are also BFD 
	Control packets, the "Authentication Section" as defined in <xref target="RFC5880"/> for BFD Control packet is 
	RECOMMENDED to be included within the Unaffiliated BFD Echo packet.
	</t>
    <t>
	In order to mitigate the potential reflector attack by the remote attackers, or infinite loop of the Unaffiliated BFD 
	Echo packets, it's RECOMMENDED to put two requirements, also known as Generalized TTL Security Mechanism (GTSM) 
	<xref target="RFC5082"/>, on the device looping Unaffiliated BFD Echo packets, the first one is that a packet 
	SHOULD NOT be looped unless it has a TTL or Hop Limit value of 255, and the second one is that a packet being 
	looped MUST NOT reset the TTL or Hop Limit value to 255, and MUST use a TTL or Hop Limit value of 254.
	</t>
	
    </section>
  
    <section title="IANA Considerations"> 
    <t> This document has no IANA action requested.</t>
    </section>
    
    <section title="Acknowledgements">
    <t> The authors would like to acknowledge Ketan Talaulikar, Greg Mirsky, Santosh Pallagatti, and Aijun Wang for their 
	careful review and very helpful comments.</t>
    <t> The authors would like to acknowledge Jeff Haas for his guidance, insightful review and very helpful comments.</t>
    <t> The authors would like to acknowledge Detao Zhao for the very helpful discussion.</t>
    </section>  
    
    <section title="Contributors">   
    <t>Liu Aihua<br/>ZTE<br/>Email: liu.aihua@zte.com.cn</t>    
    <t>Qian Xin<br/>ZTE<br/>Email: qian.xin2@zte.com.cn</t>    
    <t>Zhao Yanhua<br/>ZTE<br/>Email: zhao.yanhua3@zte.com.cn</t>
    </section> 
  
</middle>
  
<back>

    <references title="Normative References">
     <?rfc include="reference.RFC.2119"?>
     <?rfc include="reference.RFC.8174"?>
     <?rfc include="reference.RFC.5880"?>
     <?rfc include="reference.RFC.5881"?>
    </references>

	<references title="Informative References">
     <?rfc include="reference.RFC.3704"?>
     <?rfc include="reference.RFC.8704"?>
     <?rfc include="reference.RFC.5082"?>
     <?rfc include="reference.I-D.wang-bfd-one-arm-use-case"?>
     <reference anchor="BBF-TR-146"
                 target="https://www.broadband-forum.org/technical/download/TR-146.pdf">
        <front>
          <title>BBF Technical Report - Subscriber Sessions Issue 1</title>

          <author>
            <organization>Broadband Forum</organization>
          </author>

          <date year="2013"/>
        </front>
     </reference>
    </references>

</back>
</rfc>

