<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="no" ?>
<?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"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC7665 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7665.xml">
]>

<rfc category="std" docName="draft-farrel-sfc-convent-01" ipr="trust200902">
  <front>
    <title abbrev="NSH With No Data">Operating the Network Service Header (NSH) with Next Protocol "None"</title>

    <author fullname="Adrian Farrel" initials="A." surname="Farrel">
      <organization>Juniper Networks</organization>
      <address>
        <email>afarrel@juniper.net</email>
      </address>
    </author>

    <author fullname="Lucy Yong" initials="L." surname="Yong">
      <organization>Huawei USA</organization>
      <address>
        <postal>
            <street>5340 Legacy Dr.</street>
            <city>Plano</city>
            <region>TX</region>
            <country>US</country>
            <code>75024</code>
        </postal>
        <phone>+1 858 6511 4478</phone>
        <email>lucy.yong@huawei.com</email>
      </address>
    </author>

    <author fullname="John Drake" initials="J." surname="Drake">
      <organization>Juniper Networks</organization>
      <address>
        <email>jdrake@juniper.net</email>
      </address>
    </author>

    <date year="2017" />
    <area>Routing</area>
    <workgroup>SFC Working Group</workgroup>
    <keyword>Service Function Chaining</keyword>
    <keyword>Network Service Header</keyword>

    <abstract>

      <t>This document describes the use of the Network Service Header (NSH) in a Service
         Function Chaining (SFC) enabled network with no payload data and only carrying
         metadata.  This is achieved by defining a new NSH "Next Protocol" type value of
         "None".</t>

      <t>This document illustrates some of the functions that may be achieved or enhanced by
         this mechanism, but it does not provide an exhaustive list of use cases, nor is it
         intended to be definitive about the functions it describes.  It is expected that
         other documents will describe specific use cases in more detail and will define the
         protocol mechanics for each use case.</t>

    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref target="RFC2119"/>.</t>
    </note>
</front>

