<?xml version="1.0" encoding="utf-8"?> encoding="UTF-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<?rfc toc="yes"?>
<?rfc tonormal="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc normal="yes"?>
<?rfc subnormal="no"?>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" category="std" consensus="true" ipr="trust200902" docName="draft-ietf-sfc-multi-layer-oam-28" number="9516" updates="" obsoletes="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3">

  <!-- xml2rfc v2v3 conversion 3.6.0 -->
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

  <front>
    <title abbrev="Active OAM for SFC">Active OAM Operations, Administration, and Maintenance (OAM) for Service Function Chaining (SFC)</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-sfc-multi-layer-oam-28"/> name="RFC" value="9516"/>

    <author initials="G." surname="Mirsky" fullname="Greg Mirsky">
      <organization>Ericsson</organization>
      <address>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>

    <author initials="W" surname="Meng" fullname="Wei Meng">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
	  <extaddr>Yuhuatai District</extaddr>
          <street>No.50 Software Avenue, Yuhuatai District</street> Avenue</street>
          <region>Nanjing</region>
          <country>China</country>
        </postal>
        <email>meng.wei2@zte.com.cn</email>
      </address>
    </author>

        <author fullname="Ting Ao" initials="T." surname="Ao">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street>No.889, BiBo Road</street>
          <city>Shanghai</city>
          <region/>
          <code>201203</code>
          <country>China</country>
        </postal>
        <phone>+86 17721209283</phone>
        <email>18555817@qq.com</email>
      </address>
    </author>

    <author initials="B" surname="Khasnabish" fullname="Bhumip Khasnabish">
      <organization>Individual contributor</organization>
      <address>
        <email>vumip1@gmail.com</email>
      </address>
    </author>

<author fullname="Kent Leung" initials="K." surname="Leung">
      <organization>Individual contributor</organization>
      <address>
        <postal>
          <street>530 Showers Drive Ste 7</street>
          <city>Mountain View, CA 94040</city>
          <region/>
          <code/>
          <country>USA</country> View</city>
          <region>CA</region>
          <code>94040</code>
          <country>United States of America</country>
        </postal>
        <phone/>
        <email>mail4kentl@gmail.com</email>
      </address>
    </author>

    <author fullname="Gyan Mishra" initials="G. " surname="Mishra">
      <organization>Verizon Inc.</organization>
      <address>
        <email>gyan.s.mishra@verizon.com</email>
      </address>
    </author>

    <date year="2023"/>
    <area>Routing</area>
    <workgroup>SFC WG</workgroup>
    <keyword>Request for Comments</keyword>
    <keyword>RFC</keyword>
    <keyword>Internet Draft</keyword>
    <keyword>I-D</keyword> year="2023" month="November"/>
    <area>rtg</area>
    <workgroup>sfc</workgroup>

<keyword>NSH</keyword>
<keyword>Fault Management</keyword>

    <abstract>
      <t>
A set of requirements for active Operation, Operations, Administration,
and Maintenance (OAM) of for Service Function Chains (SFCs) Chaining (SFC) in a network is presented in this document.
Based on these requirements, an encapsulation of active OAM messages in SFC and
a mechanism to detect and localize defects are described.
</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>
     <xref target="RFC7665" format="default"/> defines data plane elements necessary to implement
     a
     Service Function Chaining (SFC). These include: include the following:
      </t>
      <ol spacing="normal" type="1">
      <li>
     Classifiers that perform the classification of incoming packets. Such classification may result in associating a received packet to a service function chain.
     </li>
        <li>
     Service Function Forwarders (SFFs)
     that are responsible for forwarding traffic to one or more connected Service Functions (SFs) according to
     the information carried in the SFC encapsulation and handling traffic coming back from
     the SFs and forwarding it to the next SFF.
     </li>
        <li>
     SFs that are responsible for executing specific service treatment
     on received packets.
     </li>
      </ol>
      <t>
     There are different views from different levels of the SFC.
     One is the service function chain, an entirely abstract view, which defines an ordered set of SFs that must
     be applied to packets selected based on classification rules.
     But the service function chain doesn't specify the exact mapping between SFFs and SFs. Thus, another
     logical construct used in SFC  is a Service Function Path (SFP).
     According to <xref target="RFC7665" format="default"/>, an SFP is
     the instantiation of the SFC in the network and provides a level of indirection
     between the entirely abstract SFCs and a fully specified specified, ordered
     list of SFFs SFF and SFs SF identities that the packet will visit when
     it traverses the SFC. The latter entity is referred to as Rendered Service Path (RSP).
     The main difference between an SFP and RSP is that the former is the logical construct,
    while the latter is the realization of the SFP via the sequence of specific SFC data plane elements.
      </t>
      <t>
	   This document defines how active Operation, Administration Operations, Administration,
	   and Maintenance (OAM), per <xref target="RFC7799" format="default"/> the definition of active OAM, OAM in <xref target="RFC7799" format="default"/>, is
	   implemented when the Network Service Header (NSH) <xref target="RFC8300"/> is used as the SFC encapsulation.
  Following the analysis of SFC OAM in <xref target="RFC8924" format="default"/>, this document applies and, when necessary,
  extends requirements listed in Section 4 of <xref target="RFC8924"/> target="RFC8924" section="4" sectionFormat="of" />
  for the use of active OAM in an SFP supporting fault management and performance monitoring.
  Active OAM tools, tools that are conformant to this specification, specification
  improve OAM's ability for Fault Management (FM) by, for example, using the query mechanism
  to troubleshoot and localize defects, which conforms to the stateless character
  of transactions in SFC NSH <xref target="RFC8300"/>.
  Note that Performance Monitoring OAM, as mentioned in required by <xref target="RFC8924"/>,
   as a requirement,
   is not satisfied by this document and is out of scope.
   For the purpose of FM OAM in SFC, the SFC Echo Request and Echo Reply are specified in <xref target="sfc-echo-request-reply"/>. These mechanisms enable on-demand Continuity Check continuity check and Connectivity Verification, connectivity verification, among other operations, over SFC in networks
  and addresses address functionalities discussed in Sections 4.1, 4.2, <xref target="RFC8924" section="4.1" sectionFormat="bare"/>, <xref target="RFC8924" section="4.2" sectionFormat="bare"/>, and 4.3 <xref target="RFC8924" section="4.3" sectionFormat="bare"/> of <xref target="RFC8924" format="default"/>.
The SFC Echo Request and Echo Reply can be used with encapsulations other than the NSH, for example,
using MPLS encapsulation, as described in <xref target="RFC8595"/>. The applicability of the SFC Echo Request/Reply mechanism
in SFC encapsulations other than the NSH is outside the scope of this document.
      </t>
      <t>
   The intended scope of active SFC active OAM is for use within a single provider provider's
   operational domain.  Active  The SFC active OAM deployment scope is deliberately constrained,
   as explained in <xref target="RFC7665"/> and <xref target="RFC8300"/>, and limited to a single
   network administrative domain.</t>
    </section>
    <section anchor="sec_terminology" numbered="true" toc="default">
      <name>Terminology and Conventions</name>
      <t>
   The terminology defined in <xref target="RFC7665" format="default"/> is used extensively throughout this document,
   and the reader is expected to be familiar with it.
      </t>
      <t>
      In this document, SFC OAM refers to an active OAM <xref target="RFC7799" format="default"/> in an SFC architecture.
      In this document,
      Additionally, "Echo Request/Reply" and "SFC Echo Request/Reply" are used interchangeably.
      </t>
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
<t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
   NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
   "MAY", "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "OPTIONAL" "<bcp14>OPTIONAL</bcp14>" in this document are
    to be interpreted as described in BCP 14 BCP&nbsp;14 <xref target="RFC2119" format="default"/> target="RFC2119"/>
    <xref target="RFC8174" format="default"/> target="RFC8174"/> when, and only when, they appear in all capitals,
    as shown here.
</t>
      </section>
      <section numbered="true" toc="default">
        <name>Acronyms</name>
        <t>E2E:       End-to-End</t>
        <t>FM:        Fault Management</t>
        <t>NSH:       Network Service Header</t>
        <t>OAM:       Operations,
	<dl newline="false">
        <dt>E2E:</dt>       <dd>End-to-End</dd>
        <dt>FM:</dt>        <dd>Fault Management</dd>
        <dt>MAC:</dt>       <dd>Message Authentication Code</dd>
        <dt>NSH:</dt>       <dd>Network Service Header</dd>
        <dt>OAM:</dt>       <dd>Operations, Administration, and Maintenance</t>
        <t>RSP:       Rendered Service Path</t>
        <t>SF:        Service Function</t>
        <t>SFC:       Service Maintenance</dd>
        <dt>RSP:</dt>       <dd>Rendered Service Path</dd>
        <dt>SF:</dt>        <dd>Service Function</dd>
        <dt>SFC:</dt>       <dd>Service Function Chain</t>
        <t>SFF:       Service Chaining</dd>
        <dt>SFF:</dt>       <dd>Service Function Forwarder</t>
        <t>SFI:         Service Forwarder</dd>
        <dt>SFI:</dt>       <dd>Service Function Instance</t>
        <t>SFP:       Service Instance</dd>
        <dt>SFP:</dt>       <dd>Service Function Path</t>
        <t>MAC:       Message Authentication Code</t> Path</dd>
      </dl>
      </section>
    </section>
    <section anchor="oam-req-sec" numbered="true" toc="default">
      <name>Requirements for Active OAM in SFC</name>
      <t>
     As discussed in <xref target="RFC8924" format="default"/>, SFC-specific means are needed
     to perform the FM OAM task in an SFC architecture, including failure detection, defect
     characterization, and localization. This document defines the set of requirements
     for active FM OAM mechanisms to be used in an SFC architecture.
      </t>
      <figure anchor="fig1">
        <name>An Example of SFC Data Plane Architecture</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
              +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
              |SFI11| |SFI12| |SFI21| |SFI22| |SFI31| |SFI32|
              +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
                  \    /          \   /           \    /
   +----------+   +----+         +----+          +----+
   |Classifier|---|SFF1|---------|SFF2|----------|SFF3|
   +----------+   +----+         +----+          +----+
       ]]></artwork>
      </figure>
      <t>
    The architecture example depicted in <xref target="fig1" format="default"/>
    considers a service function chain that includes three distinct service functions.
     In this example, the SFP traverses SFF1, SFF2, and SFF3. Each SFF is connected to two
     service function instances
     Service Function Instances (SFIs) of the same service function.
     End-to-end SF.
     End-to-End (E2E) SFC OAM has the Classifier as the ingress
     and SFF3 as its egress. The scope of Segment SFC OAM is between two elements that are part of the same SFP.
     Following
     The following are the requirements for an FM SFC OAM, whether with the E2E or segment scope:
      </t>
      <dl newline="false" spacing="normal">
        <dt/>
        <dd>
     REQ#1:  Packets
<ol type="REQ%d:" group="reqs">
<li>Packets of active SFC active OAM SHOULD <bcp14>SHOULD</bcp14> be fate sharing with the monitored SFC data
            in the forward direction from ingress toward egress endpoint(s) of the OAM test.
     </dd>
      </dl> </li></ol>

      <t>
     The fate sharing, in the SFC environment, is achieved when a test packet traverses the same path
     and receives the same treatment in the underlay network layer as an SFC-encapsulated packet.
      </t>
      <dl newline="false" spacing="normal">
        <dt/>
        <dd>
     REQ#2:
