<?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. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>
<?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-akiya-bfd-seamless-base-02" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <title abbrev="Seamless BFD Base">
	Seamless Bidirectional Forwarding Detection (BFD) with  MPLS Label Verification Extension
    </title>

    <!-- add 'role="editor"' below for the editors if appropriate -->
    <!-- Another author who claims to be an editor -->

    <author fullname="Nobo Akiya" initials="N."
            surname="Akiya">
      <organization>Cisco Systems</organization>
      <address>
        <email>nobo@cisco.com</email>
      </address>
    </author>

    <author fullname="Carlos Pignataro" initials="C."
            surname="Pignataro">
      <organization>Cisco Systems</organization>
      <address>
        <email>cpignata@cisco.com</email>
      </address>
    </author>

    <author fullname="Dave Ward" initials="D."
            surname="Ward">
      <organization>Cisco Systems</organization>
      <address>
        <email>wardd@cisco.com</email>
      </address>
    </author>

    <author fullname="Manav Bhatia" initials="M."
            surname="Bhatia">
      <organization>Alcatel-Lucent</organization>
      <address>
        <email>manav.bhatia@alcatel-lucent.com</email>
      </address>
    </author>

    <author fullname="Santosh" initials="P."
            surname="K. Santosh">
      <organization>Juniper Networks</organization>
      <address>
        <email>santoshpk@juniper.net</email>
      </address>
    </author>


    <date year="2013" />

    <area>BFD Working Group</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>BFD</keyword>
    <keyword>seamless BFD</keyword>
    <keyword>negotiation free</keyword>
    <keyword>label verification</keyword>
    <keyword>segment routing</keyword>
    <keyword>IP</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
    	<t>This document defines a simplified mechanism to use Bidirectional Forwarding Detection 
         (BFD) with large portions of negotiation aspects eliminated, that allows full and partial 
          reachability verification. For MPLS based BFD, extensions to the generic mechanism are defined 
          that allows BFD to perform a level of label verification.</t>
    </abstract>
	
	<note title="Requirements Language">
	<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">RFC 2119</xref>.</t>
	</note>
  </front>

  <middle>
    <section title="Introduction" anchor="Intro">

<t>Bidirectional Forwarding Detection (BFD), <xref target="RFC5880" /> and related documents, has efficiently generalized the failure detection mechanism for multiple protocols and applications. There are some improvements which can be made to better fit existing technologies. There is a possibility of evolving BFD to better fit new technologies. This document focuses on several aspects of BFD in order to further improve efficiency, to expand failure detection coverage and to allow BFD usage for wider scenarios.</t>

<t>
<list style="symbols">

<t>There are scenarios when only one side of the BFD, not both, are interested in verifying 
   connectivity between a pair of systems. One example is when a static route uses BFD to validate 
   reachability to the nexthop IP router. Another example is when a uni-directional tunnel uses BFD 
   to validate reachability to the egress node. In such scenarios, regular BFD requires sessions to 
   be provisioned on target nodes (ex: static route nexthop node, egress of RSVP-TE unidirectional LSP)
   which adds minimal value, if any, to those egress nodes.</t>

<t>BFD provides data delivery confidence when reachability validation is performed prior to traffic 
  utilizing specific paths/LSPs. However this comes with a cost where traffic is prevented to use such paths/LSPs 
  until BFD is able to validate the reachability, which could take seconds due to BFD session bring-up 
   sequences <xref target="RFC5880" />, LSP ping bootstrapping <xref target="RFC5884" />, etc. 
  S-BFD addresses these problems by eliminating the three-way handshake mechanism during bootstrap of BFD sessions resulting in faster reachability validation of  BFD 
  provisioned paths/LSPs. In addition, it is expected that some MPLS technologies will require 
 traffic engineered LSPs to get created dynamically, driven by external applications (ex: SDN). 
 It would be desirable to perform BFD validation very quickly to allow applications to utilize 
 dynamically created LSPs in timely manner.</t>

<t>Existing BFD standards provide a good mechanism to verify end-to-end reachability. They however, do not 
 allow BFD to perform partial reachability validations: ingress to transit, 
 transit to transit and transit to egress.</t>

