<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="std" number="7881" ipr="trust200902" submissionType="IETF" consensus="yes">

  <front>
    <title abbrev="Seamless BFD for IPv4, IPv6, and MPLS">
Seamless Bidirectional Forwarding Detection (S-BFD) for&nbsp;IPv4,&nbsp;IPv6,&nbsp;and&nbsp;MPLS
    </title>

    <author fullname="Carlos Pignataro" initials="C."
            surname="Pignataro">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>
      <address>
        <email>cpignata@cisco.com</email>
      </address>
    </author>

    <author fullname="Dave Ward" initials="D."
            surname="Ward">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>
      <address>
        <email>wardd@cisco.com</email>
      </address>
    </author>

    <author fullname="Nobo Akiya" initials="N."
            surname="Akiya">
      <organization>Big Switch Networks</organization>
      <address>
        <email>nobo.akiya.dev@gmail.com</email>
      </address>
    </author>

    <date month="July" year="2016" />

    <keyword>BFD</keyword>
    <keyword>seamless BFD</keyword>
    <keyword>negotiation free</keyword>
    <keyword>label verification</keyword>
    <keyword>segment routing</keyword>
    <keyword>IP</keyword>

    <abstract>
       <t>This document defines procedures for using Seamless
       Bidirectional Forwarding Detection (S-BFD) in IPv4, IPv6, and
       MPLS environments.</t>
    </abstract>
        
  </front>

  <middle>
    <section title="Introduction">

<t>Seamless Bidirectional Forwarding Detection (S-BFD) <xref
target="RFC7880" /> defines a generalized mechanism to
allow network nodes to seamlessly perform continuity checks to remote
entities. This document defines necessary procedures for using S-BFD in
IPv4, IPv6, and MPLS environments.</t>

<t>The reader is expected to be familiar with the IP 
<xref target="RFC791" /> <xref target="RFC2460" />,
BFD <xref target="RFC5880" />, MPLS BFD <xref target="RFC5884" />,
and S-BFD <xref target="RFC7880" /> terms and protocol constructs.
</t>

     <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
     "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
     document are to be interpreted as described in <xref
     target="RFC2119">RFC 2119</xref>.</t>
</section>

<section title="S-BFD UDP Port">

<t>A new UDP port is defined for use by S-BFD in IPv4, IPv6, and MPLS
environments: 7784.
</t>
<t>
In S-BFD Control packets from the SBFDInitiator to the SBFDReflector, the
SBFDReflector session MUST listen for incoming S-BFD Control packets on
port&nbsp;7784. SBFDInitiator sessions MUST transmit S-BFD Control packets with
destination port&nbsp;7784. The source port of the S-BFD Control packets
transmitted by SBFDInitiator sessions can be any port, with one exception:
it MUST&nbsp;NOT be 7784. The same UDP source port number MUST be used for all
S-BFD Control packets associated with a particular SBFDInitiator session. The
source port number is unique among all SBFDInitiator sessions on the
system.</t>

<t>
In S-BFD Control packets from the SBFDReflector to the SBFDInitiator, 
the SBFDInitiator session MUST listen for reflected S-BFD Control packets
at its source port.
</t>

</section>

<section title="S-BFD Echo UDP Port">

<t>The BFD Echo port defined by <xref target="RFC5881"/>, port 3785, is used
for the S-BFD Echo function in IPv4, IPv6, and MPLS environments.
SBFDInitiator sessions MUST transmit S-BFD Echo packets with
destination port 3785. The setting of the UDP source port <xref
target="RFC5881" /> and the procedures <xref target="RFC7880" /> for
the S-BFD Echo function are outside the scope of this document.</t>

</section>

<section title="S-BFD Control Packet Demultiplexing">

<t>
S-BFD Control packet demultiplexing follows the procedure specified in
Section&nbsp;7.1 of <xref target="RFC7880" />. A received S-BFD Control packet
MUST be demultiplexed with the destination UDP port field.
</t>
<t>
This procedure for an S-BFD packet is executed on both the initiator and the
reflector. If the port is 7784 (i.e., an S-BFD packet for the SBFDReflector),
then the packet MUST be looked up to locate a corresponding SBFDReflector
session based on the value from the Your&nbsp;Discriminator field in the table
describing S-BFD Discriminators. If the port is not 7784 but the packet is
demultiplexed to be for an SBFDInitiator, then the packet MUST be looked up to
locate a corresponding SBFDInitiator session based on the value from the
Your&nbsp;Discriminator field in the table describing BFD Discriminators.  In
that case, the destination IP address of the packet SHOULD be validated to be
for itself.  If the packet demultiplexes to a classical BFD session, then
the procedures from <xref target="RFC5880" /> apply.
</t>