<ol type="REQ%d:" group="reqs">
<li>     SFC OAM MUST <bcp14>MUST</bcp14> support monitoring of the continuity of the SFP between any of its elements.
     </dd>
      </dl>
     </li></ol>

      <t>
	An SFC failure might be declared when several consecutive test packets are not received within a pre-determined predetermined time.
     For example, in the E2E FM SFC OAM case, i.e., the egress, SFF3 (<xref target="fig1" format="default"/>)
     could be the entity that detects the SFP's failure by monitoring a flow
     of  periodic test packets. The ingress may be capable of recovering
     from the failure, e.g., using redundant SFC elements. Thus, it is beneficial for the egress
     to signal the new defect state to the ingress, which in this example example, is the Classifier.
     Hence Classifier,
     hence, the following requirement:
      </t>
      <dl newline="false" spacing="normal">
        <dt/>
        <dd>
     REQ#3:
<ol type="REQ%d:" group="reqs">
<li>     SFC OAM MUST <bcp14>MUST</bcp14> support Remote Defect Indication notification by the egress to the ingress.
     </dd>
        <dt/>
        <dd>
     REQ#4: ingress.</li>

<li>     SFC OAM MUST <bcp14>MUST</bcp14> support connectivity verification of the SFP.
     Definition
     The definitions of the misconnection defect, entry, and exit criteria are outside the scope of this document.
     </dd>
      </dl>
     </li>
      </ol>
      <t>
     Once an SFF detects the defect, the objective of the SFC OAM changes from the detection of a defect
     to defect characterization and localization.
      </t>
      <dl newline="false" spacing="normal">
        <dt/>
        <dd>
     REQ#5:
<ol type="REQ%d:" group="reqs">
        <li>
     SFC OAM MUST <bcp14>MUST</bcp14> support fault localization of the Loss loss of Continuity Check continuity check within an SFP.
     </dd>
        <dt/>
        <dd>
     REQ#6:
     </li>
        <li>
     SFC OAM MUST <bcp14>MUST</bcp14> support an SFP tracing to discover the RSP.
     </dd>
      </dl>
     </li>
      </ol>
      <t>
     In the example presented in <xref target="fig1" format="default"/>, two distinct instances of the same service function SF share the same SFF.
     In this example, the SFP can be realized over several RSPs that use different instances of the SF of the same type.
     For type,
     for instance, RSP1(SFI11--SFI21--SFI31) and RSP2(SFI12--SFI22--SFI32).
     Available RSPs can be discovered using the trace function discussed in Section 4.3 of <xref target="RFC8924" section="4.3" sectionFormat="of" format="default"/>
     or the procedure defined in <xref target="tracing-sfp"/>.
</t>
      <dl newline="false" spacing="normal">
        <dt/>
        <dd>
     REQ#7:
<ol type="REQ%d:" group="reqs">
        <li>
     SFC OAM MUST <bcp14>MUST</bcp14> have the ability to discover and exercise all available RSPs in the network.
     </dd>
      </dl>
     </li>
      </ol>
      <t>
     The SFC OAM layer model described in <xref target="RFC8924" format="default"/>
     offers an approach for defect localization within a service function chain.
     As the first step, the SFP's continuity for SFFs that are part of the same SFP could be verified.
     After the reachability of SFFs has already been verified, SFFs that serve an SF may be used as a test packet source.
     In such a case, an SFF can act as a proxy for another element within the service function chain.
      </t>
      <dl newline="false" spacing="normal">
        <dt/>
        <dd>
     REQ#8:
<ol type="REQ%d:" group="reqs">
        <li>
     SFC OAM MUST <bcp14>MUST</bcp14> be able to trigger on-demand FM remotely with
            responses being directed toward the initiator of the remote request.
     </dd>
      </dl>
     </li>
      </ol>
      <t>The conformance of the SFC Echo Request/Reply mechanism to these requirements is  reflected below:</t>
      <ul>
      <li>REQ#1: Fate

<ol type="REQ%d:">
      <li>Fate sharing via the SFC Echo Request/Reply defined in <xref target="sfc-echo-request-reply"/>.</li>
      <li>REQ#2: Continuity
      <li>Continuity monitoring via SFF traceroute the SFP tracing defined in Tracing an SFP <xref target="tracing-sfp"/>.</li>
      <li>REQ#3: Remote
      <li>Remote defect detection via the SFC Echo Request/Reply defined in <xref target="sfc-echo-request-reply"/>.</li>
      <li>REQ#4: Connectivity
      <li>Connectivity verification via SFF traceroute the SFP tracing defined in <xref target="tracing-sfp"/>.</li>
      <li>REQ#5: Fault
      <li>Fault localization via Verification verification of the SFP consistency defined in <xref target="sf-consist-seq"/>.</li>
      <li>REQ#6: SFP
      <li>SFP tracing via Tracing an SFP as described in <xref target="tracing-sfp"/> and Verification verification of SFP consistency as defined in <xref target="sf-consist-seq"/>.</li>
      <li>REQ#7: Discover
      <li>Discover and exercise available RSPs via Trace trace defined in <xref target="tracing-sfp"/>.</li>
      <li>REQ#8: Can
      <li>Can be addressed by adding the proxying capability to the SFC Echo Request/Reply described in this document.
      <xref target="RFC7555"/> describes an example of a proxy function for an Echo Request.
      Specification of a proxy function for SFC Echo Request is outside the scope of this document.</li>
      </ul>
      </ol>
    </section>
    <section anchor="sfc-active-oam-def" numbered="true" toc="default">
      <name>Active OAM Identification in the NSH</name>
      <t>
      Active
      SFC active OAM combines OAM commands and/or data included in a message that immediately follows the NSH.
      To identify the active SFC active OAM message, the "Next Protocol" Next Protocol field MUST <bcp14>MUST</bcp14> be set to Active SFC Active OAM (TBA1) (0x07)
      (<xref target="iana-sfc-oam-protocol" format="default"/>). The O bit in the NSH MUST <bcp14>MUST</bcp14> be set, according to <xref target="I-D.ietf-sfc-oam-packet"/>. target="RFC9451"/>.
       A case when the O bit is clear and the "Next Protocol" Next Protocol field value is set to Active SFC Active OAM (TBA1) (0x07) is considered an erroneous combination.
       An implementation MUST <bcp14>MUST</bcp14> report it. Although the notification mechanism is outside the scope of this specification, note that it MUST <bcp14>MUST</bcp14> include rate-limiting control.
            The packet SHOULD <bcp14>SHOULD</bcp14> be dropped. An implementation MAY <bcp14>MAY</bcp14> have control to enable the processing of the OAM payload.
      </t>
      </section>

      <section anchor="sfc-sfc-active-oam-hdr" numbered="true" toc="default">
      <name>Active SFC
      <name>SFC Active OAM Header</name>
      <t>
      SFC OAM is required to perform multiple tasks. Several active OAM protocols could be used to address all the requirements.
     When IP/UDP encapsulation of an SFC OAM control message is used,
     protocols can be demultiplexed using the destination UDP port number. But an extra IP/UDP header, especially
      in an IPv6 network, adds overhead compared to the length of an active Active OAM control packet Control Packet
      (e.g., BFD Control packet <xref target="RFC5880"/>). In some environments, for example, when measuring performance metrics,
      it is beneficial to transmit OAM packets in a broad range of lengths to emulate application traffic closer.
      This document defines an Active OAM Header (<xref target="sfc-oam-header-pic" format="default"/>)
      to demultiplex active OAM protocols on an SFC.
      </t>
      <figure anchor="sfc-oam-header-pic">
        <name>SFC Active OAM Header</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   V   | Msg Type  | Reserved  |          Length               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~              SFC Active OAM Control Packet                    ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <ul empty="true"
      <dl newline="false" spacing="normal">
        <li>V - a
        <dt>V -</dt> <dd>a four-bit field that indicates the current version of the SFC active Active OAM header. Header. The current value is 0.
        The version number is to
   be incremented whenever a change is made that affects the ability of
   an implementation to parse or process the SFC Active OAM Header correctly.
   For correctly,
   for example, if syntactic or semantic changes are made to any of the fixed fields.</li>
        <li>Msg fields.</dd>
   <dt>Msg Type - a -</dt> <dd>a six-bit field identifies OAM protocol, e.g., Echo Request/Reply.</li>
        <!--
        <li>Flags - eight bits long field carries bit flags that define optional capability and thus processing of identifies the
