﻿<?xml version="1.0" encoding="UTF-8" ?>
<!--<!DOCTYPE rfc SYSTEM "rfc4748.dtd"> -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc category="std" ipr="trust200902"  docName="draft-wang-sfc-multi-layer-oam-08">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

    <front>
      <title abbrev="Multi-Layer OAM for SFC">Multi-Layer OAM for Service Function Chains in Networks </title>   

	<author initials='G.' surname="Mirsky" fullname='Greg Mirsky'>
		<organization>ZTE Corp.</organization>
		<address>
			<email>gregimirsky@gmail.com</email>
		</address> 
	</author>

     <author initials="W" surname="Meng" fullname="Wei Meng">
      <organization>ZTE Corporation</organization>
      <address>
       <postal>
        <street>No.50 Software Avenue, Yuhuatai District</street>
      <region>Nanjing</region>
      <country>China</country>
      </postal>
    <email>meng.wei2@zte.com.cn,vally.meng@gmail.com</email>
      </address>
    </author>

        <author initials="B" surname="Khasnabish" fullname="Bhumip Khasnabish"> 
      <organization>ZTE TX, Inc.</organization>                              
      <address>                                                              
	   <postal>                                                                
	   <street>55 Madison Avenue, Suite 160</street>                           
	  <region>Morristown, New Jersey  07960</region>                           
	  <country>USA</country>                                                   
	  </postal>                                                                
	<email>bhumip.khasnabish@ztetx.com</email>                                 
      </address>                                                             
    </author>                                                                

     <author initials="C" surname="Wang" fullname="Cui Wang">
      <organization></organization>
      <address>
<!--
	<postal>
        <street>No.50 Software Avenue, Yuhuatai District</street>
      <region>Nanjing</region>
      <country>China</country>
      </postal>
-->
     <email>lindawangjoy@gmail.com</email>
      </address>
    </author>
   
    <date day="12" month="June" year="2017" />
   
    <area>Routing</area>
    <workgroup>SFC WG</workgroup>
   
    <keyword>Request for Comments</keyword>
    <keyword>RFC</keyword>
    <keyword>Internet Draft</keyword>
    <keyword>I-D</keyword>

    <abstract>
    <t>
A multi-layer approach to the task of Operation, Administration 
and Maintenance (OAM) of Service Function Chains (SFCs) in networks is presented.  
Based on the SFC OAM requirements, a multi-layer model is introduced.  
A mechanism to detect and localize defects using the multi-layer model 
is also described.
    </t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction">
     <t>
     <xref target="RFC7665"/> defines components necessary to implement 
     Service Function Chain (SFC). These include a classifier 
     which performs classification of incoming packets. A Service Function Forwarder (SFF) 
     is responsible for forwarding traffic to one or more connected Service Functions (SFs) according to 
     the information carried in the SFC encapsulation. SFF also handles traffic coming back from 
     the SF and transports the data packets to the next SFF. And the SFF serves as termination
     element of the Service Function Path (SFP). SF is responsible for specific treatment 
     of received packets.
     </t>
     
     <t>
     Resulting from that SFC is constructed by a number of these components,
     there are different views from different levels of the SFC.
     One is the SFC, fully abstract entity, that defines an ordered set of SFs that must 
     be applied to packets selected as a result of classification. 
     But SFC doesn't define exact mapping between SFFs and SFs. Thus there exists another  
     semi-abstract entity referred as SFP. SFP is
     the instantiation of the SFC in the network and provides a level of indirection 
     between the fully abstract SFC and a fully specified ordered 
     list of SFFs and SFs identities that the packet will visit when
     it traverses the SFC. The latter entity is being referred as Rendered Service Path (RSP).
     The main difference between SFP and RSP is that in the former the authority to 
     select the SFF/SF has been delegated to the network.
     </t>
     
     <t>
	   This document proposes the multi-layer model of SFC Operation, Administration
	   and Maintenance (OAM) and requirements to improve the troubleshooting efficiency.   
     </t>
   </section>

   <section anchor="sec:terminology" title="Conventions">
        <section title="Requirements Language">
        <t>
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
   NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
   "MAY", and "OPTIONAL" in this document are to be interpreted as
   described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
   when, and only when, they appear in all capitals, as shown here.
    </t>