<middle>

  <!-- === Introduction === -->
  <section anchor="introduction" title="Introduction">

    <t>An architecture for Service Function Chaining (SFC) is presented in <xref target="RFC7665" />.
       That architecture enables packets to be forwarded along Service Function Paths (SFPs) to
       pass through various Service Functions (SFs) that act on the packets.  This is achieved by
       tunnelling the packets to transport them between Service Function Instances (SFIs), and inserting
       a Network Service Header (NSH) <xref target="I-D.ietf-sfc-nsh" />  into each packet to identify
       the SFP that the packet travels along (by means of a Service Path Identifier - SPI) and the hop
       (i.e., the next SF to be executed) along the SFP that the packet has reached (by means of a Service
       Index - SI).  The SPI and SI are fields encoded in the NSH.</t>

    <t>Packets are classified at the SFC ingress boundaries (section 4.4 of <xref target="RFC7665" />)
       and have an NSH applied to them.  Such packets are forwarded between Service Function Forwarders
       (SFFs) and each SFF may hand the packet off to one or more Service Function Instances (SFIs)
       according to the definition of the SFP.</t>

    <t>The SFC classifier or SFC-aware SFIs may wish to share information (possibly state information)
       about the SFP, the traffic flow, or a specific packet, and they may do this by adding "metadata"
       to packets as part of the NSH.  Metadata may be used to enhance or enable the function preformed
       by SFC-aware SFs, may enable coordination and data exchange between SFIs, or may be used to assist
       a network operator in the diagnosis and monitoring of an SFP.  The nature of metadata to be supplied
       and consumed is implementation- and deployment-specific.</t>

    <t>This document defines a mechanism for metadata to be carried on an SFP without the need for payload
       data.  This may enable diagnosis and monitoring of SFPs, and coordination between SFC-aware SFIs,
       without the need for traffic to be flowing, and without the need to rewrite data packets to insert
       what might be substantial amounts of metadata.</t>

    <t>This function is achieved by defining a new value for the NSH "Next Protocol" field to indicate "None".
       Such packets are contained within the SFC-enabled domain.</t>

    <t>This document illustrates some of the functions that may be achieved or enhanced by
       this mechanism, but it does not provide an exhaustive list of use cases, nor is it
       intended to be definitive about the functions it describes.  It is expected that
       other documents will describe specific use cases in more detail and will define the
       protocol mechanics for each use case.</t>

  </section>

  <section anchor="nsh" title="The Network Service Header">

    <t>The NSH is defined in <xref target="I-D.ietf-sfc-nsh" />.  It includes a field called "Next Protocol"
       that is used to indicate the nature of the payload data that follows the NSH.  The field can be used by
       any component that processes the NSH (for example, to understand how to interpret and parse the payload)
       and by nodes at the end of the SFP that remove the NSH and forward the payload data.</t>

    <section anchor="none" title="Next Protocol &apos;None&apos;">

      <t>This document defines a new value for the "Next Protocol" field.  When set to TBD1, the field
         indicates that the next protocol is "None" meaning that there is no user/payload data following
         the NSH.</t>

    </section>

  </section>

  <section anchor="process" title="Processing Rules">

    <t>An SFC-aware node wishing to send metadata without a data packet:
       <list style="symbols">
         <t>MUST create a packet carrying an NSH and the desired metadata</t>
         <t>MUST set the "Next Protocol" field to TBD1</t>
         <t>SHOULD ensure that there are no bytes following the end of the NSH</t>
         <t>MUST encapsulate and send the packet as normal for tunneling to the next hop on the SFP as normal
            for an NSH packet.</t>
       </list></t>

    <t>Note that a packet with no payload data may be simply inserted at the head end of an SFP
       (such as a classifier) and may be easily forwarded by an SFF or SFI on the SFP using the
       normal processing rules defined in <xref target="I-D.ietf-sfc-nsh" />.  Such a packet may
       only be inserted into the middle of an SFP (i.e., at a point other than the first hop with the
       highest SI value in the SFP) by a node that knows (by control plane or management plane means)
       the correct values of SPI and SI to use at that point on the SFP.</t>

    <t>A packet with no payload may also be generated by an SFC-aware SFI as a result of processing an
       incoming packet (i.e., triggered by a condition arising from processing a normal NSH packet with
       a payload).  In such cases, the SPI/SI can be inherited from the original packet or can be set
       according to information supplied through the control plane or management plane.  This document
       does not further specify the triggers to generate an NSH packet with a "Next Protocol" set to
       "None".</t>

    <t>A transit node (SFF, SFI, or classifier) receiving a packet with "Next Protocol" indicating "None"
       MUST NOT attempt to parse or process beyond the end of the NSH, but can process the NSH and
       especially the metadata as normal.</t>

    <t>A node that is the egress of an SFP would normally strip the NSH and forward the payload
       according to the setting of the "Next Protocol" field.  Such nodes MUST NOT forward packets
       with "Next Protocol" indicating "None" even if there some bytes after the NSH.</t>

  </section>

  <section anchor="backward" title="Backward Compatibility">

    <t>SFC-aware nodes that do not understand the meaning of a value contained in the "Next Protocol" field
       of the NSH are unable to parse the payload.  Such nodes are not obliged to discard the packet
       unless they are specifically called upon to be able to examine the payload.</t>

    <t>Thus:
       <list style="symbols">
          <t>Transit SFFs will normally not inspect the "Next Protocol" field or the packet payload
             and will forward the packets based solely on the SPI/SI</t>
          <t>An SFC Proxy must not pass to an SFI a packet of type where it cannot indicate the
             packet type to the SFI</t>
          <t>An SFC Proxy must not pass to an SFI a packet of type that the SFI does not support</t>
          <t>An SFC Proxy should not return to the SFF a packet it has not passed to the SFI</t>
          <t>An SFI should not return to the SFF a packet it hasn&apos;t processed unless local
             policy defines "process" for this SF to mean "do not process" in this case.</t>
          <t>Reclassifiers would normally require to understand the payload packet type, but it
             is possible to imagine reclassifiers that take action based on unknown values of the
             "Next Protocol" field or that perform protocol-independent actions (such as hashing the
             whole packet).</t>
        </list></t>

    <t>All this means that legacy SFC-aware nodes that are unaware of the meaning of the "Next Protocol"
       value "None" will act as follows:
       <list style="symbols">
          <t>SFFs will forward the packets</t>
          <t>SFC Proxies will drop the packets</t>
          <t>SFIs will most likely drop the packets</t>
          <t>Reclassifiers will most likely drop the packets</t>
       </list></t>

    <t>SFC-aware nodes at the end of an SFP possibly forward packets with no knowledge of the payload in a "pop and
       forward" form of processing where the NSH is removed and the packet is simply put on an interface
       an the payload protocol is known a priori (or assumed).  It is a general processing rule for all
       forwarders that they SHOULD NOT attempt to send packets with zero length, and this should be the
       case when the NSH "Next Protocol" is "None".</t>

  </section>

  <section anchor="uses" title="Overview of Use Cases">

    <section anchor="sfpuses" title="Per SFP Metadata">

       <t>Per SFP metadata may be sent along the path of an SFP simply by setting the correct
          SPI in the NSH, and setting the SI to the correct value for the hop of the SFP at which
          the metadata is to be introduced.  Classifiers and reclassifiers will know the correct SI
          values to used from information supplied by the control or management plane as is the case
          for NSH packets with payload data.</t>

    </section>

    <section anchor="flowuses" title="Per Flow Metadata">

       <t>Per flow metadata is complicated if there is more than one flow carried on an SFP.
          If there is just one flow on an SFP then there is no difference between per-flow
          metadata and per-SFP metadata.</t>

       <t>In normal processing, the flow to which per-flow metadata applies can be deduced by
          looking at the payload data in the context of the value of the "Next Protocol" field.
          When "Next Protocol" indicates "None" this cannot be done.  In this case the identity of
          the flow would need to be carried in the metadata.</t>

    </section>

    <section anchor="sfuses" title="Coordination Between SFC-Aware SFIs">

       <t>A pair of SFC-aware SFIs (adjacent or not) on an SFP may desire to coordinate state and may do
          this by sending information encoded in metadata.</t>

       <t>To do this using the mechanisms defined in this document:
          <list style="symbols">
            <t>There must be an SFP that passes through the two SFIs in the direction of
               sender to receiver</t>
            <t>The sender must know the correct SPI to use</t>
            <t>The sender must know the correct SI to use for the point at which it resides
               on the SFP</t>
            <t>Ideally the receiver will know to remove the packet from the SFP and not forward
               it further as this might share metadata wider than desirable and would cause
               unnecessary packets in the network.  Note, however, that continued forwarding
               of such packets would not be substantially harmful in its own right.</t>
          </list></t>

       <t>Note that technically (according to the SFC architecture) the process of inserting a
          packet into an SFP is performed by a Classifier.  However, a Classifier may be
          co-resident with an SFI so an implementation of an SF may also be able to generate
          NSH packets as described in this document.</t>

       <t>Note also that a system with SFIs that need to coordinate between each other may be
          configured so that there is a specific, dedicated SFP between those service functions
          that is used solely for this purpose.  Thus, such an SFi does not need to insert NSH
          packets onto SFPs used to carry payload data, but can use (and know the SPI of) this
          special, dedicated SFP.</t>

    </section>

    <section anchor="oamuses" title="Operations, Administration, and Maintenance (OAM)">

       <t>Requirements for Operations, Administration, and Maintenance (OAM) in SFC networks are
          discussed in <xref target="I-D.ietf-sfc-oam-framework" />.  The NSH definition in
          <xref target="I-D.ietf-sfc-nsh" /> includes an O-bit that indicates that packet contains
          OAM information.</t>

       <t>Since OAM information will be carried in packets that also include payload data, that
          information must be carried in metadata.  Therefore, the mechanism defined in this
          document can be used to carry OAM information independent of payload data.</t>

       <t>Sending OAM separate from (but interleaved with) packets that carry payload data may
          have several advantages including:
          <list style="symbols">
            <t>Sending OAM when there is no other traffic flowing.</t>
            <t>Sending OAM at predictable intervals.</t>
            <t>Measuring path qualities distinct from behavior of SFIs.</t>
            <t>Sending OAM without needing to rewrite payload data buffers.</t>
            <t>Keeping OAM processing components separate from other processing components.</t>
          </list></t>

    </section>

    <section anchor="controluses" title="Control Plane and Management Plane Uses">

       <t>As described in <xref target="sfuses" />, SFPs can be established specifically to carry
          metadata-only packets.  And as described in <xref target="sfpuses" />, metadata-only
          packets can be sent down existing SFPs.  This means that metadata-only packets can be
          used to carry control plane and management plane messages used to control and
          manage the SFC network.</t>

       <t>In effect, SFPs can be established to serve as a Data Control Network (DCN) or Management
          Control Network (MCN).  Further details of this process are out of scope of this document,
          but it should be understood that, just as for OAM, an essential feature of using a control
          channel is that the various speakers are assigned identifiers (i.e., addresses).  In this
          case, those identifiers could be SPI/SI pairs, or could be IP addresses as used in the
          normal control and management plane of the SFC network.</t>

    </section>

    <section anchor="nonuses" title="Non-Applicable Use Cases">

       <t>The mechanisms described in this document are not applicable to per-packet metadata
          because, by definition, if the "Next Protocol" indicates "None" then there is no packet
          following the NSH for the metadata to be associated with.</t>

    </section>

  </section>

  <section anchor="security" title="Security Considerations">

    <t>Metadata-only packets as enabled by this document provide a covert channel.  However, this
       is only different from the same feature in the normal NSH in that it can be sent without
       the presence of a data flow.</t>

    <t>Metadata may, of course, contain sensitive data and may also contain information used to
       control the behavior of SFIs in the network.  As such, this data needs to be protected
       according to its value and according to the perceived vulnerabilities of the network.
       protection of metadata may be achieved by using encrypted transport between SFC entities
       or by encrypting the metadata in its own right.  The need to protect the metadata is
       not modified by this document.</t>

    <t>The mechanism described in this document might possibly be used to introduce packets into
       the SFC overlay network.  Therefore measures SHOULD be taken to ensure authorization of
       sources of such packets, and tunneling of such packets into the network SHOULD be prevented.</t>

    <t>Further discussion of NSH security is presented in <xref target="I-D.ietf-sfc-nsh" />.</t>

  </section>

  <section anchor="iana" title="IANA Considerations">

    <t>IANA has been requested to create a registry of "Next Protocol" values in <xref target="I-D.ietf-sfc-nsh" />.
       This document requests IANA to allocate a value from that registry to indicate "None" (TBD1 in this
       document).</t>

    <t>It is strongly suggested that a value of 0 (zero) be assigned.</t>

  </section>

<!--
  <section anchor="contributors" title="Contributors">

    <figure>
      <artwork>
        <![CDATA[
   TBD
        ]]>
      </artwork>
    </figure>

  </section>
-->

  <section anchor="acks" title="Acknowledgements">

    <t>Thanks to the attendees at the SFC interim meeting in Westford in January 2017 for discussions
       that suggested the value of this document.</t>

    <t>Thanks to Eric Rosen and Med Boucadair for valuable review comments.</t>

  </section>

</middle>

<back>
  <references title="Normative References">

    &RFC2119;
    <?rfc include="reference.I-D.ietf-sfc-nsh"?>

  </references>

  <references title="Informative References">

    &RFC7665;
    <?rfc include="reference.I-D.ietf-sfc-oam-framework"?>

  </references>

</back>
</rfc>