<t><xref target="RFC5884" /> defines a mechanism to run BFD on existing MPLS technologies. 
 It is used to perform end-to-end LSP liveliness check for detecting MPLS data plane failures. 
  This mechanism, however, lacks the ability to validate traversal of the intended LSP path. Specifically 
  it cannot detect failures where one of the nodes along the LSP incorrectly label switches the BFD packet,
  as long as it reaches the intended LSP egress node. The likelihood of this issue being seen depends on deployed 
  MPLS technologies. With MPLS technologies that use downstream label allocation scheme 
 (ex: RSVP, LDP), the incoming label itself provides a level of check as a node will drop any packet 
 containing non-self-advertised label as the top label or will get delivered to unintended egress node. 
The issue is less likely to be seen for such MPLS technologies. With MPLS technologies such as Segment 
Routing (SR), incoming label can often be a label allocated and advertised by a node that is multiple 
downstream hops away. For such MPLS technologies, issue will be more likely to be seen. 
<xref target="RFC4379" /> can detect such broken LSPs, but it is often difficult to run this 
technology at the rate which BFD is capable of.</t>

<t>A node may desire to establish multiple BFD sessions to a network target. One such scenario 
  is when different applications on a system require running BFD to the same remote target with different 
 failure detection time requirements. Another scenario is when there are multiple unnumbered logical interfaces between a pair of network nodes. A third scenario can be envisaged where a node hosts multiple BFD sessions to the same remote target
on different parts of the system (e.g. different CPUs) in order to provide local redundancy when using BFD
to validate paths/LSPs. Such a setup may be used to provide resiliency against local faults that can otherwise 
impact BFD sessions used to monitor paths/LSPs.</t>


</list>
</t>

<t>This specification provides solutions to above issues by defining a generic mechanism to use Bidirectional Forwarding Detection (BFD) 
 with large portions of negotiation aspects eliminated, that allows full and partial reachability validation. For MPLS based BFD, extensions 
  to the generic mechanism are defined for BFD to perform a level of label verifications. Because the mechanism eliminates much of 
  negotiation aspects of the BFD protocol, &quot;Seamless BFD&quot; has been chosen as the name for this mechanism.</t>

    </section>

    <section title="Seamless BFD Overview">
 
<t>To operate Seamless BFD, set of network entities are first selected. Each network node hosting selected network entities then assigns a 
 special BFD discriminator to each selected local network entity. These network nodes will also create a BFD session instance that 
listens for incoming BFD control packets with &quot;your discriminator&quot; having local special BFD discriminators. Mappings between selected 
network entities and corresponding special BFD discriminators are known to other network nodes belonging in the same network. The mechanism of disseminating the special BFD discriminators is beyond the scope of this specification. A network node in such network is then able to send a BFD control packet to a particular target with corresponding special BFD discriminator as &quot;your discriminator&quot;. Target network node, upon reception of such BFD control packet, will transmit a response BFD control packet back to the sender.</t>

<t>Example: IPv4 address 1.2.3.4 is selected as the Seamless BFD target. Node hosting IPv4 address 1.2.3.4 reserves the BFD discriminator 0x01020304, and creates a BFD session instance in listening mode. Node X sends a BFD control packet with destination IP address 1.2.3.4, source IP address X, &quot;your discriminator&quot;=0x01020304 and &quot;my discriminator&quot;=&lt;locally assigned discriminator&gt;. Node hosting IPv4 address 1.2.3.4 will receive this packet, swaps received &quot;your discriminator&quot;/&quot;my discriminator&quot; and generates a response BFD control packet destined to X.</t>

</section>

<section title="Terminology">

<t>The reader is expected to be familiar with the BFD, IP, MPLS and SR terminology and protocol constructs. This section describes several new terminology introduced by Seamless BFD.

<list style="symbols">
<t>BFD Target Identifier: Network entity that is provisioned as a target of Seamless BFD.</t>
<t>BFD Target Identifier Type: Type of network entity that is provisioned as a target of Seamless BFD.</t>
<t>BFD Target Identifier Table: A table containing BFD target identifier type, BFD target identifier and corresponding BFD discriminator.</t>
<t>Reflector BFD Session: A BFD session listening for incoming BFD control packets destined for local BFD target identifier(s).</t>

</list>

</t>

</section>

    <section title="BFD Target Identifier Types">

<t>Number of network entity types (ex: IP address, segment ID) can make use of this mechanism. To differentiate between different network entity types, a value is assigned to each type.</t>

<t>BFD Target Identifier types:

<figure align="left"><preamble></preamble><artwork align="left">
      Value    BFD Target Identifier Type
     ------    --------------------------
          0    Reserved
          1    IP (IPv4 Address and Router ID)
          2    Segment Routing Node Segment ID