SFC active OAM control packet, protocol, e.g., optional timestamping. No flags are defined in this document, and
therefore, the bit flags MUST be zeroed on transmission and ignored on receipt.</li>
-->
<li>Reserved - an Echo Request/Reply.</dd>
<dt>Reserved -</dt> <dd>a six-bit field. It MUST <bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
        <li>Length - a receipt.</dd>
        <dt>Length -</dt> <dd>a two-octet field that is the length of the SFC active Active OAM control packet Control Packet in octets.</li>
      </ul> octets.</dd>
      </dl>
    </section>

    <section anchor="sfc-echo-request-reply" numbered="true" toc="default">
      <name>Echo Request/Echo Reply Request/Reply for SFC</name>
      <t>
   The Echo Request/Reply is a well-known active OAM mechanism
   extensively used to verify a path's continuity, detect inconsistencies between a state in control
   and the data planes, and localize defects in the data plane. ICMP (<xref target="RFC0792" format="default"/> for IPv4
   and <xref target="RFC4443" format="default"/> for IPv6 networks) and MPLS <xref target="RFC8029" format="default"/> are examples
   of broadly used active OAM protocols based on the Echo Request/Reply principle.
   The SFC Echo Request/Reply control message (format is presented in <xref target="sfc-ping-pic"/>)
   is an instance of the SFC Active OAM Control Packet that is a part of the SFC Active OAM Header (<xref target="sfc-oam-header-pic"/>).
   </t>
      <figure anchor="sfc-ping-pic">
        <name>SFC Echo Request/Reply Format</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Echo Request Flags       |          Reserved             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Echo Type   |   Reply mode Mode  |  Return Code  |Return Subcode |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sender's Handle                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Sequence Number                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                              TLVs                             ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          ]]></artwork>
      </figure>
      <t>
  The interpretation of the fields is as follows:
      </t>
      <ul empty="true"
      <dl newline="false" spacing="normal">
  <!--
        <li>
 Version (V) is a four-bit field that indicates the current version of the SFC Echo Request/Reply. The current value is 0.
  The version number is to
   be incremented whenever a change is made that affects the ability of
   an implementation to parse or process the control packet correctly.
    If a packet presumed to carry an SFC Echo Request/Reply is received at an SFF, and
      the SFF does not understand the Version field value, the packet MUST be discarded, and
      the event SHOULD be logged. Versioning of SFC Echo Request/Reply
      is independent of the versioning of the SFC Active OAM Header (<xref target="sfc-sfc-active-oam-hdr"/>). For example,
      if a new SFC Active OAM Header format with V = 1 is defined, an SFC Echo Request/Reply packet
      with V = 0 MUST be handled as described in this document.
  </li>
  -->
          <li>The Echo
          <dt>Echo Request Flags is a -</dt> <dd>a two-octet bit vector field. <xref target="iana-echo-ping-global-flags"/> requests IANA to create
        a new registry for flags. This specification defines all flags for future use. Flags MUST <bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
        <li>Reserved is a receipt.</dd>
        <dt>Reserved -</dt> <dd>a two-octet field. It MUST <bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
        <li>The Echo receipt.</dd>
        <dt>Echo Type is a -</dt> <dd>a one-octet field that reflects the packet type. SFC Echo Request/Echo Reply Request/Reply Echo Types,
        defined in this document, are listed in <xref target="iana-sfc-echo-message-type"/>.</li>
        <li>The Reply target="iana-sfc-echo-message-type"/>.</dd>
        <dt>Reply Mode is a -</dt> <dd>a one-octet field. It defines the type of the return path requested by the sender of the Echo Request.  </li>
        <li>Return Codes  </dd>
        <dt>Return Code and Subcodes are one-octet Return Subcode -</dt> <dd>one-octet fields each. These can be used
  to inform the sender about the result of processing its request.
  For all Return Code values defined in this document (<xref target="iana-sfc-ping-return-codes"/>),
  the value of the Return Subcode field MUST <bcp14>MUST</bcp14> be set to zero.</li>
        <li>The Sender's zero.</dd>
        <dt>Sender's Handle is a -</dt> <dd>a four-octet field. It MUST <bcp14>MUST</bcp14> be filled in by the sender of the Echo Request
  and returned unchanged by the Echo Reply sender (if a reply is being sent). The sender of the Echo Request SHOULD <bcp14>SHOULD</bcp14> use
 a pseudo-random pseudorandom number generator <xref target="RFC4086"/> to set the value of the Sender's Handle field.
 In some use cases, an implementation MAY <bcp14>MAY</bcp14> use the Sender's Handle for proprietary signaling as long as the system
 that receives the SFC Echo Request doesn't alter the value of the Sender's Handle field but copies it into the SFC Echo Reply.</li>
        <li>
  The Reply.</dd>
        <dt>
  Sequence Number is a -</dt> <dd>a four-octet field, and it field. It is assigned by the sender and can be, for example, used to detect missed replies.
  The initial Sequence Number contains an unsigned integer that wraps around. It MUST <bcp14>MUST</bcp14> be pseudo-randomly pseudorandomly generated <xref target="RFC4086"/>
  and then SHOULD <bcp14>SHOULD</bcp14> be monotonically increasing in the course of the test session. If a reply is sent, the sender of the SFC Echo Reply message MUST <bcp14>MUST</bcp14> copy the value from the received
  SFC Echo Request.
  </li>
      </ul>
  </dd>
      </dl>

      <t>
          TLV is a variable-length construct whose length is multiple of four-octet words.  Multiple TLVs MAY <bcp14>MAY</bcp14> be placed in an
   SFC Echo Request/Reply packet. None, one one, or more sub-TLVs may be enclosed
   in the value part of a TLV, subject to the semantics of the (outer) TLV. If no TLVs are included in an SFC Echo Request/Reply,
   the value of the Length field in the SFC Active OAM Header MUST <bcp14>MUST</bcp14> be 16 octets.
   <xref target="sfc-tlv-fig" format="default"/> presents the format of an SFC Echo Request/Reply TLV, where the fields are defined as follows:
</t>
      <figure anchor="sfc-tlv-fig">
        <name>SFC Echo Request/Reply TLV Format</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |    Reserved   |           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                            Value                              ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <ul empty="true"
      <dl newline="false" spacing="normal">
        <li>
        <dt>
Type - a -</dt> <dd>a one-octet field that characterizes the interpretation of the Value field.
<!-- The value of the Type field determines its interpretation and encoding. -->
   Type values are allocated according to <xref target="iana-sfc-active-oam-tlv" format="default"/>.
</li>
        <li>Reserved - a
</dd>
        <dt>Reserved -</dt> <dd>a one-octet field. The field MUST <bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
        <li> receipt.</dd>
        <dt>
Length - a -</dt> <dd>a two-octet field equal to the Value field's length in octets as an unsigned integer.
</li>
        <li>
</dd>
        <dt>
Value - a -</dt> <dd>a variable-length field. The value of the Type field determines its interpretation and encoding.
      </li>
      </ul>
      </dd>
      </dl>
      <section anchor="return-codes-sec" numbered="true" toc="default">
        <name>Return Codes</name>
        <t>
   The value of the Return Code field MUST <bcp14>MUST</bcp14> be set to zero by the sender of an Echo Request.  The
   receiver of said Echo Request MUST <bcp14>MUST</bcp14> set it to one of the values
   in IANA's SFC "SFC Echo Return Codes sub-registry Codes" registry (<xref target="iana-sfc-ping-return-codes"/>)
  in the corresponding Echo Reply that it generates.
        </t>

      </section>

      <section anchor="authen-sec" numbered="true" toc="default">
        <name>Authentication in Echo Request/Reply</name>
        <t>
Authentication can be used to protect the integrity of the information in the SFC Echo Request and/or Echo Reply.
In the <xref target="RFC9145" format="default"/> format="default"/>, a variable-length Context Header has been defined to protect the integrity
of the NSH and the payload. The header can also be used for the optional encryption of sensitive metadata.
The MAC#1 (Message Authentication Code) Context Header is more suitable for the integrity protection of active SFC active OAM,
particularly of the SFC Echo Request and Echo Reply, as defined in this document. On the other hand, using the MAC#2 Context Header allows the detection
of mishandling of the O-bit O bit by a transient SFC element.
</t>
      </section>

      <section anchor="echo-request-send" numbered="true" toc="default">
        <name>SFC Echo Request Transmission</name>
        <t>
The SFC Echo Request control packet MUST <bcp14>MUST</bcp14> use the appropriate underlay network encapsulation of the monitored
SFP. The Echo Request MUST <bcp14>MUST</bcp14> set the O bit in the NSH, as defined in <xref target="I-D.ietf-sfc-oam-packet" target="RFC9451" format="default"/>.
The NSH MUST <bcp14>MUST</bcp14> be immediately followed by the SFC Active OAM Header defined in <xref target="sfc-active-oam-def" format="default"/>.
The Echo Type field's value in the SFC Active OAM Header MUST <bcp14>MUST</bcp14> be set to the SFC Echo Request/Echo Reply Request/Reply value (1) (1), per <xref target="iana-sfc-oam-msg-type" format="default"/>.
</t>
        <t>
Value
The value of the Reply Mode field MUST <bcp14>MUST</bcp14> be set to one of the following:
	</t>
        <ul
        <dl newline="false" spacing="normal">
          <li>
          <dt>
Do Not Reply (1) -</dt> <dd>This is the value if one-way monitoring is desired. If the Echo Request is used to measure synthetic packet loss,
the receiver may report loss measurement results to a remote node. Ways of learning the identity of that node are
outside the scope of this specification.
</li>
          <li>
</dd>
          <dt>
Reply via an IPv4/IPv6 UDP Packet (2). If (2) -</dt> <dd>If an SFC Echo Request is not encapsulated in IP/UDP,
then this value requests the use of the Source ID TLV (<xref <xref target="source-tlv-sec"/>).
</li>
          <li>
</dd>
          <dt>
Reply via Specified Path (4). This (4) -</dt> <dd>This value requests the use of the particular
return path specified in the included TLV to verify bi-directional bidirectional continuity and
may also increase the robustness of the monitoring by selecting a more stable path.
<xref target="sfc-reply-tlv-sec"/> provides an example of communicating an explicit path for the Echo Reply.
</li>
<li>
</dd>
<dt>
Reply via an IPv4/IPv6 UDP Packet with the data integrity protection (5). This (5) -</dt> <dd>This value requests the use of the MAC Context Header <xref target="RFC9145"/>.
</li>
<li>
</dd>
<dt>
Reply via Specified Path with the the data integrity protection (7). This (7) -</dt> <dd>This value requests the use of the MAC Context Header <xref target="RFC9145"/>.
</li>
        </ul>
</dd>
        </dl>

      <section anchor="source-tlv-sec" numbered="true" toc="default">
        <name>Source ID TLV</name>

      <t>
     The responder to the SFC Echo Request encapsulates the SFC Echo Reply message in the IP/UDP packet if the Reply mode Mode is
     "Reply via an IPv4/IPv6 UDP Packet" or "Reply via an IPv4/IPv6 UDP Packet with the data integrity protection".
     Because the NSH does not identify the ingress node that generated
     the Echo Request, information that sufficiently identifies the source MUST <bcp14>MUST</bcp14> be included in the message so that
    the IP destination address and destination UDP port number for IP/UDP encapsulation of the SFC Echo Reply could be derived.
     The sender of the SFC Echo Request MUST <bcp14>MUST</bcp14> include the Source ID TLV (<xref target="sfc-source-tlv-fig" format="default"/>).
        </t>
        <figure anchor="sfc-source-tlv-fig">
          <name>SFC Source ID TLV</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Source ID  |   Reserved1   |           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Port Number          |           Reserved2           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                         IP Address                            ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
        <t>
        where
        The fields are defined as follows:
        </t>
        <ul empty="true"
        <dl newline="false" spacing="normal">
          <li>
          <dt>
        Source ID - the -</dt> <dd>the value MUST <bcp14>MUST</bcp14> be set to 1 (<xref target="iana-sfc-active-oam-tlv" format="default"/>).
        </li>
          <li>Reserved1 - a
        </dd>
          <dt>Reserved1 -</dt> <dd>a one-octet field. The field MUST <bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
          <li> receipt.</dd>
          <dt>
        Length - the -</dt> <dd>the value equals the length of the data following the Length field counted in octets.
        The value of the Length field can be 8 or 20. If the value of the field is neither, the Source ID TLV is considered to be malformed.
        </li>
                  <li>
        </dd>
                  <dt>
        Port Number is a -</dt> <dd>a two-octet field. It contains the UDP port number of the sender of the SFC OAM control message.
        The value of the field MUST <bcp14>MUST</bcp14> be used as the destination UDP port number
        in the IP/UDP encapsulation of the SFC Echo Reply message.
        </li>
                  <li>
        </dd>
                  <dt>
        Reserved2 is a -</dt> <dd>a two-octet field. The field MUST <bcp14>MUST</bcp14> be zeroed on transmit and ignored on receipt.
        </li>
          <li>
      </dd>
          <dt>
        IP Address -</dt> <dd>a field that contains the IP address of the sender of the SFC OAM control message, i.e., IPv4 or IPv6.
        The value of the field MUST <bcp14>MUST</bcp14> be used as the destination IP address
        in the IP/UDP encapsulation of the SFC Echo Reply message.
        </li>
        </ul>
        </dd>
        </dl>
        <t>
        A single Source ID TLV for each address family, i.e., IPv4 and IPv6, MAY <bcp14>MAY</bcp14> be present in an SFC Echo Request message.
        If the Source ID TLVs for both address families are present in an SFC Echo Request message,
        the SFF MUST NOT <bcp14>MUST NOT</bcp14> replicate an SFC Echo Reply
        but choose the destination IP address for the one SFC Echo Reply it sends based on the local policy.
        The source IP address used in the IP/UDP encapsulation of the SFC Echo Reply is one of the IP addresses associated with the responder.
       The value of the Port Number field MUST <bcp14>MUST</bcp14> be used as the destination UDP port number
        in the IP/UDP encapsulation of the SFC Echo Reply message. The responder selects
        the source UDP port number from the dynamic range of port numbers.
        If more than one Source ID TLV per the address family is present, the receiver MUST <bcp14>MUST</bcp14> use the first TLV and ignore the rest.
        The Echo Reply message, including relevant TLVs, follows the IP/UDP headers immediately.
        </t>
      </section>

      </section>

      <section anchor="echo-request-recieve" numbered="true" toc="default">
        <name>Processing a Received SFC Echo Request</name>
        <t>
   Punting a received SFC Echo Request to the control plane for validation and processing is triggered by one
   of the following packet processing exceptions:
   NSH TTL expiration, NSH Service Index (SI) expiration, or the receiver is the terminal SFF for an SFP.