</section>

<section title="Initiator Procedures">

<t>S-BFD Control packets are transmitted with an IP header, UDP header, and
BFD Control packet (<xref target="RFC5880"/>). When S-BFD Control packets are
explicitly label switched (i.e., not IP routed and forwarded over a
Label Switched Path (LSP), but explicitly sent on a specific LSP), the
former is prepended with a label stack. Note that this document does not
make a distinction between a single-hop S-BFD scenario and a multi&nbhy;hop
S-BFD scenario; both scenarios are supported.</t>

<t>The necessary values in the BFD control headers are described in <xref
target="RFC7880" />. <xref target="_init_pak" /> describes
necessary values in the MPLS header, IP header, and UDP header when an
SBFDInitiator on the initiator is sending S-BFD Control packets.
</t>

<section title="Details of S-BFD Control Packets Sent by SBFDInitiator" anchor="_init_pak">

<t>
<list style="symbols">
  <t>Specifications common to both IP-routed S-BFD Control packets and
  explicitly label-switched S-BFD Control packets:
    <list style="symbols">
    <t>The Source IP Address field of the IP header MUST be set to a local IP
    address that is expected to be routable by the target (i.e., not an
    IPv6 link-local address when the target is multiple hops away).</t>
    <t>The UDP destination port MUST be set to a well-known UDP destination
    port assigned for S-BFD, i.e., 7784.</t>
    <t>The UDP source port MUST NOT be set to 7784.</t>
    </list>
  </t>
  <t>Specifications for IP-routed S-BFD Control packets:
    <list style="symbols">
    <t>The Destination IP Address field of the IP header MUST be set to
    an IP address of the target.</t>
    <t>The TTL / Hop Limit field of the IP header SHOULD be set
    to&nbsp;255.</t>
    </list>
  </t>
  <t>Specifications for explicitly label-switched S-BFD Control packets:
    <list style="symbols">
    <t>S-BFD Control packets MUST have the label stack that is expected to
    reach the target.</t>
    <t>The TTL field of the topmost label SHOULD be 255.</t>
    <t>The destination IP address MUST be chosen from the 127/8 range for IPv4
    and from the 0:0:0:0:0:ffff:7f00:0/104 range for IPv6, as per <xref
    target="RFC5884" />.</t>
    <t>The TTL / Hop Limit field of the IP header MUST be set to 1.</t>
    </list>
  </t>
</list>
</t>

<section title="Target versus Remote Entity (S-BFD Discriminator)">

<t>Typically, an S-BFD Control packet will have the Your&nbsp;Discriminator
field corresponding to an S-BFD Discriminator of the remote entity located on
the target network node defined by the destination IP address or the label
stack. It is, however, possible for an SBFDInitiator to carefully set the
Your&nbsp;Discriminator and TTL fields to perform a continuity test in
the direction towards a target, but destined to a transit network node and not
to the target itself.</t>

<t><xref target="_init_pak" /> intentionally uses the word &quot;target&quot;
instead of &quot;remote entity&quot; to accommodate this possible S-BFD usage
through TTL expiry. This also requires that S-BFD Control packets not be
dropped by the responder node due to TTL expiry. Thus, implementations on the
responder MUST allow received S-BFD Control packets taking a TTL expiry
exception path to reach the corresponding SBFDReflector session. This is an
existing packet-processing exception practice for Operations, Administration,
and Maintenance (OAM) packets, where the control plane further identifies
the type of OAM by the protocol and port numbers.</t>
</section>

</section>

</section>

<section title="Responder Procedures">

<t>S-BFD Control packets are IP routed back to the initiator and will
have an IP header, UDP header, and BFD control header. If an SBFDReflector
receives an S-BFD Control packet with a UDP source port of 7784, the
packet MUST be discarded. Necessary values in the BFD control header are
described in <xref target="RFC7880" />. <xref target="_resp_pak" /> describes
necessary values in the IP header and UDP header when an SBFDReflector on the
responder is sending S-BFD Control packets.</t>

<section title="Details of S-BFD Control Packets Sent by SBFDReflector" anchor="_resp_pak">

<t>
<list style="symbols">
  <t>The Destination IP Address field of the IP header MUST be copied from
  the Source IP Address field of the received S-BFD Control packet.</t>

  <t>The Source IP Address field of the IP header MUST be set to a local
  IP address that the initiator expects to be visible (i.e., not an
  IPv6 link-local address when the initiator is multiple hops away). The
  source IP address SHOULD be copied from the Destination IP Address field
  of the received S-BFD Control packet, except when it is from the 127/8 range
  for IPv4 or from the 0:0:0:0:0:ffff:7f00:0/104 range for IPv6.</t>
  <t>The TTL / Hop Limit field of the IP header MUST be set to 255.</t>
  <t>The UDP destination port MUST be copied from the received UDP source
  port.</t>
  <t>The UDP source port MUST be copied from the received UDP destination
  port.</t>