</artwork></figure>

Note that IP based BFD from <xref target="RFC5885" /> is supported by this specification, but non-IP based BFD is outside the scope of this document.</t>

<t>Further identifier types to be defined as on need basis.</t>

    </section>

    <section title="Reserved BFD Discriminators" anchor="Res_BFD_Dis">

<t>All local network identifiers which are to participate in this mechanism are to have specific BFD discriminators assigned. Assigned BFD discriminators are attached to corresponding identifiers until they are explicitly un-provisioned. BFD discriminators used for this mechanism are considered reserved, and MUST NOT be reused for other BFD sessions.</t>

<t>Some examples of network identifier to BFD discriminator mappings:
<list style="symbols">
<t>BFD Target Identifier Type 1: IPv4 address 1.1.1.1 maps to BFD discriminator 0x01010101.</t>
<t>BFD Target Identifier Type 2: Node segment ID 0x03E800FF maps to BFD discriminator 0x03E800FF.</t>
</list>
</t>

    </section>

    <section title="BFD Target Identifier Table">

<t>Each network node is responsible for creating and maintaining a table that contains BFD discriminators, BFD target identifier types and BFD target identifiers. Intention of this table is to allow local entities to perform following lookups:
<list style="symbols">
<t>BFD discriminator to BFD target identifier type and BFD target identifier</t>
<t>BFD target identifier type and BFD target identifier to BFD discriminator</t>
</list>
This table is to contain entries for all locally reserved BFD discriminators and corresponding information. This table may need to contain entries from other network nodes, depending on the BFD target identifier type.</t>

    </section>

    <section title="Reflector BFD Session">

<t>Each network node MUST create one or more reflector BFD sessions.  This reflector BFD session is a session which transmits BFD control packets in response to received valid locally destined BFD control packets. Specifically, this reflector BFD session is to have following characteristics:
<list style="symbols">
<t>MUST NOT transmit any BFD control packets based on local timer expiry.</t>
<t>MUST transmit BFD control packet in response to a received valid locally destined BFD control packet.</t>
<t>MUST be capable of sending only two states: UP and ADMINDOWN.</t>
</list>
One reflector BFD session MAY be responsible for handling received BFD control packets targeted to all local BFD target identifiers, or few reflector BFD sessions MAY each be responsible for subset of local BFD target identifiers. This policy is a local matter, and is outside the scope of this document.
</t>

<t>Note that incoming BFD control packets destined to BFD target identifier types may be IPv4, IPv6 or MPLS based. For those BFD target identifier types, implementations MAY either allow the same reflector BFD session to handle all incoming BFD control packets in address family agnostic fashion, or setup multiple reflector BFD sessions to handle incoming BFD control packets with different address families. This policy is again a local matter, and is outside the scope of this document.</t>

    </section>

    <section title="Full Reachability Validations">

<section title="Initiator Behavior">

<t>Any network node can attempt to perform a full reachability validation to any BFD target identifier on other network nodes, as long as destination BFD target identifier is provisioned to use this mechanism. BFD control packets transmitted by the initiator is to have &quot;your discriminator&quot; corresponding to destination BFD target identifier.</t>

<t>A node that initiates a BFD control packet MAY create an active BFD session to periodically send BFD control packets to a target, or a BFD control packet MAY be crafted and sent out on &quot;as needed basis&quot; (ex: BFD ping) without any session presence. In both cases, a BFD instance MUST have unique &quot;my discriminator&quot; value assigned. If a node is to create multiple BFD instances to a same BFD target identifier, then each instance MUST have separate &quot;my discriminator&quot; values assigned. A BFD instance MUST NOT use a discriminator corresponding to one of local BFD target identifiers as &quot;my discriminator&quot;. This is to prevent incoming response BFD control packets (&quot;pong&quot; packets) having &quot;your discriminator&quot; as a discriminator correspondingto the local BFD target identifier.</t>

<t>Below ASCII art describes high level concept of full reachability validations using this mechanism. R2 reserves value XX as BFD discriminator for its BFD target identifier. ASCII art shows that R1 and R4 performing full reachability validation to XX on R2.
<figure align="left"><preamble></preamble><artwork align="left"><![CDATA[
 -- md=50/yd=XX (BFD ping) -->
<-- md=XX/yd=50 (BFD pong) --

                          [*]
 R1 ---------------------- R2 ----------- R3 ----------- R4

                          |  ^
                          |  |         
                          |  + - md=60/yd=XX (BFD ping) --
                          + - - -md=XX/yd=60 (BFD pong) -->

[*] Reflector BFD session on R2.
]]></artwork></figure>
</t>