</section>
    
         <section title="Terminology">
         <t>
         Unless explicitly specified in this document, active OAM in SFC and SFC OAM
         are being used interchangeably.
         </t>
          <t>e2e:       End-to-End</t>
          <t>FM:        Fault Management</t>
          <t>OAM:       Operations, Administration, and Maintenance</t>
          <t>RDI:       Remote Defect Indication</t>
          <t>RSP:       Rendered Service Path</t>
          <t>SF:        Service Function</t>
          <t>SFC:       Service Function Chain</t>
          <t>SFF:       Service Function Forwarder</t>
          <t>SFP:       Service Function Path</t>
    </section>
   </section>

   <section anchor="sec:pd-pmip" title="Multi-layer Model of SFC OAM">
 
      <t>
      As described in <xref target="I-D.ietf-sfc-oam-framework"/>, multiple 
      layers come into play to realize the SFC, 
      including the Service layer, the underlying Network layer, as well as the Link layer, 
      which are depicted in <xref target="fig1"/>:
      <list style="symbols">      
      <t>The Service layer consists of classifiers and/or service functions/SFs. </t>
      <t>Network and Transport layers leverage various overlay network technologies 
      interconnecting SFs to establish SFP.</t>
      <t>The Link layer is technology specific and reflects the technology used in 
      the underlay network.</t>
      </list>
      </t>
      
    <figure anchor="fig1" title="SFC OAM Multi-Layer model">
         <artwork><![CDATA[
         
                   +---+  +---+   +---+  +---+     +---+
                   |SF1|  |SF2|   |SF3|  |SF4|     |SF5|
                   +---+  +---+   +---+  +---+     +---+
                      \    /          \  /           |     
   +----------+       +----+         +----+        +----+    
   |Classifier|-------|SFF1|---------|SFF2|--------|SFF3|
   +----------+       +----+         +----+        +----+         
       0---------------------------------------------0  Service layer 
       0----------------0--------------0-------------0  Network layer
       0-------------0------0-------0------0---------0  Link layer      
 
       ]]></artwork></figure>
       
   </section>
   
   
   <section title="Requirements for SFC OAM Multi-layer Model">
     
     <t>
     To perfrom the OAM task of fault management (FM) in an SFC, that inculdes failure detection, defect
     characterzation and localization, this document defines the
     multi-layer model of OAM, presented in <xref target="sec:pd-pmip"/>, and set of requirements
     towards active OAM mechanisms to be used on an SFC.
     </t>
     
     <t>
     In example presented in <xref target="fig1"/> the service SFP1 may be realized
     through two RSPs, RSP1(SF1--SF3--SF5) and RSP2(SF2--SF4--SF6). To perform
     end-to-end (e2e) FM SFC OAM:
     <list>
     <t>
     REQ#1:  Packets of active OAM in SFC SHOULD be fate sharing with data traffic,
            i.e. in-band with the monitored traffic, i.e. follow exactly
            the same RSP, in forward direction, i.e. from ingress toward egress end
            point(s) of the OAM test.
     </t>
     <t>
     REQ#2:  SFC OAM MUST support pro-active monitoring of any element in the SFC
            availability.
     </t>
     </list>
     </t>
     <t>
     The egress, SFF3 in example in <xref target="fig1"/>,
     is the entity that detects the failure of the SFC. It must
     be able to signal the new defect state to the ingress, i.e. SFF1.
     Hence the following requirement:
     <list>
     <t>
     REQ#3: SFC OAM MUST support Remote Defect Indication (RDI)
            notification by egress to the ingress, i.e. source of
            continuity checking.
     </t>
     <t>
     REQ#4: SFC OAM MUST support connectivity verification.
            Definition of mis-connectivity defect entry and exit
            criteria are outside the scope of this document.
     </t>
     </list>
     </t>
     
     <t>
     Once the SFF1 detects the defect objective of OAM switches from failure detection
     to defect characterization and localization.
     <list>
     <t>
     REQ#5: SFC OAM MUST support fault localization of Loss of
            Continuity check in the SFC.
     </t>
     <t>
     REQ#6: SFC OAM MUST support tracing an SFP in order to realize the RSP.
     </t>
     </list>
     </t>
     
     <t>
     It is practical, as presented in <xref target="fig1"/>, that several SFs share the same SFF.  
     In such case SFP1 may be realized over two RSPs, RSP1(SF1--SF3--SF5) and RSP2(SF2--SF4--SF6). 
     </t>

     <t>
     <list>
     <t>
     REQ#7: SFC OAM MUST have the ability to discover and exercise
            all available RSPs in the transport network.
     </t>
     </list>
     </t>
     <t>
     In process of localizing the SFC failure separating SFC OAM layers is very attractive and efficient approach.
     To achieve that continuity among SFFs that are part of the same SFP should be verified. Once SFFs reacheability
     along the particular SFP has been confirmed task of defect localization may focus on SF reacheability verification.
     Because reacheability of SFFs has already been verified, SFF local to the SF may be used as source.
     <list>
     <t>
     REQ#8: SFC OAM MUST be able to trigger on-demand FM with
            responses being directed towards initiator of such proxy
            request.
     </t>
     </list>
     </t>
             
      <t> 
      By using the multi-layer model OAM that confirms to the above listed requirements is capable to
      perform efficient defect localization on an SFC.
      </t> 
    </section>