</t>
        <t>
        An SFF that received the SFC Echo Request MUST <bcp14>MUST</bcp14> validate the packet as follows:
        </t>
               <ul
               <ol spacing="normal" empty="true">
        <li>1. If type="1">
        <li><t>If the SFC Echo Request is integrity-protected, integrity protected, the receiving SFF first MUST <bcp14>MUST</bcp14> verify the authentication.</li>
                <li>1.1 authentication.</t>
                <t>1.1. Suppose the authentication validation has failed and the Source ID TLV is considered properly formatted.
        In that case, the SFF MUST <bcp14>MUST</bcp14> send an SFC Echo Reply with the Return Code
        set to 3 ("Authentication failed") and the Subcode set to zero to the system identified in the Source ID TLV (see <xref target="echo-reply-send"/>),
        according to a rate-limit control mechanism, an SFC Echo Reply with the Return Code
        set to "Authentication failed" and the Subcode set to zero.</li>
                <li>1.2 mechanism.</t>
                <t>1.2. If the authentication is validated successfully, the SFF that has received
        an SFC Echo Request verifies the rest of the packet's general sanity.</li>

        <li>2. Validate consistency.</t></li>

        <li><t>Validate the Source ID TLV, as defined in <xref target="source-tlv-sec"/>.</li>
        <li>2.1 target="source-tlv-sec"/>.</t>
        <t>2.1. If the Source ID TLV is determined to be malformed, the received SFC Echo Request processing is stopped,
        the message is dropped, and the event SHOULD <bcp14>SHOULD</bcp14> be logged, according to a rate-limiting control for logging.</li>
        <li>3. logging.</t></li>
        <li>The Sender's Handle and Sequence Number fields are not examined but are copied in the SFC Echo Reply message.</li>
        <li>4. If
        <li>If the packet is not well-formed, well formed, i.e., not formed according to this specification,
        the receiver receiving SFF SHOULD <bcp14>SHOULD</bcp14> send an SFC Echo Reply with the Return Code
        set to "Malformed 1 ("Malformed Echo Request received" received") and the Subcode set to zero under the control of the rate-limiting mechanism
        to the system identified in the Source ID TLV (see <xref target="echo-reply-send"/>).</li>
        <li>5. If
        <li>If there are any TLVs that the SFF does not understand, the SFF MUST <bcp14>MUST</bcp14> send
        an SFC Echo Reply with the Return Code set to 2 ("One or more of the TLVs was not understood") and set the Subcode to zero. Also,
        the SFF MAY <bcp14>MAY</bcp14> include an Errored TLVs TLV (<xref target="errored-tlv-sec" format="default"/>) that,
        as sub-TLVs, contains only the misunderstood TLVs.</li>
        <li>6. If
        <li>If the sanity consistency check of the received Echo Request succeeded, i.e., the Echo Request is deemed properly formed,
        then the SFF at the end of the SFP MUST <bcp14>MUST</bcp14>
         send an SFC Echo Reply with the Return Code value set to 5 ("End of the SFP") and the Subcode set to zero.</li>
        <li>7. If
        <li>If the SFF is not at the end of the SFP and the NSH TTL value is 1, the SFF MUST <bcp14>MUST</bcp14> send
        an SFC Echo Reply with the Return Code set to 4 ("SFC TTL Exceeded") and the Subcode set to zero.</li>
        <li>8. In
        <li>In all other cases, for the validated Echo Request message, a transit, i.e., not at the end of the SFP,
        SFF MUST <bcp14>MUST</bcp14> send an SFC Echo Reply with the Return Code value set to 0 ("No Error") and the Subcode set to zero.</li>
        </ul>
        </ol>

        <section anchor="errored-tlv-sec" numbered="true" toc="default">
          <name>Errored TLVs TLV</name>
          <t>
   If the Return Code for the Echo Reply is determined as 2 ("One or more of the TLVs was not understood"),
   the Errored TLVs TLV might be included in an Echo Reply. The use of this TLV
is meant to inform the sender of an Echo Request of TLVs either not
supported by an implementation or parsed and found to be in error.
</t>
          <figure anchor="errored-tlv-fig">
            <name>Errored TLVs TLV</name>
            <artwork name="" type="" align="left" alt=""><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Errored TLVs |    Reserved   |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             Value                             |
.                                                               .
.                                                               .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>
          <t>
        where
        The fields are defined as follows:
          </t>
          <ul empty="true"
          <dl newline="false" spacing="normal">
            <li>
The
            <dt>
Errored TLVs Type MUST -</dt> <dd>the field <bcp14>MUST</bcp14> be set to 2 (<xref target="iana-sfc-active-oam-tlv" format="default"/>).
   </li>
            <li>Reserved - the
   </dd>
            <dt>Reserved -</dt> <dd>the field MUST <bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
            <li> receipt.</dd>
            <dt>
Length - the -</dt>  <dd>the value equals to the length of the Value field in octets.
</li>
            <li>
   The
</dd>
            <dt>
   Value -</dt> <dd>the field contains the TLVs, encoded as sub-TLVs (as shown in <xref target="failed-tlv-fig"/>),
that were not understood or failed to be parsed correctly.
</li>
          </ul>
</dd>
          </dl>
          <figure anchor="failed-tlv-fig">
            <name>Not Understood or Failed TLV as a Sub-TLV</name>
            <artwork name="" type="" align="left" alt=""><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Sub-TLV Type |    Reserved   |        Sub-TLV Length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                        Sub-TLV Value                          ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>

          <t>
        where
        The fields are defined as follows:
          </t>
          <ul empty="true"
          <dl newline="false" spacing="normal">
            <li>
The Sub-TLV's
            <dt>
Sub-TLV Type - a -</dt> <dd>a copy of the first octet of the TLV that is not understood or failed to be parsed TLV.
   </li>
            <li>Reserved - MUST parsed.
   </dd>
            <dt>Reserved -</dt> <dd><bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
            <li> receipt.</dd>
            <dt>
Sub-TLV Length - the -</dt> <dd>the value equals to the value of the Length field of the errored TLV.
</li>
            <li>
   The
</dd>
            <dt>
   Sub-TLV Value -</dt> <dd>the field contains data that follow follows the Length field in the errored TLV.
</li>
          </ul>
</dd>
          </dl>

        </section>
      </section>

      <section anchor="echo-reply-send" numbered="true" toc="default">
        <name>SFC Echo Reply Transmission</name>
        <t>
The "Reply Mode" Reply Mode field directs whether and how the Echo Reply message should be sent.
The Echo Request sender MAY <bcp14>MAY</bcp14> use TLVs to request that the corresponding Echo Reply
be transmitted over the specified path. For example,  a TLV
that specifies the return path of the Echo Reply if the Return Mode in the Echo Request is set
to Reply via Specified Path (4) is described in <xref target="sfc-reply-tlv-sec"/>.
Value 1 is the "Do not reply" Not Reply" mode and
suppresses the Echo Reply packet transmission. The value 2 of the Reply mode Mode field requests
sending the Echo Reply packet out-of-band as an IPv4 or IPv6 IPv4/IPv6 UDP packet.
</t>

   <section anchor="sfc-reply-tlv-sec" numbered="true" toc="default">
      <name>Reply Service Function Path TLV</name>
      <t>
While the SFC Echo Request always traverses the SFP it is directed to by
using the NSH, the corresponding Echo Reply usually is sent without the NSH.
In some cases, an operator might choose to direct the responder
to send the and Echo Reply with the NSH over a particular SFP.
This section defines a new Type-Length-Value (TLV), TLV, i.e., Reply
	 Service Function Path TLV, for Reply via Specified Path mode of the SFC Echo Reply.
      </t>
      <t>
	The Reply Service Function Path TLV can provide an efficient mechanism to test
	SFCs, such as bidirectional and hybrid SFC, as defined in Section 2.2 of <xref target="RFC7665" section="2.2" sectionFormat="of" format="default"/>.
	For example, it allows an operator to test both directions of the bidirectional or
	hybrid SFP with a single SFC Echo Request/Echo Reply Request/Reply operation.
      </t>
	<t>
	The Reply Service Function Path TLV carries the information that sufficiently
	identifies the return SFP that the SFC Echo Reply message is
	expected to follow.  The format of Reply Service Function Path TLV is shown
	in <xref target="sfc-reply-path-tlv-fig" format="default"/>.
      </t>
      <figure anchor="sfc-reply-path-tlv-fig">
        <name>SFC Reply TLV Format</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Reply SFP   |    Reserved   |          Length               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Reply Service Function Path Identifier     | Service Index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
      </figure>
      <t>where:</t>
      <ul
      <t>The fields are defined as follows:</t>
      <dl newline="false" spacing="normal">
        <li>Reply
        <dt>Reply SFP (Service Function Path) (3) - identifies -</dt> <dd>identifies the TLV that contains information about
         the SFC Reply path.</li>
        <li>Reserved MUST path.</dd>
        <dt>Reserved -</dt> <dd><bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
        <li>Length - the receipt.</dd>
        <dt>Length -</dt> <dd>the value MUST <bcp14>MUST</bcp14> be equal to 4</li>
        <li> 4.</dd>
        <dt>
	  Reply Service Function Path Identifier - a -</dt> <dd>a three-octet field that contains the SFP identifier for the path that
	  the SFC Echo Reply message is requested to be sent over.
	  </li>
        <li>
	  </dd>
        <dt>
	  Service Index - a -</dt> <dd>a one-octet field. The value is set to the value of the Service Index field in the NSH
	  of the SFC Echo Reply message.
	  </li>
      </ul>
	  </dd>
      </dl>
    </section>
    <section anchor="theory-operation-sec" numbered="true" toc="default">
      <name>Theory of Operation</name>
      <t>
	<xref target="RFC7110" format="default"/> defined defines a mechanism to control the return path
	for the MPLS LSP Label Switched Path (LSP) Echo Reply. In the SFC's case, the return path is an SFP along which the SFC Echo
	Reply message MUST <bcp14>MUST</bcp14> be transmitted. Hence, the Reply Service Function Path TLV included
	in the SFC Echo Request message MUST <bcp14>MUST</bcp14> sufficiently identify the SFP
    that the sender of the Echo Request message expects the receiver to use
	for the corresponding SFC Echo Reply.
      </t>
      <t>
	When sending an Echo Request, the sender MUST <bcp14>MUST</bcp14> set the value of the Reply Mode field to
	"Reply via Specified Path", defined in <xref target="echo-request-send" format="default"/>,
	and if the specified path is an SFC path, the Request MUST <bcp14>MUST</bcp14> include the Reply Service Function Path TLV.
	The Reply Service Function Path TLV consists of the identifier of the reverse SFP and an appropriate Service Index.
      </t>
      <t>
	If the NSH of the received SFC Echo Request includes the MAC Context Header,
   the packet's authentication MUST <bcp14>MUST</bcp14> be verified before using any data data, as defined in <xref target="echo-request-recieve"/>.