<t>If BFD control packet is to be sent via IP path, then:
<list style="symbols"><?rfc subcompact="yes" ?>
<t>Destination IP address MUST be an IP address corresponding to target identifier.</t>
<t>Source IP address MUST be a local IP address.</t>
<t>IP TTL MUST be 255 for full reachability validations. Partial reachability validations MAY use smaller TTL value (see <xref target="Part_Reach_Valid" />).</t>
<t>Well-known UDP destination port(s) for IP based S-BFD.</t>
</list><?rfc subcompact="no" ?>
</t>

<t>If BFD control packet is to be sent via explicit label switching, then:
<list style="symbols"><?rfc subcompact="yes" ?>
<t>BFD control packet MUST get imposed with a label stack that is expected to reach the target node.</t>
<t>MPLS TTL MUST be 255 for full reachability validations. Partial reachability validations MAY use smaller TTL value (see <xref target="Part_Reach_Valid" />).</t>
<t>Destination IP address MUST be 127/8 for IPv4 and 0:0:0:0:0:FFFF:7F00/104 for IPv6.</t>
<t>Source IP address MUST be a local IP address.</t>
<t>IP TTL=1.</t>
<t>Well-known UDP destination port(s) for MPLS based S-BFD</t>
</list><?rfc subcompact="no" ?>
</t>


<section title="Initiator State machine">

<t>
   The following diagram provides an overview of the initiator state machine.
The notation on each arc represents the state of the remote system (as received in the State field in the BFD Control packet) or indicates the   expiration of the Detection Timer.

                             
<figure align="left"><preamble></preamble><artwork align="left"><![CDATA[
                    +--+
       ADMIN DOWN,  |  |
       TIMER        |  V
                  +------+   UP                +------+
                  |      |-------------------->|      |----+
                  | DOWN |                     |  UP  |    | UP
                  |      |<--------------------|      |<---+
                  +------+   ADMIN DOWN,       +------+
                             TIMER
]]></artwork></figure>


Note that the above state machine is different from the base BFD specification<xref target="RFC5880" />. This is because the Init state is no longer applicable for the initiator of the S-BFD session. Another important difference is the transition of the state machine from the Down state to the Up state when a packet with State Up is received by the initiator. The definitions of the states and the events have the same meaning as in the base BFD specification <xref target="RFC5880" />.

</t>
</section>

</section>

<section title="Responder Behavior">

<t>A network node which receives BFD control packets transmitted by an initiator is referred as responder. Responder, upon reception of BFD control packets, is to perform necessary relevant validations described in <xref target="RFC5880" />/<xref target="RFC5881" />/<xref target="RFC5883" />/<xref target="RFC5884" />/<xref target="RFC5885" />.</t>

<section title="Responder Demultiplexing">

<t>When responder receives a BFD control packet, if &quot;your discriminator&quot; value is not one of local entries in the BFD target identifier table, then this packet MUST NOT be considered for this mechanism. If &quot;your discriminator&quot; value is one of local entries in the BFD target identifier table, then the packet is determined to be handled by a reflector BFD session responsible for specified BFD targeted identifier. If the packet was determined to be processed further for this mechanism, then chosen reflector BFD session is to transmit a response BFD control packet using procedures described in <xref target="Res_Proc" />, unless prohibited by local administrative or local policy reasons.</t>

</section>

<section title="Reflector BFD Session Procedures" anchor="Res_Proc">

<t>BFD target identifier type MUST be used to determine further information on how to reach back to the initiator.</t>

<t>In addition, destination IP address of received BFD control packet MUST be examined to determine how to construct response BFD control packet to send back to the initiator.</t>

<t>If destination IP address of received BFD control packet is not 127/8 for IPv4 or 0:0:0:0:0:FFFF:7F00/104  for IPv6, then:
<list style="symbols"><?rfc subcompact="yes" ?>
<t>Destination IP address MUST be copied from received source IP address.</t>
<t>Source IP address MUST be copied from received destination IP address if received destination IP address is a local address. Otherwise local IP address MUST be used.</t>
<t>IP TTL MUST be 255.</t>
</list><?rfc subcompact="no" ?>
</t>