<section title="SFC OAM multi-layer model">
     <t>
     <xref target="fig3"/> presents a use case of applying the proposed SFC OAM multi-layer model.  
     In this scenario operator needs to discover SFFs and SFs of the same SFC. 
     The Layer 1 includes the SFFs that are part of the SFP. The Layer 2 - the SFs along the RSP. 
     When trying to do SFC OAM, classifier or service nodes select and 
     confirm which SFC OAM layering they plan to do, 
     then encapsulate the layering information in the SFC OAM packets, and 
     send the SFC OAM packets along the service function paths 
     to the destination. When receiving the SFC OAM packets, service nodes 
     analyze the layering information and then decide 
     whether sending these packets to next SFFs directly without being processed 
     by SFs for Layer 1 process or sending to SFs for Layer 2 process.
     </t>
     
     <figure anchor="fig3" title="SFC OAM multi-layering model">
         <artwork><![CDATA[
         
         +---+ +---+  +----+ +----+  +-----+ +-----+  +------+ +------+
         |SF1|.|SFn|  |SF1'|.|SFn'|  |SF1''|.|SFn''|  |SF1'''|.|SFn'''|
         +---+ +---+  +----+ +----+  +-----+ +-----+  +------+ +------+
             \   /        \   /  |      \     /           \    /   |   
 +------+   +----+       +----+  |      +-----+           +-----+  |      
 |Class.|---|SFF1|  ...  |SFFn|  |      |SFF1'|   ...     |SFFn'|  |       
 +------+   +----+       +----+  |      +-----+           +-----+  |      
                            |    |                            |    |              
                            |    |                            |    |         
                            |----|------Layer 1---------------|    |
                                 |                                 |   
                                 |-------------Layer 2-------------|     
                                                                                                                        
 
      ]]></artwork></figure>     
    </section>

   <section anchor="theory-operation" title="Theory of Operation">
   
   <t>
   Echo Request/Reply is well-known OAM mechanism that is extecively used  to detect inconsitencies between states in control plane
   and data plane, localize defects in the data plane. In SFC OAM Echo Request/Reply is built as extension of Overlay
   Echo Request/Reply functions <xref target="I-D.ooamdt-rtgwg-demand-cc-cv"/>.
   </t>
   
     <t>
     Responder to the SFC Echo Request sends the Echo Reply over IP network if the reply mode is 
     Reply via an IPv4/IPv6 UDP Packet <xref target="I-D.ooamdt-rtgwg-demand-cc-cv"/>.
     Because SFC NSH does not identify the ingress of the SFP
     the Echo Request MUST include this information that to be used as IP destination address for IP/UDP encapsulation of the SFC Echo Reply.
     Sender of the SFC Echo Request MUST include SFC Source TLV <xref target="sfc-source-tlv-fig"/>. 
     </t>
     <t>
          <figure align="left" anchor="sfc-source-tlv-fig"
                title="Segment Routing Static MPLS Tunnel sub-TLV">
          <artwork><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |   SFC OAM Source ID Type    |           Length              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                           Value                             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
        </figure>
        where
        <list>
        <t>
        SFC OAM Source Id Type is two octets in length and has the value of TBD1 <xref target="iana-sfc-tlv"/>.
        </t>
        <t>
        Length is two octets long field and the valuse is equal to the length of the Value field.</t>
        <t>
        Value field contains IP address of the sender of the SFC OAM control message, IPv4 or IPv6.</t>
        </list>
            </t> 
    <t>
     The UDP destination port for SFC Echo Reply
     TBD2 will be allocated by IANA <xref target="iana-sfc-udp-port"/>.
     </t>
   </section>


   <section anchor="sec:security" title="Security Considerations">
    <t>