</t>
      <t>
	The destination SFF of the SFP being tested or and the SFF at which the NSH TTL expired
	(as per <xref target="RFC8300" format="default"/>)
	are referred to as responding SFF. SFFs. The processing described
      below equally applies to both cases.
      </t>
      <t>
	If the Echo Request message with the Reply Service Function Path TLV, TLV received by the responding
	SFF,
	SFF has the Reply Mode value of "Reply via Specified Path" but no Reply Service Function Path TLV is present,
	then the responding SFF MUST <bcp14>MUST</bcp14> send an Echo Reply with the Return Code set to 6 ("Reply Service Function Path TLV is missing").
	If the responding SFF cannot find the requested SFP SFP, it MUST <bcp14>MUST</bcp14> send an Echo Reply with the Return Code set to 7
	("Reply SFP was not found") and include the Reply Service Function Path TLV from the Echo Request message.
      </t>
      <t>
 Suppose the SFC Echo Request receiver cannot determine
 whether the specified return path SFP has the route to the initiator.
 In that case, it SHOULD <bcp14>SHOULD</bcp14> set the value of the Return Codes Code field to
 8 ("Unverifiable Reply Service Function Path").
 The receiver MAY <bcp14>MAY</bcp14> drop the Echo Request when it cannot
   determine whether the SFP's return path has the route to the
  initiator. When sending the Echo Request, the sender
   SHOULD
   <bcp14>SHOULD</bcp14> choose a proper source address according to the specified return
   path SFP to help the receiver find the viable return path.
      </t>
      <section numbered="true" toc="default">
        <name>Bi-directional
        <name>Bidirectional SFC Case</name>
        <t>
	The ability to specify the return path for an Echo Reply might be used in the case of bi-directional bidirectional
	SFC. The egress SFF of the forward SFP might not be
	co-located with a classifier of the reverse SFP, and thus thus, the egress SFF has no
	information about the reverse path of an SFC. Because of that, even for bi-directional bidirectional SFC, a
	reverse SFP needs to be indicated in a Reply Service Function Path TLV in the Echo Request
	message.
        </t>
      </section>
      </section>

      <section anchor="echo-reply-recieve" numbered="true" toc="default">
        <name>SFC Echo Reply Reception</name>
        <t>
   An SFF SHOULD NOT <bcp14>SHOULD NOT</bcp14> accept the SFC Echo Reply unless the received message passes the following checks:
        </t>
        <ul spacing="normal">
          <li>the received SFC Echo Reply is well-formed;</li> well formed;</li>
          <li>the matching SFC Echo Request is found, that is, the value of the Sender's Handle
   in the Echo Request sent is equal to the value of Sender's Handle in the
	  Echo Reply received;</li>
          <li>all other checks passed, and the
	  <li>the Sequence Number in the Echo Reply received
   matches the Sequence Number of one of the outstanding transmitted Echo Requests.</li> Requests; and</li>
          <li>all other checks passed.</li>
        </ul>
      </section>

           <section anchor="tracing-sfp" numbered="true" toc="default">
        <name>Tracing an SFP</name>
        <t>
        The SFC Echo Request/Reply can be used to isolate a defect detected in the SFP and trace an RSP.
        As with the ICMP echo request/reply Echo Request/Reply <xref target="RFC0792"/> and the MPLS echo request/reply Echo Request/Reply <xref target="RFC8029"/>,
        this mode is referred to as "traceroute". In the traceroute mode, the sender transmits a sequence of SFC Echo Request
        messages starting with the NSH TTL value set to 1 and is incremented by 1 in each next Echo Request packet.
        The sender stops transmitting SFC Echo Request packets when the Return Code in the received Echo Reply equals
        5 ("End of the SFP").
        </t>
        <t>
        Suppose a specialized information element (e.g., IPv6 Flow Label <xref target="RFC6437"/> or
   Flow ID <xref target="RFC9263"/>) is used for distributing
   the load across Equal Cost Multi-Path Multipath or Link
   Aggregation Group paths. In that case, such an element SHOULD <bcp14>SHOULD</bcp14> also be
   used for the SFC OAM traffic. Doing so is meant to induce the SFC Echo Request to follow the same RSP as the
   monitored flow.
        </t>
        </section>
        </section>

  <section anchor="sf-consist-seq" numbered="true" toc="default">
      <name>The Use of the Consistency Verification Request Message</name>
      <t>
	The consistency of an SFP can be verified by comparing the view of the SFP from the control or management plane with
	information collected from traversing by an SFC Echo Request/Reply message (<xref target="sfc-ping-pic"/>).
	The sender of an SFP Consistency Verification Request (CVReq) message MUST <bcp14>MUST</bcp14> set the value
	of the SFC Echo Request/Reply Echo Type field to SFP 3 ("SFP Consistency Verification Request (3). Request").
	The sender of  an SFP Consistency Verification Reply (CVRep) message MUST <bcp14>MUST</bcp14> set the value
	of the SFC Echo Request/Reply Echo Type field to SFP 4 ("SFP Consistency Verification Reply (4). Reply").
	All processing steps of SFC Echo Request and Echo Reply messages described in Sections <xref target="echo-request-send"/> target="echo-request-send" format="counter"/> through <xref target="echo-reply-send"/> target="echo-reply-send" format="counter"/>
	apply to the processing of CVReq and CVRep CVRep, respectively.
	</t>
	<t>
	Every SFF that
	receives a CVReq message MUST <bcp14>MUST</bcp14> perform the following actions:
      </t>
      <ul spacing="normal">
        <li>
	Collect information about the SFs traversed by the CVReq packet and send it to the ingress SFF as a CVRep packet over an IP network; network.
	</li>
        <li>Forward the CVReq to the next downstream SFF if the one exists.</li>
      </ul>
      <t>As a result, the ingress SFF collects information about all traversed SFFs and SFs, i.e.,
	information on the actual path the CVReq packet has traveled. That
	 information can be used to verify the SFC's path consistency. The mechanism for the SFP consistency
	verification is outside the scope of this document.</t>
<!--
        <t>
        For the verification of an SFP consistency, two types of SFC Active OAM
      messages are defined in addition to the SFC Echo Request/Reply messages.
      Their SFC Echo Request/Echo Response Echo Types are as follows:
        </t>
        <ul spacing="normal">
          <li>3 - SFP Consistency Verification Request</li>
          <li>4 - SFP Consistency Verification Reply</li>
        </ul>

        <t>
  Upon receiving the CVReq, the SFF MUST respond with the Consistency Verification Reply (CVRep). The SFF MUST include the SFs
	information, as described in <xref target="sf-sub-tlv-sec" format="default"/> and <xref target="sff-record-tlv-sec" format="default"/>.
        </t>
      -->
      <section anchor="sff-record-tlv-sec" numbered="true" toc="default">
        <name>SFF Information Record TLV</name>
        <t>
	For the received CVReq, an SFF, SFF that supports this specification, MUST specification <bcp14>MUST</bcp14> include in the CVRep message
	the information about SFs that are available from that SFF instance for the specified SFP. The SFF MUST <bcp14>MUST</bcp14> include the
	SFF Information Record TLV (<xref target="sff-record-tlv"/>) in the CVRep message.
	Every SFF sends back a single CVRep message, including information on all the SFs
	attached to that SFF on the SFP, as requested in the received CVReq message
	 using the SF Information sub-TLV Sub-TLV (<xref target="sf-sub-tlv-sec"/>).
        </t>
        <figure anchor="sff-record-tlv">
          <name>SFF Information Record TLV</name>
          <artwork align="center" name="" type="" alt=""><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|SFF Record TLV |    Reserved   |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Service Path Identifier (SPI)           |   Reserved    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                   SF Information Sub-TLV                      |
~                                                               ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
        </figure>
        <t keepWithPrevious="true"/>
        <t>
      The SFF Information Record TLV is a variable-length TLV that includes
      the information of all SFs available from the particular SFF instance for the specified SFP.
      <xref target="sff-record-tlv" format="default"/> presents the format of
      an SFF Information Record TLV, where the fields are defined as the following: follows:
        </t>
        <ul empty="true"
        <dl newline="false" spacing="normal">
        <li>SFF
        <dt>SFF Record TLV - The -</dt> <dd>the value is (4) (<xref target="iana-sfc-active-oam-tlv"/>).</li>
          <li>Reserved - MUST target="iana-sfc-active-oam-tlv"/>).</dd>
        <dt>Reserved -</dt> <dd><bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
          <li>Service receipt.</dd>
	<dt>Length -</dt> <dd>the value equals the sum of lengths of the Service Path Identifier, reserved, and SF Information Sub-TLV fields in
      octets.</dd>
          <dt>Service Path Identifier (SPI): The (SPI) -</dt> <dd>the identifier of SFP to which all the SFs in this TLV belong. </li>
          <li>SF </dd>
          <dt>SF Information Sub-TLV: The Sub-TLV -</dt> <dd>the sub-TLV is as defined in <xref target="sf-sub-tlv-sec" format="default"/>.</li>
        </ul> format="default"/>.</dd>
        </dl>
                <t>
If the NSH of the received SFC Echo Reply includes the MAC Context Header <xref target="RFC9145" format="default"/>,
   the authentication of the packet MUST <bcp14>MUST</bcp14> be verified before using any data. If the verification fails,
   the receiver MUST <bcp14>MUST</bcp14> stop processing the SFF Information Record TLV and notify an operator.
  The notification mechanism SHOULD <bcp14>SHOULD</bcp14> include control of rate-limited messages.
  Specification of the notification mechanism is outside the scope of this document.
</t>
      </section>
      <section anchor="sf-sub-tlv-sec" numbered="true" toc="default">
        <name>SF Information Sub-TLV</name>
        <t>
	Every SFF receiving a CVReq packet MUST <bcp14>MUST</bcp14> include the SF characteristic data into the CVRep
	packet. The format of an SF Information sub-TLV, Sub-TLV, included in
	a CVRep packet, is shown in <xref target="sf-data-sub-tlv" format="default"/>.
</t>
        <t>After the CVReq message traverses the SFP, all the information about the SFs on the SFP is available
from the TLVs included in CVRep messages. </t>
        <figure anchor="sf-data-sub-tlv">
          <name>Service Function Information Sub-TLV</name>
          <artwork align="center" name="" type="" alt=""><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  SF sub-TLV Sub-TLV   |    Reserved   |          Length               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Service Index  |          SF Type              |   SF ID Type  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          SF Identifier                        |