<t>If destination IP address of received BFD control packet is 127/8 for IPv4 or 0:0:0:0:0:FFFF:7F00/104  for IPv6, then received IP destination MUST be further examined to determine response transport options. If last 23 bits of 127/8 for IPv4 and 0:0:0:0:0:FFFF:7F00/104 for IPv6 is zero, then response SHOULD be label switched but MAY be IP routed. If last 23 bits of 127/8 for IPv4 and 0:0:0:0:0:FFFF:7F00/104 for IPv6 is not zero, then response SHOULD be label switched and SHOULD NOT be IP routed. Description of 23 bits is described in <xref target="MPLS_label_verification" />.</t>

<t>If BFD control packet response is determined to be IP routed, then:
<list style="symbols"><?rfc subcompact="yes" ?>
<t>Destination IP address MUST be copied from received source IP address.</t>
<t>Source IP address MUST be a local address.</t>
<t>IP TTL MUST be 255.</t>
</list><?rfc subcompact="no" ?>
</t>

<t>If BFD control packet response is determined to be label switched, then:
<list style="symbols"><?rfc subcompact="yes" ?>
<t>BFD control packet MUST get label switched back to the initiator. Determining the label stack to be imposed on a response BFD control packet is outside the scope of this document.</t>
<t>MPLS TTL MUST be 255.</t>
<t>Destination IP address MUST be 127/8 for IPv4 and 0:0:0:0:0:FFFF:7F00/104 for IPv6.</t>
<t>Source IP address MUST be a local IP address.</t>
<t>IP TTL MUST be 1.</t>

</list><?rfc subcompact="no" ?>
</t>

<t>Regardless of the response type, BFD control packet being sent by the responder MUST perform following procedures:
<list style="symbols"><?rfc subcompact="yes" ?>
<t>Copy &quot;my discriminator&quot; from received &quot;your discriminator&quot;, and &quot;your discriminator&quot; from received &quot;my discriminator&quot;.</t>
<t>UDP destination port MUST be same as received UDP destination port.</t>
</list>
</t>

<t>In addition, reflector BFD session SHOULD transmit response BFD control packet on the same interface on which it received the packet from initiator.</t>

</section>

</section>

<section title="Further Packet Details">

<t>Further details of BFD control packets sent by initiator (ex: active BFD session):
<list style="symbols"><?rfc subcompact="yes" ?>
<t>Well-known UDP destination port assigned for S-BFD. </t>
<t>UDP source port as per described in <xref target="RFC5881" />/<xref target="RFC5883" />/<xref target="RFC5884" />/<xref target="RFC5885" />.</t>
<t>&quot;my discriminator&quot; assigned by local node.</t>
<t>&quot;your discriminator&quot; corresponding to an identifier of target node.</t>
<t>&quot;State&quot; MUST be set to a value reflecting local state.</t>
<t>&quot;Desired Min TX Interval&quot; MUST be set to a value reflecting local desired minimum transmit interval.</t>
<t>&quot;Required Min RX Interval&quot; MUST be zero.</t>
<t>&quot;Required Min Echo RX Interval&quot; SHOULD be zero.</t>
<t>&quot;Detection Multiplier&quot; MUST be set to a value reflecting locally used multiplier value.</t>
</list><?rfc subcompact="no" ?>
</t>

<t>Further details of BFD control packets sent by responder (reflector BFD session):
<list style="symbols"><?rfc subcompact="yes" ?>
<t>Well-known UDP destination port assigned for S-BFD. </t>
<t>UDP source port as described in <xref target="RFC5881" />/<xref target="RFC5883" />/<xref target="RFC5884" />/<xref target="RFC5885" />.</t>
<t>&quot;my discriminator&quot; MUST be copied from received &quot;your discriminator&quot;.</t>
<t>&quot;your discriminator&quot; MUST be copied from received &quot;my discriminator&quot;.</t>
<t>&quot;State&quot; MUST be UP or ADMINDOWN. Clarification of reflector BFD session state is described in <xref target="Add_Res_Beh" />.</t>
<t>&quot;Desired Min TX Interval&quot; MUST be copied from received &quot;Desired Min TX Interval&quot;.</t>
<t>&quot;Required Min RX Interval&quot; MUST be set to a value reflecting how many incoming control packets this reflector BFD session can handle.</t>
<t>&quot;Required Min Echo RX Interval&quot; SHOULD be set to zero.</t>
<t>&quot;Detection Multiplier&quot; MUST be copied from received &quot;Detection Multiplier&quot;.</t>
</list><?rfc subcompact="no" ?>
</t>