</list>
</t>

</section>

</section>

    <section anchor="Security" title="Security Considerations">

<t>Security considerations for S-BFD are discussed in <xref
target="RFC7880"/>. Additionally, implementing the following measures
will strengthen security aspects of the mechanism described by
this document:

<list style="symbols">
<t>Implementations MUST provide filtering capability based on source IP
addresses of received S-BFD Control packets; see <xref target="RFC2827" />.</t>

<t>Implementations MUST NOT act on received S-BFD Control packets containing
source Martian IP addresses (i.e., addresses that, by application of the
current forwarding tables, would not have their return traffic routed back
to the sender).
</t>
<t>Implementations MUST ensure that response S-BFD Control packets generated
by the SBFDReflector and sent to the initiator have a reachable target (e.g.,
destination IP address).</t>
</list>
</t>

    </section>

    <section anchor="IANA" title="IANA Considerations">

<t>A new port number value, 7784, was allocated from the &quot;Service Name
and Transport Protocol Port Number Registry&quot;. The allocated registry
entry is:

<figure align="left"><artwork align="left"><![CDATA[
  Service Name (REQUIRED)
    s-bfd

  Transport Protocol(s) (REQUIRED)
    udp

  Assignee (REQUIRED)
    IESG <iesg@ietf.org>

  Contact (REQUIRED)
    IETF Chair <chair@ietf.org>

  Description (REQUIRED)
    Seamless Bidirectional Forwarding Detection (S-BFD)

  Reference (REQUIRED)
    RFC 7881

  Port Number (OPTIONAL)
    7784
]]></artwork></figure>
</t>

    </section>

  </middle>

  <back>

  <references title="Normative References">
          <?rfc include="reference.RFC.2119"?>
          <?rfc include="reference.RFC.5880"?>
          <?rfc include="reference.RFC.5881"?>

<!-- draft-ietf-bfd-seamless-base (RFC 7880) -->
   <reference anchor="RFC7880"
        target="http://www.rfc-editor.org/info/rfc7880">
     <front>
     <title>Seamless Bidirectional Forwarding Detection (S-BFD)</title>
     <author initials='C' surname='Pignataro' fullname='Carlos Pignataro'>
       <organization />
     </author>
     <author initials='D' surname='Ward' fullname='David Ward'>
       <organization />
     </author>
     <author initials='N' surname='Akiya' fullname='Nobo Akiya'>
       <organization />
     </author>
     <author initials='M' surname='Bhatia' fullname='Manav Bhatia'>
       <organization />
     </author>
     <author initials='S' surname='Pallagatti' fullname='Santosh Pallagatti'>
       <organization />
     </author>
     <date month='July' year='2016' />
     </front>
     <seriesInfo name='RFC' value='7880'/>
     <seriesInfo name="DOI" value="10.17487/RFC7880"/>
   </reference>
  </references>

    <references title="Informative References">

<reference anchor='RFC791' target='http://www.rfc-editor.org/info/rfc791'>
<front>
<title>Internet Protocol</title>
<author initials='J.' surname='Postel' fullname='J. Postel'><organization /></author>
<date year='1981' month='September' />
</front>
<seriesInfo name='STD' value='5'/>
<seriesInfo name='RFC' value='791'/>
<seriesInfo name='DOI' value='10.17487/RFC791'/>
</reference>

          <?rfc include="reference.RFC.2827"?>
          <?rfc include="reference.RFC.5884"?>
          <?rfc include="reference.RFC.2460"?>
    </references>

    <section title="Acknowledgements" numbered="no">

        <t>The authors would like to thank the BFD WG members for helping to
	shape the contents of this document. In particular, significant
	contributions were made by the following people: Marc Binderberger,
	Jeffrey Haas, Santosh Pallagatti, Greg Mirsky, Sam Aldrin, Vengada
	Prasad Govindan, Mallik Mudigonda, and Srihari Raghavan.</t>
    </section>

    <section title="Contributors" numbered="no">

<t>The following are key contributors to this document:

<list style="empty">
<?rfc subcompact="yes" ?>
<t>Tarek Saad, Cisco Systems, Inc.
</t>
<t>Siva Sivabalan, Cisco Systems, Inc.
</t>
<t>Nagendra Kumar, Cisco Systems, Inc.
</t>
</list>
<?rfc subcompact="no" ?>
</t>

    </section>
  </back>
</rfc>