TBD
</t>
   </section>

   <section anchor="iana-considerations" title="IANA Considerations">
   
   <section anchor="iana-sfc-tlv" title="SFC TLV Type">
   <t>
   IANA is requested to create SFC OAM TLV Type registry.
    All code points in the range 1 through 32759 in this registry shall be allocated
    according to the "IETF Review" procedure as specified in <xref target="RFC5226"/>.
    Code points in the range
     32760 through 65279 in this registry shall be allocated according to the "First Come First Served" procedure as
     specified in <xref target="RFC5226"/>.
    Remaining code points are allocated according to the <xref target="iana-sfc-type-tbl"/>:
   </t>
       <texttable anchor="iana-sfc-type-tbl" title="SFC TLV Type Registry">
    <ttcol align='left'>Value</ttcol>
    <ttcol align='center'>Description</ttcol>
    <ttcol align='left'>Reference</ttcol>
     <c>0</c>
    <c>Reserved</c>
    <c>This document</c>
     <c>1- 32759</c>
    <c>Unassigned</c>
    <c>IETF Review</c>
     <c>32760 - 65279</c>
    <c>Unassigned</c>
    <c>First Come First Served</c>
     <c>65280 - 65519</c>
    <c>Experimental</c>
    <c>This document</c>
     <c>65520 - 65534</c>
    <c>Private Use</c>
    <c>This document</c>
         <c>65535</c>
    <c>Reserved</c>
    <c>This document</c>
   </texttable> 
   
<t>     This document defines the following new value in SFC OAM TLV Type registry:</t>
     <texttable anchor="sfc-ip-src-type" title="SFC OAM  Source IP Address Type">
    <ttcol align='left'>Value</ttcol>
    <ttcol align='center'>Description</ttcol>
    <ttcol align='left'>Reference</ttcol>
    <c>TBD1</c>
    <c>Source IP Address</c>
    <c>This&nbsp;document</c>
    </texttable>
   </section>
   
   <section anchor="iana-sfc-udp-port" title="SFC OAM UDP Port">
    <t>
    IANA is requested to allocate UDP port number according to 
    </t>
     <texttable anchor="sfc-oam-port-alloc" title="SFC OAM Port">
    <ttcol align='left'>Service&nbsp;Name&nbsp;</ttcol>
    <ttcol align='left'>Port&nbsp;Number&nbsp;</ttcol>
    <ttcol align='left'>Transport&nbsp;Protocol&nbsp;</ttcol>
    <ttcol align='left'>Description&nbsp;</ttcol>
    <ttcol align='left'>Semantics&nbsp;Definition&nbsp;</ttcol>
    <ttcol align='left'>Reference&nbsp;</ttcol>
    <c>SFC OAM</c>
    <c>TBD2</c>
    <c>UDP</c>
    <c>SFC OAM</c>
    <c><xref target="theory-operation"/></c>
    <c>This&nbsp;document</c>
    </texttable>
    </section>
    
   </section>

</middle>

<back>
<references title='Normative References'>
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.8174"?>
      <?rfc include="reference.I-D.ooamdt-rtgwg-demand-cc-cv"?>
</references>

<references title='Informative References'>
      <?rfc include="reference.RFC.7665"?>
<!--      <?rfc include='reference.RFC.7498'?> -->
      <?rfc include="reference.I-D.ietf-sfc-oam-framework"?>
      <?rfc include="reference.RFC.5226"?>
</references>
</back>
</rfc>