</section>

<section title="Diagnostic Values">

<t>Diagnostic value in both directions MAY be set to a certain value, to attempt to communicate further information to both ends. However, details of such are outside the scope of this specification.</t>

</section>

<section title="The Poll Sequence">

<t>The Poll sequence MUST operate in accordance with <xref target="RFC5880" />.</t>

</section>

<section title="Control Plane Independent (C)">

<t>Control plane independent (C) bit for BFD instances speaking to a reflector BFD session MUST work according to <xref target="RFC5880" />. Reflector BFD session also MUST work according to <xref target="RFC5880" />. Specifically, if reflector BFD session implementation does not share fate with control plane, then response BFD control packets transmitted MUST have control plane independent (C) bit set. If reflector BFD session implementation shares fate with control plane, then response BFD control packets transmitted MUST NOT have control plane independent (C) bit set.</t>

</section>

<section title="Additional Initiator Behavior">

<t>
<list style="symbols">

<t>If initiator receives valid BFD control packet in response to transmitted BFD control packet, then initiator SHOULD conclude that packet reached intended target.</t>

<t>When a sufficient number of BFD control packets have not arrived as they should, the initiator could declare loss of reachability. The criteria for declaring loss of reachability and the  action that would be triggered as a result are outside the scope of this specification.</t>

<t>Relating to above bullet item, it is critical for an implementation to understand the latency to/from reflector BFD session on target node. In other words, for very first BFD control packet transmitted, an implementation MUST NOT expect response BFD control packet to be received for time equivalent to sum of latencies: initiator node to target node and target node back to initiator node.</t>

</list>
</t>

</section>

<section title="Additional Responder Behavior" anchor="Add_Res_Beh">

<t>

<list style="symbols">

<t>BFD control packets transmitted by a reflector BFD session MUST have &quot;Required Min RX Interval&quot; set to a value which reflects how many incoming control packets this reflector BFD session can handle. Responder can control how fast initiators will be sending BFD control packets to self by ensuring &quot;Required Min RX Interval&quot; reflects a value based on current load.</t>

<t>If a reflector BFD session wishes to communicate to some or all initiators that monitored BFD target identifier is &quot;temporarily out of service&quot;, then BFD control packets with &quot;state&quot; set to ADMINDOWN are sent to those initiators. Initiators, upon reception of such packets, MUST NOT conclude loss of reachability to corresponding BFD target identifier, and MUST back off packet transmission interval to corresponding BFD target identifier an interval no faster than 1 second. If a reflector BFD session is generating a response BFD control packet for BFD target identifier that is in service, then &quot;state&quot; in response BFD control packets MUST be set to UP.</t>

</list>
</t>

</section>

    </section>

    <section title="Partial Reachability Validations" anchor="Part_Reach_Valid">

<t>Same mechanism as described in &quot;Full Reachability Validations&quot; section will be applied with exception of following differences on initiator.
<list style="symbols">
<t>When initiator wishes to perform a partial reachability validation towards identifier X upto identifier Y, number of hops to identifier Y is calculated.</t>
<t>TTL value based on this calculation is used as the IP TTL or MPLS TTL on top most label, and &quot;your discriminator&quot; of transmitted BFD control packet will carry BFD discriminator corresponding to target transit identifier Y.</t>
<t>Imposed label stack or IP destination address will continue to be of identifier X.</t>
</list>
</t>

    </section>

    <section title="MPLS Label Verifications" anchor="MPLS_label_verification">

<t>This section is only applicable to MPLS based sessions using this mechanism.</t>

<section title="MPLS Label Verifications Mechanism">

<t>With full and partial reachability validations, initiator has the ability to determine if target identifier received the packet on any interfaces. This section describes additional mechanism for initiator to determine if target identifier received the packet on a specific interface.</t>

<t>So far for MPLS based sessions, this mechanism makes use of destination IP address of 127/8 range for IPv4 and of 0:0:0:0:0:FFFF:7F00/104 range for IPv6, in both directions. In this section, 127/8 will be used to describe the MPLS label verification mechanism. However, same concept is to be applied to IPv6 range 0:0:0:0:0:FFFF:7F00/104.</t>