~                                                               ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
        </figure>
        <t keepWithPrevious="true"/>
                <ul empty="true"
                <dl newline="false" spacing="normal">
        <li>SF sub-TLV Type: one-octet long
        <dt>SF Sub-TLV -</dt> <dd>one-octet field. The value is (5) (<xref target="iana-sfc-active-oam-tlv"/>).</li>
          <li>Reserved - one-octet target="iana-sfc-active-oam-tlv"/>).</dd>
          <dt>Reserved -</dt> <dd>one-octet field. The field MUST <bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
          <li>Length - two-octet long receipt.</dd>
          <dt>Length -</dt> <dd>two-octet field. The value of this field is the length of the data following the Length field counted in octets.</li>
          <li>Service octets.</dd>
          <dt>Service Index - indicates -</dt> <dd>indicates the SF's position on the SFP.</li>
          <li>SF SFP.</dd>
          <dt>SF Type - two-octet -</dt> <dd>two-octet field. It is defined in <xref target="RFC9015" format="default"/>
	and indicates the type of SF, e.g., Firewall, firewall, Deep Packet Inspection, WAN optimization controller, etc.</li>
	<li>SF etc.</dd>
	<dt>SF ID Type - one-octet -</dt> <dd>one-octet field with values defined as in <xref target="coam-sf-id-type-sec" format="default"/>.</li>
	<li>SF format="default"/>.</dd>
	<dt>SF Identifier - an -</dt> <dd>an identifier of the SF. The length of the SF Identifier depends on the type of the SF ID Type.
	For example, if the SF Identifier is its IPv4 address, the SF Identifier should be 32 bits. </li>
        </ul>
  <!-- <t>SF ID Type and SF Identifier may be a list,
  of the SFs included in a load balance group.</t> --> </dd>
        </dl>
      </section>

      <section anchor="information-sub-tlv" numbered="true" toc="default">
        <name>SF Information Sub-TLV Construction</name>
        <t>Each SFF in the SFP MUST <bcp14>MUST</bcp14> send one and only one CVRep corresponding to the CVReq.
	If only one SF is attached to the SFF in such the SFP, only one SF information sub-TLV Information Sub-TLV is included in the CVRep.
	If several SFs are attached to the SFF in the SFP, the SF Information sub-TLV MUST Sub-TLV <bcp14>MUST</bcp14> be constructed as described below in either Section <xref target="multi-hops" format="default"/>
	and format="counter"/>
	or <xref target="load-balance" format="default"/>. format="counter"/>. </t>
        <section anchor="multi-hops" numbered="true" toc="default">
          <name>Multiple SFs as Hops of an SFP</name>
          <t>
          Multiple SFs attached to the same SFF can be the hops of the SFP.
          The service indexes of these SFs on that SFP will be different. Service
	function types
	Function Types of these SFs could be different or be the same. Information about all SFs MAY <bcp14>MAY</bcp14> be included in the CVRep message.
	Information about each SF MUST <bcp14>MUST</bcp14> be listed as separate SF Information sub-TLVs Sub-TLVs in the CVRep message.
	The same SF can even appear more than once in an SFP with a different service index.
	</t>
          <t>
          An example of the SFP consistency verification procedure for this case is shown in <xref target="coam-reply-fig" format="default"/>.
          The Service Function Path (SPI=x)
	is SF1-&gt;SF2-&gt;SF4-&gt;SF3. The SF1, SF2, and SF3 are attached to SFF1, and SF4 is attached to SFF2.
	The CVReq message is sent to the SFFs in the sequence of the
  SFP(SFF1-&gt;SFF2-&gt;SFF1). Every SFF(SFF1, SFF2) replies with the information of SFs belonging
	to the SFP. The SF information Information Sub-TLV in <xref target="sf-data-sub-tlv" format="default"/>
	contains information for each SF (SF1, SF2, SF3, and SF4).
          </t>
          <figure anchor="coam-reply-fig">
            <name>Example 1 for CVRep with multiple Multiple SFs</name>
            <artwork align="center" name="" type="" alt=""><![CDATA[
                SF1         SF2           SF4                SF3
                +------+------+            |                  |
   CVReq  ......>  SFF1       ......>  SFF2       ......> SFF1
   (SPI=x)             .                   .                  .
           <............         <..........       <...........
             CVRep1(SF1,SF2)    CVRep2(SF4)    CVRep3(SF3)
   ]]></artwork>
          </figure>
          <t keepWithPrevious="true"/>
        </section>
        <section anchor="load-balance" numbered="true" toc="default">
          <name>Multiple SFs for load balance</name> Load Balance</name>
          <t>
	Multiple SFs may be attached to the same SFF to spread the load; in other words, that means that the particular traffic flow will traverse only one of these SFs.
	These SFs have the same Service Function Type and Service Index.
	      For this case, the SF ID Type, which must be the same for all of
      these SFs, appears once once, but all of their the respective SF Identifiers will
      appear concatenated
      be listed sequentially in the SF Identifier area field of the Service Function
      Information Sub-TLV
      (see <xref target="sf-data-sub-tlv"/>). The number of these SFs can be calculated from
      the SF ID Type and the value of the Length field of the sub-TLV.
          </t>
          <t>
	An example of the SFP consistency verification procedure for this case is shown in <xref target="coam-reply-fig2" format="default"/>. The Service Function Path (SPI=x)
	is SF1a/SF1b-&gt;SF2a/SF2b. The Service Functions SF1a and SF1b are attached to SFF1, which balances the load among them.
	The Service Functions SF2a and SF2b are attached to SFF2, which, which in turn, balances its load between them.
	The CVReq message is sent to the SFFs in the sequence of the SFP (i.e. (i.e., SFF1-&gt;SFF2).
	Every SFF (SFF1, SFF2) replies with the information of SFs belonging to the SFP. The SF information Information Sub-TLV in <xref target="sf-data-sub-tlv" format="default"/>
    contains information for all SFs at that hop.
          </t>
          <figure anchor="coam-reply-fig2">
            <name>Example 2 for CVRep with multiple Multiple SFs</name>
            <artwork align="center" name="" type="" alt=""><![CDATA[
                      /SF1a                   /SF2a
                      \SF1b                   \SF2b
                        |                       |
                       SFF1                    SFF2
   CVReq   .........>  .           .........>  .
   (SPI=x)                .                       .
              <............        <...............
       CVRep1(SF1a,SF1b)       CVRep2(SF2a,SF2b)
       ]]></artwork>
          </figure>
          <t keepWithPrevious="true"/>
        </section>
      </section>
</section>
</section>

    <section anchor="sec_security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
      As an element of SFC OAM and, specifically, NSH-based, based on the NSH, the Echo Request/Reply mechanism described in this document inherits
      Security Considerations
      security considerations discussed in <xref target="RFC7665"/> and <xref target="RFC8300"/>.
      </t>
      <t>
When the integrity protection for SFC active OAM, and particularly the SFC Echo Request/Reply in particular, Request/Reply, is required,
using one of the Context Headers defined in <xref target="RFC9145" format="default"/> is RECOMMENDED. <bcp14>RECOMMENDED</bcp14>.
The MAC#1 Context Header could be more suitable for active SFC active OAM because it does not require re-calculation recalculation of the
MAC when the value of the NSH Base Header's TTL field is changed.
Integrity protection for SFC active OAM can also be achieved
using mechanisms in the underlay data plane.
For example, if the underlay is an IPv6 network, i.e., an IP Authentication Header <xref target="RFC4302" format="default"/>
or IP Encapsulating Security Payload Header <xref target="RFC4303" format="default"/> format="default"/>, it can be used to provide integrity protection.
Confidentiality for the SFC Echo Request/Reply exchanges can be achieved using the IP Encapsulating Security
Payload Header <xref target="RFC4303" format="default"/>.
Also, the security needs for the SFC Echo Request/Reply are similar to those of ICMP ping <xref target="RFC0792" format="default"/>, format="default"/> <xref target="RFC4443" format="default"/>
and MPLS LSP ping <xref target="RFC8029" format="default"/>.
      </t>
      <t>
   There are at least three approaches to attacking a node in the overlay network using the
   mechanisms defined in the document.  One is a Denial-of-Service attack, i.e.,
   sending SFC Echo Requests to overload an element of the SFC.
  The second may use spoofing, hijacking, replying, or otherwise
   tampering with SFC Echo Requests and/or replies Replies to
   misrepresent,
   misrepresent and alter the operator's view of the state of the SFC.
   The third is an unauthorized source using an SFC
   Echo Request/Reply to obtain information about the
   SFC and/or its elements, e.g., SFFs and/or SFs.
      </t>
      <t>
    It is RECOMMENDED <bcp14>RECOMMENDED</bcp14> that
   implementations throttle the number of SFC Echo Request/Echo Reply Request/Reply messages going to the control plane
   to mitigate potential Denial-of-Service attacks.
      </t>
      <t>
   Reply and spoofing attacks involving faking or
   replying to SFC Echo Reply messages would have to
   match the Sender's Handle and Sequence Number of
   an outstanding SFC Echo Request message, which is highly unlikely for off-path attackers.
   A non-matching reply would be discarded.
   <!--But since "even a broken clock is right twice a day"
   implementations MAY use Timestamp control block <xref target="I-D.ooamdt-rtgwg-ooam-header"/>
   to validate the TimeStamp Sent by requiring an exact match on this field.-->
      </t>
      <t>
   To protect against unauthorized sources trying to obtain information about the overlay and/or underlay,
   an implementation MUST <bcp14>MUST</bcp14> have means to check that the source of the Echo Request is part of the SFP.
      </t>
            <t>
Also, since the Service Function SF Information sub-TLV Sub-TLV discloses information about the SFP, the spoofed CVReq packet
may be used to obtain network information. Thus, implementations MUST <bcp14>MUST</bcp14>
  provide a means of checking the source addresses of CVReq messages, as
   specified in Source ID TLV (<xref <xref target="source-tlv-sec" format="default"/>), format="default"/> ("Source ID TLV"),
   against an access list before accepting the message.
      </t>
    </section>

       <section numbered="true" toc="default">
      <name>Operational Considerations</name>
      <t>
This section provides information about operational aspects of the SFC NSH Echo Request/Reply
according to recommendations in <xref target="RFC5706"/>.
      </t>
      <t>
      The SFC NSH Echo Request/Reply provides essential OAM functions for network operators. The SFC NSH Echo Request/Reply
      is intended to detect and localize defects in an SFC.  For example, by comparing results of the trace function in operational and failed states,
      an operator can locate the defect, e.g., the connection between SFF1 and SFF2 (<xref target="fig1"/>).
      After narrowing down a failure to an overlay link, a more specific failure location
      can be determined using OAM tools in the underlay network.
      The mechanism defined in this document can be used on-demand on demand or
      for periodic validation of an SFP or RSP. Because the protocol makes use of the control plane plane, which may
      have limited capacity, an operator must be able to rate limit
      Echo Request and Echo Reply messages. A reasonably
      selected default interval between Echo Request control packets
      can provide additional benefit for an operator. If the protocol is incrementally
      deployed in the NSH domain, SFC elements, e.g., Classifier or SFF,
      that don't support Active SFC active OAM will discard the protocol's packets.
If an SFC uses a re-classification reclassification along the SFP or when the principle of load balancing is unknown,
the fate-sharing fate sharing between data and active OAM packets cannot be guaranteed.
As a result, the OAM outcome might not reflect the state of the entire SFC properly but only its segment.
In general, it is an operational task to consider the cases where active OAM may not share fate with the monitored SFP.
      The SFC NSH Echo Request/Reply also can be used in combination with the existing
      mechanisms discussed in <xref target="RFC8924"/>, filling the gaps and extending their functionalities.
      </t>
      <t>
      Management of the SFC NSH Echo Request/Reply protocol can be provided by a proprietary tool, e.g., command line interface,
      or based on a data model, model that is structured or standardized.
      </t>
    </section>

    <section numbered="true" toc="default">
      <name>Acknowledgments</name>
      <t>
         The authors greatly appreciate the thorough review and the most helpful comments from Dan Wing, Dirk von Hugo,
        Mohamed Boucadair, Donald Eastlake, Carlos Pignataro, and Frank Brockners. The authors are thankful to John Drake for his review
        and the reference to the work on BGP Control Plane for NSH SFC.
	 The authors express their appreciation to Joel M. Halpern for his suggestion about the load-balancing scenario.
	 The authors greatly appreciate the thoroughness of comments and thoughtful suggestions by Darren Dukes that significantly improved the document.
      </t>
    </section>

    <section anchor="iana-considerations" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
      The terms used in the IANA Considerations considerations below are intended to be consistent with <xref target="RFC8126"/>.
      </t>

      <section anchor="iana-sfc-oam-protocol" numbered="true" toc="default">
        <name>SFC Active OAM Protocol</name>
        <t>
IANA is requested to assign a has assigned the following new type from in the sub-registry NSH "NSH Next Protocol of Protocol" registry within the Network "Network Service Header (NSH) Parameters registry as follows: Parameters" group of registries:
        </t>

        <table anchor="iana-sfc-oam-tbl" align="center">
          <name>SFC Active OAM Protocol</name>
          <thead>
            <tr>
              <th align="left">Value</th> align="left">Next Protocol</th>
              <th align="center">Description</th> align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">TBA1</td> align="left">0x07</td>
              <td align="center">SFC align="left">SFC Active OAM</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
          </tbody>
        </table>
      </section>

        <section anchor="iana-sfc-active-oam-parameters" numbered="true" toc="default">
        <name>SFC Active OAM</name>
        <t>
IANA is requested to create an SFC has created the "Service Function Chaining (SFC) Active OAM registry containing Operations, Administration, and Maintenance (OAM)" group of registries, which contains the sub-registries listed below. registries described in the following subsections.
       </t>

       <section anchor="iana-sfc-oam-msg-type" numbered="true" toc="default">
        <name>SFC Active OAM Message Type</name> Types</name>
        <t>
    IANA is requested to create in has created the SFC "SFC Active OAM Message Types" registry a sub-registry as follows:
    </t>
                    <ul empty="true"
    <dl newline="false" spacing="normal">
        <li>Sub-registry Name: SFC
    <dt>Registry Name:</dt> <dd>SFC Active OAM Message Type.</li>
        <li>Assignment Policy:</li>
        <li>2-31 IETF Review</li>
        <li>32-62   First Types</dd></dl>
    <dl newline="true" spacing="normal">
      <dt>Assignment Policy:</dt>
      <dd><dl newline="false" spacing="compact">
	  <dt>0 - 31</dt> <dd>IETF Review</dd>
          <dt>32 - 62</dt>   <dd>First Come First Served</li>
        <li>Reference: [this document]</li>
        </ul> Served</dd>
    </dl></dd></dl>
    <dl newline="false" spacing="normal">
      <dt>Reference:</dt> <dd>RFC 9516</dd>
    </dl>

        <table anchor="iana-sfc-header-type-tbl" align="center">
          <name>SFC Active OAM Message Type</name> Types</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="center">Description</th> align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
              <tr>
              <td align="left">1</td>
              <td align="center">SFC align="left">SFC Echo Request/Echo Reply</td> Request/Reply</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">2 - 31</td>
              <td align="center">Unassigned</td>
              <td align="left">This document</td>
            </tr>
            <tr> 62</td>
              <td align="left">32-62</td> align="left">Unassigned</td>
              <td align="center">Unassigned</td>
              <td align="left">This document</td> align="left"></td>
            </tr>

            <tr>
              <td align="left">63</td>
              <td align="center">Reserved</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>

      </section>
<!--
             <section anchor="iana-sfc-oam-flags" numbered="true" toc="default">
        <name>SFC Active OAM Header Flags</name>
        <t>
    IANA is requested to create in the SFC Active OAM Registry the sub-registry SFC Active OAM Flags.
        </t>
        <t>
           This sub-registry tracks the assignment of 8 flags in the Flags
   field of the SFC Active OAM Header.  The flags are
   numbered from 0 (most significant bit, transmitted first) to 7.
</t>
<t>
   New entries are assigned by Standards Action.
</t>
      <table anchor="iana-sfc-active-oam-flags-tbl" align="center">
          <name>SFC Active OAM Header Flags</name>
          <thead>
            <tr>
              <th align="left">Bit Number</th>
              <th align="center">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">7-0</td>
              <td align="center">Unassigned</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
          </tbody>
        </table>
      </section>
      -->
      </section>

      <section anchor="iana-echo-ping-parameters" numbered="true" toc="default">
        <name>SFC Echo Request/Echo Reply Parameters</name>
        <t>
  IANA is requested to create in the SFC Active OAM Registry the sub-registry SFC Echo Request/Echo Reply Parameters.
        </t>
           <section anchor="iana-echo-ping-global-flags" numbered="true" toc="default">
        <name>SFC Echo Request Flags</name>
        <t>
    IANA is requested to create in the SFC Echo Request/Echo Reply
Parameters has created the SFC "SFC Echo Request Flags sub-registry.
        </t>
        <t>
           This sub-registry tracks Flags" registry to track the assignment of the 16 flags in the SFC Echo Request Flags
   field of the SFC Echo Request message. The flags are
   numbered from 0 (most (the most significant bit, bit is transmitted first) to 15.
</t>
<t>
   New entries are assigned by Standards Action.
</t>
</t><t>IANA has created the "SFC Echo Request Flags" registry as follows:</t>
<dl><dt>Registry Name:</dt><dd>SFC Echo Request Flags</dd></dl>
<dl newline="true"><dt>Assignment Policy:</dt><dd>
<dl spacing="compact"><dt>0 - 15</dt><dd>Standards Action</dd></dl></dd>
<dt>Reference:</dt><dd>RFC 9516</dd>
</dl>

      <table anchor="iana-sfc-global-flags-tbl" align="center">
          <name>SFC Echo Request Flags</name>
          <thead>
            <tr>
              <th align="left">Bit Number</th>
              <th align="center">Description</th> align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">15-0</td> align="left">0 - 15</td>
              <td align="center">Unassigned</td> align="left">Unassigned</td>
              <td align="left">This document</td> align="left"></td>
            </tr>
          </tbody>
        </table>
      </section>

      <section anchor="iana-sfc-echo-message-type" numbered="true" toc="default">
        <name>SFC Echo Types</name>
          <t>
    IANA is requested to create in the SFC Echo Request/Echo Reply
Parameters has created the SFC "SFC Echo Types sub-registry Types" registry as follows:
    </t>
        <ul empty="true"
        <dl newline="false" spacing="normal">
        <li>Sub-registry Name: SFC
        <dt>Registry Name:</dt> <dd>SFC Echo Types</li>
        <li>Assignment Policy:</li>
        <li>5 Types</dd></dl>
	<dl newline="true" spacing="normal">
	  <dt>Assignment Policy:</dt>
	  <dd><dl newline="false" spacing="compact">
        <dt>0 - 175  IETF Review</li>
        <li>176 175</dt>  <dd>IETF Review</dd>
        <dt>176 - 239   First 239</dt>   <dd>First Come First Served</li>
        <!--
        <li>240 - 251   Experimental</li>
        <li>252 Served</dd>
	<dt>240 - 254   Private Use</li>
        -->
        <li>Reference: [this document]</li>
        </ul> 251</dt>   <dd>Experimental Use</dd>
	<dt>252 - 254</dt>   <dd>Private Use</dd></dl></dd>
</dl>
	<dl newline="false" spacing="normal">
        <dt>Reference:</dt> <dd>RFC 9516</dd>
        </dl>

        <table anchor="iana-sfc-msg-type-tbl" align="center">
          <name>SFC Echo Types</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="center">Description</th> align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
             <tr>
              <td align="left">1</td>
              <td align="center">SFC align="left">SFC Echo Request</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">2</td>
              <td align="center">SFC align="left">SFC Echo Reply</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">3</td>
              <td align="center">SFP align="left">SFP Consistency Verification Request</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">4</td>
              <td align="center">SFP align="left">SFP Consistency Verification Reply</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>

            <tr>
              <td align="left">5 - 175</td>
              <td align="center">Unassigned</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">176 - 239</td>
              <td align="center">Unassigned</td> align="left">Unassigned</td>
              <td align="left">This document</td> align="left"></td>
            </tr>
            <tr>
              <td align="left">240 - 251</td>
              <td align="center">Experimental</td> align="left">Reserved for Experimental Use</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">252 - 254</td>
              <td align="center">Private align="left">Reserved for Private Use</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">255</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
          </tbody>
        </table>
      </section>

      <section anchor="iana-sfc-ping-reply-mode" numbered="true" toc="default">
        <name>SFC Echo Reply Modes</name>
          <t>
    IANA is requested to create in has created the SFC "SFC Echo Request/Echo Reply
Parameters Modes" registry the new sub-registry as follows:
    </t>
        <ul empty="true"
        <dl newline="false" spacing="normal">
        <li>Sub-registry Name: SFC
        <dt>Registry Name:</dt> <dd>SFC Echo Reply Mode</li>
        <li>Assignment Policy:</li>
        <li>8 Modes</dd></dl>
        <dl newline="true" spacing="normal">
	  <dt>Assignment Policy:</dt>
	  <dd><dl newline="false" spacing="compact">
        <dt>0 - 175  IETF Review</li>
        <li>176 175</dt>  <dd>IETF Review</dd>
        <dt>176 - 239   First 239</dt>   <dd>First Come First Served</li>
       <!--
        <li>240 Served</dd>
        <dt>240 - 251   Experimental</li>
        <li>252 - 254   Private Use</li>
        -->
        <li>Reference: [this document]</li>
        </ul> 251</dt>   <dd>Experimental Use</dd>
        <dt>252 - 254</dt>   <dd>Private Use</dd>
      </dl></dd></dl>
       <dl newline="false" spacing="normal">
        <dt>Reference:</dt> <dd>RFC 9516</dd>
        </dl>

        <table anchor="iana-sfc-reply-modes-tbl" align="center">
          <name>SFC Echo Reply Modes</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="center">Description</th> align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">1</td>
              <td align="center">Do align="left">Do Not Reply</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">2</td>
              <td align="center">Reply align="left">Reply via an IPv4/IPv6 UDP Packet</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">3</td>
              <td align="center">Unassigned</td> align="left">Unassigned</td>
              <td align="left">This&nbsp;document</td> align="left"></td>
            </tr>
            <tr>
              <td align="left">4</td>
              <td align="center">Reply align="left">Reply via Specified Path</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">5</td>
              <td align="center">Reply align="left">Reply via an IPv4/IPv6 UDP Packet with the data integrity protection</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">6</td>
              <td align="center">Unassigned</td> align="left">Unassigned</td>
              <td align="left">This&nbsp;document</td> align="left"></td>
            </tr>
            <tr>
              <td align="left">7</td>
              <td align="center">Reply align="left">Reply via Specified Path with the data integrity protection</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>

            <tr>
              <td align="left">8 - 175</td>
              <td align="center">Unassigned</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">176 - 239</td>
              <td align="center">Unassigned</td> align="left">Unassigned</td>
              <td align="left">This document</td> align="left"></td>
            </tr>
            <tr>
              <td align="left">240 - 251</td>
              <td align="center">Experiemntal</td> align="left">Reserved for Experimental Use</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">252 - 254</td>
              <td align="center">Private align="left">Reserved for Private Use</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">255</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
          </tbody>
        </table>
      </section>

      <section anchor="iana-sfc-ping-return-codes" numbered="true" toc="default">
        <name>SFC Echo Return Codes</name>
   <t>
    IANA is requested to create in has created the SFC "SFC Echo Request/Echo Reply
Parameters Return Codes" registry the new sub-registry as follows:
    </t>
        <ul empty="true"
        <dl newline="false" spacing="normal">
        <li>Sub-registry Name: SFC
          <dt>Registry Name:</dt> <dd>SFC Echo Return Codes</li>
        <li>Assignment Policy:</li>
        <li>9 Codes</dd></dl>
	  <dl newline="true" spacing="normal">
            <dt>Assignment Policy:</dt>
	    <dd><dl newline="false" spacing="compact">
        <dt>0 - 191  IETF Review</li>
        <li>192 191</dt>  <dd>IETF Review</dd>
        <dt>192 - 251   First 251</dt>   <dd>First Come First Served</li>
        <!-- <li>252 Served</dd>
        <dt>252 - 254   Private Use</li> -->
        <li>Reference: [this document]</li>
        </ul> 254</dt>   <dd>Private Use</dd>
      </dl></dd></dl>
      <dl newline="false" spacing="normal">
        <dt>Reference:</dt> <dd>RFC 9516</dd>
        </dl>

        <table anchor="iana-sfc-ping-return-codes-tbl" align="center">
          <name>SFC Echo Return Codes</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="center">Description</th> align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="center">No align="left">No Error</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
                     <tr>
              <td align="left">1</td>
              <td align="center">Malformed align="left">Malformed Echo Request received</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">2</td>
              <td align="center">One align="left">One or more of the TLVs was not understood</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">3</td>
              <td align="center">Authentication align="left">Authentication failed</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
                        <tr>
              <td align="left">4</td>
              <td align="center">SFC align="left">SFC TTL Exceeded</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
                        <tr>
              <td align="left">5</td>
              <td align="center">End align="left">End of the SFP</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">6&nbsp;</td> align="left">6</td>
              <td align="left">Reply Service Function Path TLV is missing&nbsp;</td> missing</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">7&nbsp;</td> align="left">7</td>
              <td align="left">Reply SFP was not found&nbsp;</td> found</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">8&nbsp;</td> align="left">8</td>
              <td align="left">Unverifiable Reply Service Function Path&nbsp;</td> Path</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>

            <tr>
              <td align="left">9 -191</td>
              <td align="center">Unassigned</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">192-251</td> - 251</td>
              <td align="center">Unassigned</td> align="left">Unassigned</td>
              <td align="left">This document</td> align="left"></td>
            </tr>
            <tr>
              <td align="left">252-254</td> align="left">252 - 254</td>
              <td align="center">Private align="left">Reserved for Private Use</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">255</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
          </tbody>
        </table>

      </section>
      </section>

       <section anchor="iana-sfc-active-oam-tlv" numbered="true" toc="default">
        <name>SFC Active OAM TLV Type</name> Types</name>
           <t>
    IANA is requested to create in the in has created the SFC "SFC Active OAM Registry the sub-registry TLV Types" registry as follows:
    </t>
        <ul empty="true"
        <dl newline="false" spacing="normal">
        <li>Registry Name: SFC
        <dt>Registry Name:</dt> <dd>SFC Active OAM TLV Type</li>
        <li>Assignment Policy:</li>
        <li>6 -175  IETF Review</li>
        <li>176 Types</dd></dl>
	<dl newline="true" spacing="normal">
	  <dt>Assignment Policy:</dt>
	  <dd><dl newline="false" spacing="compact">
        <dt>0 - 239   First 175</dt>  <dd>IETF Review</dd>
        <dt>176 - 239</dt>   <dd>First Come First Served</li>
        <!--
        <li>240 Served</dd>
        <dt>240 - 251  Experimental</li>
        <li>252 - 254   Private Use</li>
        -->
        <li>Reference: [this document]</li>
        </ul> 251</dt>   <dd>Experimental Use</dd>
        <dt>252 - 254</dt>   <dd>Private Use</dd></dl></dd></dl>
	<dl newline="false" spacing="normal">
        <dt>Reference:</dt> <dd>RFC 9516</dd>
        </dl>

        <table anchor="iana-sfc-active-oam-type-tbl" align="center">
          <name>SFC Active OAM TLV Type Registry</name> Types</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="center">Description</th> align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
              <tr>
              <td align="left">1</td>
              <td align="center">Source align="left">Source ID TLV</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">2</td>
              <td align="center">Errored align="left">Errored TLVs</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
                       <tr>
              <td align="left">3&nbsp;</td> align="left">3</td>
              <td align="left">Reply Service Function Path Type&nbsp;</td> Type</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
              <tr>
              <td align="left">4</td>
              <td align="center">SFF align="left">SFF Information Record Type</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
              <tr>
              <td align="left">5</td>
              <td align="center">SF align="left">SF Information</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">6 - 175</td>
              <td align="center">Unassigned</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">176 - 239</td>
              <td align="center">Unassigned</td> align="left">Unassigned</td>
              <td align="left">This document</td> align="left"></td>
            </tr>
            <tr>
              <td align="left">240 - 251</td>
              <td align="center">Experimental</td> align="left">Reserved for Experimental Use</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">252 - 254</td>
              <td align="center">Private align="left">Reserved for Private Use</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">255</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
          </tbody>
        </table>

      </section>

        <section anchor="coam-sf-id-type-sec" numbered="true" toc="default">
          <name>SF Identifier Types</name>
                   <t>
    IANA is requested to create in the SF Types registry <xref target="RFC9263"/> has created the sub-registry "SF Identifier Types" as follows:
    </t>
        <ul empty="true"
        <dl newline="false" spacing="normal">
        <li>Registry Name: SF
          <dt>Registry Name:</dt> <dd>SF Identifier Types</li>
        <li>Assignment Policy:</li>
        <li>4 -191  IETF Review</li>
        <li>192 Types</dd>
	</dl>
	  <dl newline="true" spacing="normal">
            <dt>Assignment Policy:</dt>
	    <dd><dl newline="false" spacing="compact">
        <dt>0 - 251  First 191</dt>  <dd>IETF Review</dd>
        <dt>192 - 251</dt> <dd>First Come First Served</li>
       <!-- <li>252 Served</dd>
        <dt>252 - 254   Private Use</li> -->
        <li>Reference: [this document]</li>
        </ul> 254</dt> <dd>Private Use</dd>
</dl></dd></dl>
	<dl newline="false" spacing="normal">
        <dt>Reference:</dt> <dd>RFC 9516</dd>
        </dl>
        <table anchor="iana-sf-id-type-tbl" align="center">
          <name>SF Identifier Type</name> Types</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="center">Description</th> align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">1</td>
              <td align="center">IPv4</td> align="left">IPv4</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">2</td>
              <td align="center">IPv6</td> align="left">IPv6</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">3</td>
              <td align="center">MAC</td> align="left">MAC</td>
              <td align="left">This&nbsp;document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">4 -191</td>
              <td align="center">Unassigned</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">192-251</td> - 251</td>
              <td align="center">Unassigned</td> align="left">Unassigned</td>
              <td align="left">This document</td> align="left"></td>
            </tr>
            <tr>
              <td align="left">252-254</td> align="left">252 - 254</td>
              <td align="center">Private align="left">Reserved for Private Use</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
            <tr>
              <td align="left">255</td>
              <td align="center">Reserved</td> align="left">Reserved</td>
              <td align="left">This document</td> align="left">RFC 9516</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
  </section>

  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8300.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8300.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-sfc-oam-packet.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9451.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9145.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9145.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9015.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9015.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7665.xml"/>
        <!-- <?rfc include="reference.RFC.2104"?> --> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7665.xml"/>

</references>
      <references>
        <name>Informative References</name>

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7110.xml"/>

<!-- href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7110.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/> --> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.0792.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0792.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7799.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7799.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4443.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4443.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8029.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8029.xml"/>
        <!-- <?rfc include="reference.RFC.1423"?>  --> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4302.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4302.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4303.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4303.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8924.xml"/>
        <!-- <?rfc include="reference.RFC.4868"?> --> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8924.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9263.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9263.xml"/>
	<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7555.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7555.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6437.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6437.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8595.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8595.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5706.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5706.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4086.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4086.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5880.xml"/> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5880.xml"/>
      </references>
    </references>

    <section numbered="false" toc="default">
      <name>Acknowledgments</name>
      <t>
         The authors greatly appreciate the thorough review and the most helpful comments from <contact fullname="Dan Wing"/>, <contact fullname="Dirk von Hugo"/>,
        <contact fullname="Mohamed Boucadair"/>, <contact fullname="Donald Eastlake 3rd"/>, <contact fullname="Carlos Pignataro"/>, and <contact fullname="Frank Brockners"/>. The authors are thankful to <contact fullname="John Drake"/> for his review
        and the reference to the work on BGP control plane for NSH SFC.
	 The authors express their appreciation to <contact fullname="Joel M. Halpern"/> for his suggestion about the load-balancing scenario.
	 The authors greatly appreciate the thoroughness of comments and thoughtful suggestions by <contact fullname="Darren Dukes"/> that significantly improved the document.
      </t>
    </section>

     <section anchor="contr-sec" numbered="false" toc="default">
        <name>Contributors' Addresses</name>
        <name>Contributors</name>

       <contact initials="C" surname="Wang" fullname="Cui Wang">
      <organization>Individual contributor</organization>
      <address>
     <email>lindawangjoy@gmail.com</email>
      </address>
    </contact>
    <!--
       <contact initials="B" surname="Khasnabish" fullname="Bhumip Khasnabish">
      <organization>Individual contributor</organization>
      <address>
        <email>vumip1@gmail.com</email>
      </address>
    </contact>
    -->
    <contact fullname="Zhonghua Chen" initials="Z." surname="Chen">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>No.1835, South PuDong Road</street>
          <city>Shanghai</city>
          <region>
</region>
          <code>201203</code>
          <country>China</country>
        </postal>
        <phone>+86 18918588897</phone>
        <email>chenzhongh@chinatelecom.cn</email>
      </address>
    </contact>

        </section>

      </back>
</rfc>