<t>When a network node wishes to perform MPLS label verification, BFD control packet will have lower 23 bits of 127/8 destination IP address embedded with non-zero value. One such non-zero value MAY be (label value + EXP) that is used to reach intended target identifier. Receiver of this BFD control packet, if last 23 bits of 127/8 address is not zero, then will embed information reflecting how the packet was received in the lower 23 bits of 127/8 destination IP address in the response BFD control packet. If responder received the BFD control packet on a non-point-to-point interface, source MAC address MAY need to be examined to determine the &quot;RX info&quot; to embed in the returning packet.

<figure align="left"><preamble></preamble><artwork align="left">

  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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |      0x7F     |R|     Zero or (label + EXP) or RX info        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork></figure>

9th bit is reserved for the time being and SHOULD be set to zero and SHOULD be ignored on receipt, by both initiator and responder</t>

<t>Initiator receiving back a response will know that packet did reach intended identifier. Initiator can also look into lower 23 bits of IP destination address in received BFD control packet to determine if packet sent was received by intended identifier in expected way (ex: expected RX interface).</t>

<t>When (label + EXP) is being encoded, label is specified in higher 20 bits of 23 bits and EXP is specified in lower 3 bits of 23 bits.</t>

<t>If a response BFD control packet is received, then initiator can conclude that a packet has reached intended node correctly. With information embedded in last 23 bits of response BFD control packet from responder, initiator has the ability to perform further verifications on how responded node received BFD control packet.</t>

</section>

<section title="Localhost Address Usage">

<t>Last 23 bits of 127/8 for IPv4 and 0:0:0:0:0:FFFF:7F00/104 for IPv6 being non-zero is the trigger for responder to embed RX information in the response. When initiator is performing only reachability validations to target identifiers, then last 23 bits of the localhost address SHOULD be zero. This is to ensure unnecessary processing at responder is eliminated. However, last 23 bits of the localhost address MAY be set to a non-zero value to traverse specific ECMP path if required. Obvious side effect is the additional processing at responder to populate the RX info in response packet.</t>

</section>

    </section>

    <section title="Scaling Aspect">

<t>This mechanism brings forth one noticeable difference in terms of scaling aspect: number of BFD sessions. This specification eliminates the need for egress nodes to have fully active BFD sessions when only one side desires to perform reachability validations. With introduction of reflector BFD concept, egress no longer is required to create any active BFD session per path/LSP basis. Due to this, total number of BFD sessions in a network is reduced.</t>
 
<t>If traditional BFD technology was used on a network comprised of N nodes, and each node monitored M unidirectional paths/LSPs, then total number of BFD sessions in such network will be:</t>

<t>(((N - 1) x M) x 2)</t>

<t>Assuming that each network node creates one reflector BFD session to handle all local BFD target identifiers, then total number of BFD sessions in same scenario will be:</t>

<t>(((N - 1) x M) + N)</t>

    </section>

    <section title="Co-existence with Traditional BFD">

<t>This mechanism has no issues being deployed with traditional BFDs (<xref target="RFC5881" />/<xref target="RFC5883" />/<xref target="RFC5884" />/<xref target="RFC5885" />) because BFD discriminators which allow this mechanism to function are explicitly reserved and separate UDP port values are used with S-BFD.</t>

    </section>

    <section title="BFD Echo">

<t>BFD echo is outside the scope of this document.</t>

    </section>

    <section title="Summary">

<t>Conceptually, Seamless BFD is as a way to perform BFD Echo Mode using BFD control packets. Critical differentiator being that target (ex: egress) is still required to respond. This allows greater control of a session to the initiator while required target (ex: egress) response allows for proper validations.</t>

<t>This section visits each aspect specified in the Introduction (<xref target="Intro" />) and describes how Seamless BFD provides beneficial impacts.

<list style="symbols">

<t>Two sided BFD a MUST?<list><t>
Active BFD session instances are only created on network nodes that desire to validate/monitor reachability to specific targets through specific transports. It is pre-created reflector BFD sessions which operate Seamless BFD functionality at egress in all cases. Thus, it is no longer required for egress to create BFD sessions specific for paths/LSPs which are terminating on own network node. Therefore, Seamless BFD is a nice fit for scenarios where only one side is wanting to perform the BFD check.
</t></list></t>

<t>Faster BFD bring-up?<list><t>
Reflector BFD sessions are persistent entities provisioned in the network ahead of time, on relevant network nodes. When a network node desires to perform a reachability validation to a particular target, which already has a reflector BFD session monitoring the BFD target identifier, then generating the a Seamless BFD control packet and receiving back a Seamless BFD control packet is all that is required. It is no longer required for egress to create a specific BFD session instance nor for BFD sessions to go through FSM based on sedated bring-up intervals. Thus reachability validation is virtually instantaneous.
</t></list></t>

<t>Why end-to-end only?<list><t>
Seamless BFD creates separation of transport and intended receiver of the packet. IP destination address or MPLS label stack of BFD control packets describes particular paths while &quot;your discriminator&quot; describes intended receiver of such packets. Thus it is possible to inject BFD control packets from a transit node of a LSP. It is also possible, with careful TTL manipulations, for a network node to test reachability of a path/LSP to a particular transit node.
</t></list></t>

<t>Is it taking the right path?<list><t>
MPLS label verification aspect of Seamless BFD allows for testing of label programming. If certain MPLS label stack with certain &quot;your discriminator&quot; results in a response packet to be received back, then a node can conclude that the packet reached intended receiver based on imposed MPLS label stack. Also by examining &quot;RX info&quot; of received back BFD control packet, a node can determine if intended receiver received the packet in expected way (ex: on expected incoming interface).
</t></list></t>

<t>Is one really enough?<list><t>
With Seamless BFD, a network node is free to create any number of BFD session instances to a target, even if encapsulations of all such sessions are exactly the same. Because each BFD session instance will have a unique &quot;my discriminator&quot;, response BFD control packets can get demultiplexed correctly into right session.
</t></list></t>

</list>
</t>

    </section>


    <section anchor="Security" title="Security Considerations">

<t>Same security considerations as <xref target="RFC5880" />, <xref target="RFC5881" />, <xref target="RFC5883" />, <xref target="RFC5884" /> and <xref target="RFC5885" /> apply to this document.</t>

<t>Additionally, implementing following measures will strengthen security aspects of this mechanism described by this document.
<list style="symbols">
<t>Implementations MUST provide filtering capability based on source IP addresses or source node segment IDs of received BFD control packets: <xref target="RFC2827" />.</t>
<t>Implementations MUST NOT act on received BFD control packets containing Martian addresses as source IP addresses.</t>
<t>Implementations MUST ensure response target IP addresses or node segment IDs are reachable.</t>
</list>
</t>

    </section>

    <section anchor="IANA" title="IANA Considerations">
<t>BFD Target Identifier types:

<figure align="left"><preamble></preamble><artwork align="left">
      Value    BFD Target Identifier Type
     ------    --------------------------
          0    Reserved
          1    IP (IPv4 Address and Router ID)
          2    Segment Routing Node Segment ID
</artwork></figure>
New UDP port number(s) will be requested for S-BFD.
      </t>
    </section>

    <section title="Acknowledgements">

	<t>Authors would like to thank Girija Raghavendra Rao, Marc Binderberger, Srihari Raghavan, Vanitha Neelamegam and Vengada Prasad Govindan from Cisco Systems for providing valuable comments.</t>

    </section>

    <section title="Contributing Authors">

    <t>Tarek Saad
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    Email: tsaad@cisco.com</t>

	<t>Siva Sivabalan
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    Email: msiva@cisco.com</t>

	<t>Nagendra Kumar
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    Email: naikumar@cisco.com</t>

	<t>Mallik Mudigonda
    <vspace blankLines="0" />
	Cisco Systems
    <vspace blankLines="0" />
    Email: mmudigon@cisco.com</t>

    </section>

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <references title="Normative References">
	  <?rfc include="reference.RFC.2119"?>
	  <?rfc include="reference.RFC.5880"?>
	  <?rfc include="reference.RFC.5881"?>
	  <?rfc include="reference.RFC.5883"?>
	  <?rfc include="reference.RFC.5884"?>
       <?rfc include="reference.I-D.previdi-filsfils-isis-segment-routing"?>
       
    </references>
    
    <references title="Informative References">
	  <?rfc include="reference.RFC.2827"?>
       <?rfc include="reference.RFC.4379"?>
	  <?rfc include="reference.RFC.5885"?>
	  <?rfc include="reference.RFC.6428"?>
       <?rfc include="reference.I-D.ietf-bfd-on-lags"?>
    </references>

    <!-- Change Log
v00-a 2013-05-20 Nobo: Initial version
v00-b 2013-05-24 Nobo: Included comments from Carlos/Nagendra
v00-c 2013-05-27 Nobo: Incorporated comments from Marc
    -->
  </back>
</rfc>
