<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6833 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6833.xml">
<!ENTITY RFC6836 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6836.xml">
<!ENTITY I-D.ietf-lisp-lcaf SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-lcaf.xml">
<!ENTITY I-D.ietf-lisp-ddt SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-ddt.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="exp" docName="draft-ermagan-lisp-nsh-06" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="LISP-NSH">LISP Control Plane integration with NSH</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Vina Ermagan" initials="V." surname="Ermagan">
      <organization>Cisco Systems Inc</organization>

      <address>
        <postal>
          <street>170 W Tasman Drive</street>

          <city>San Jose</city>

          <region>CA</region>

          <code>95134</code>

          <country>USA</country>
        </postal>

        <phone/>

        <email>vermagan@cisco.com</email>
      </address>
    </author>

    <author fullname="Paul Quinn" initials="P." surname="Quinn">
      <organization>Cisco Systems Inc</organization>

      <address>
        <postal>
          <street>55 Cambridge Parkway</street>

          <city>CAMBRIDGE</city>

          <region>MA</region>

          <code>02141</code>

          <country>USA</country>
        </postal>

        <phone/>

        <email>paulq@cisco.com</email>
      </address>
    </author>

    <author fullname="Darrel Lewis" initials="D." surname="Lewis">
      <organization>Cisco Systems Inc</organization>

      <address>
        <postal>
          <street>170 W Tasman Dr</street>

          <city>San Jose</city>

          <region>CA</region>

          <code>95134</code>

          <country>USA</country>
        </postal>

        <phone/>

        <email>darlewis@cisco.com</email>
      </address>
    </author>

    <author fullname="Fabio Maino" initials="F." surname="Maino">
      <organization>Cisco Systems Inc</organization>

      <address>
        <postal>
          <street>170 Tasman Drive</street>

          <city>San Jose</city>

          <region>CA</region>

          <code>95134</code>

          <country>USA</country>
        </postal>

        <phone/>

        <email>fmaino@cisco.com</email>
      </address>
    </author>

    <author fullname="Florin Coras" initials="F." surname="Coras">
      <organization>Cisco Systems Inc</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <email>fcoras@cisco.com</email>
      </address>
    </author>

    <date day="1" month="October" year="2018"/>

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>Internet</area>

    <workgroup>LISP Working Group</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>lisp, nsh, service chaining</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>This document defines extensions to the LISP control plane protocol
      to enable support for Network Service Header(NSH) based Service Function
      Chaining (SFC).</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <!--

      <t>The original specification of xml2rfc format is in <xref
      target="RFC2629">RFC&nbsp;2629</xref>.</t>

-->

      <t>The Locator/ID Separation Protocol (LISP) <xref target="LISP"/>
      defines a control plane for driving dynamic network overlays, and can be
      used with various encapsulations such as VXLAN, LISP, LISP-GPE <xref
      target="LISP-GPE"/>, VXLAN-GPE<xref target="VXLAN-GPE"/>, NV-GRE.</t>

      <t>LISP-GPE/VXLAN-GPE defines a way for the LISP/VXLAN to support
      multi-protocol encapsulations; i.e. enabling encapsulation of any inner
      payload, including IP, Ethernet, and NSH <xref target="NSH"/>.</t>

      <t>This document defines the necessary extensions to the LISP control
      plane to support driving a dynamic NSH-based service function chain (
      map-and-encap based on SPI and SI). These extensions enable a LISP xTR
      <xref target="LISP"/> or a service node <xref target="SFC"/> to use the
      LISP control plane for dynamically looking up the next hop's locator in
      the service path.</t>
    </section>

    <section anchor="tree-view"
             title="LISP Model of Service Function Chaining">
      <t>The NSH header <xref target="NSH"/> identifies the service path that
      a packet belongs to, and the next hop in the path for that packet via
      the Service Path Identifier (SPI) and Service Index (SI) fields in the
      Service Path header, as depicted in the figure below.</t>

      <t><figure>
          <artwork name="NSH"><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      
   |                  Service Path ID              | Service Index |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure></t>

      <t>To provide a dynamic overlay for NSH packets using LISP, the
      assumptions are that a LISP xTR is co-located with, or connected to,
      every Service Function Forwarder (SFF) <xref target="SFC"/> in a service
      path visible to LISP, and that the xTR can send/receive the NSH packets
      encapsulated in LISP-GPE/VXLAN-GPE headers. The ITRs in this scenario
      need to resolve the combination of SPI and SI from the NSH header (
      which together identify the next hop in the Service Path) to the
      associated Network locations (RLOCs) for the next hop. These RLOCs in
      SFC terminology are the locators for the Service Function Forwarder
      (SFF) that is hosting the next hop Service Function in the associated
      Service Path. Once this mapping is resolved, the packet is encapsulated
      to the destination RLOC (SFF). The ETR at the next hop SFF receives and
      decapsulates this packet. The NSH packet is then passed to the SFF.</t>

      <t>As a result, the LISP mapping service and the xTRs need to be
      extended to support a new identity type ( i.e. SPI+SI) as well as
      encapsulation of NSH packets.</t>

      <t>To this end, a new LCAF <xref target="LCAF"/> is defined to represent
      the SPI and SI information as a new EID. We refer to this new LCAF as
      the SPI LCAF. With this new LCAF, the LISP control protocol is extended
      to store and retrieve SPI and SI information and their mappings to the
      routing locators of the next hop in the associated service path.</t>
    </section>

    <section title="Service Path Encoding">
      <t>This section defines the new SPI LCAF required to encode NSH fields
      and the associated path information in the LISP mapping system.</t>

      <section title="SPI LCAF">
        <t>A new LCAF is defined to encode SPI and SI information as a new
        LISP address type. The SPI LCAF fields are defined below. See <xref
        target="LCAF"/> for a description of all LCAF fields.</t>

        <t><figure>
            <artwork name="SPI LCAF"><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      
   |           AFI = 16387         |    Rsvd1      |     Flags     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Type = 17    |     Rsvd2   |               4               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Service Path ID                  | Service index |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
          </figure>Field definitions:</t>

        <t>Service Path ID: The SPI from the NSH header that identifies the
        service path this packet belongs to.</t>

        <t>Service index: The SI from the NSH header that identifies the next
        hop within the path for this packet.</t>
      </section>
    </section>

    <section title="LISP ITR Processing">
      <t>LISP ITRs determine the destination routing locator to encapsulate
      the packet to by looking up the Service Path ID and Service Index from
      the NSH header in the mapping system. When querying the mapping system,
      the ITRs will generate a Map-Request using the SPI LCAF as an EID
      record.</t>

      <t>The Map-Reply to such a Map-Request will have the SPI LCAF as the EID
      record, and the routing locator information of only the next hop for
      this SPI and SI combination, in the locator records. The ITRs store this
      mapping in its local map-cache for future use.</t>
    </section>

    <section title="LISP Map-Server Processing">
      <t>A LISP Map-Server stores mapping entries such that it can resolve the
      SPI and SI to the RLOC(s) of the associated next hop (SFF locators). In
      the common deployment scenario, it is expected that the proxy-reply bit
      is set for SPI and SI mapping entries, resulting in the Map-Server
      proxy-replying to Map-Requests. When such a Map-Server receives a
      Map-Request for an SPI and SI, the Map-Server returns in a Map-Reply the
      routing locators associated with the next hop, including their weights
      and priorities. This is done by using the SPI LCAF as the EID record in
      the Map-Reply message.</t>
    </section>

    <section title="Packet Flow Example">
      <t>This section provides an example packet flow assuming that the NSH
      Classifier function (co-located in this example with a LISP ITR),
      classifies incoming traffic and imposes an NSH header (with the
      appropriate SPI and SI values). Furthermore, a LISP xTR is co-located
      with every SFF participating in the service path in this example.</t>

      <t>1. Upon receiving a packet with the NSH header, the LISP ITR creates
      a Map-Request (if needed) with the SPI and SI from the NSH header and
      forwards this request to the mapping system. This request is eventually
      delivered to the Map-Server.</t>

      <t>2. The Map-Server creates a LISP Map-Reply encoding the next hop RLOC
      for the requested SPI and SI, and sends this reply back to the
      requesting ITR. The ITR then caches this mapping.</t>

      <t>3. The ITR now encapsulates packets matching this SPI and SI, in a
      LISP-GPE header using the RLOC(s) returned in the mapping record, and
      setting the Next Protocol of the header to indicate a NSH payload.</t>

      <t>4. When the LISP packet arrives at the destination ETR, the ETR
      decapsulates the packet and forwards to the co-located SFF.</t>

      <t>5. When SFF needs to forward the serviced packet to the next hop in
      the Service Path, the packet with the updated NSH header (new SI value)
      is returned to co-located ITR, in which case, ITR continues as in step
      1.</t>

      <t>6. At the last hop SFF, the SFF removes the NSH header and returns
      the packet in its original form to the co-located ITR. In this case the
      ITR performs normal LISP ITR processing as defined in .</t>
    </section>

    <section title="Multiple Data Planes">
      <t>In a heterogeneous environment where different hops in a single
      service path have different data plane encapsulation capabilities, the
      supported encapsulation formats can be specified together with the
      locator mappings using the multiple data plane LCAF type 16<xref
      target="LCAF"/>. In such cases, xTR receiving a Map Reply with an RLOC
      encoded in LCAF type 16 can choose a matching encapsulation format among
      next hop's supported encapsulations.</t>
    </section>

    <section anchor="Acknowledgments" title="Acknowledgments">
      <t>NA in this version.</t>
    </section>

    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
      <t>This draft includes no request to IANA.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>No additional security considerations are foreseen at this time.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->

      <reference anchor="NSH">
        <front>
          <title>Network Service Header</title>

          <author fullname="Paul Quinn" initials="P." surname="Quinn">
            <organization/>
          </author>

          <author fullname="Uri Elzur" initials="U." surname="Elzur">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <author fullname="Carlos Pignataro" initials="C."
                  surname="Pignataro">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <date day="" month="" year=""/>
        </front>

        <seriesInfo name="" value="RFC 8300"/>

        <format target="https://tools.ietf.org/html/rfc8300" type="TXT"/>
      </reference>

      <reference anchor="LCAF">
        <front>
          <title>LISP Canonical Address Format (LCAF)</title>

          <author fullname="Dino Farinacci" initials="D" surname="Farinacci">
            <organization/>
          </author>

          <author fullname="David Meyer" initials="D" surname="Meyer">
            <organization/>
          </author>

          <author fullname="Job Snijders" initials="J" surname="Snijders">
            <organization/>
          </author>

          <date day="" month="" year=""/>
        </front>

        <seriesInfo name="" value="RFC8060"/>

        <format target="https://tools.ietf.org/html/rfc8060" type="TXT"/>
      </reference>

      <reference anchor="SFC">
        <front>
          <title>Service Function Chaining (SFC) Architecture</title>

          <author fullname="Joel Halpern" initials="J." surname="Halpern">
            <organization/>
          </author>

          <author fullname="Carlos Pignataro" initials="C."
                  surname="Pignataro">
            <organization>Pignataro</organization>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <date day="" month="" year=""/>
        </front>

        <seriesInfo name="" value="RFC 7665"/>

        <format target="https://tools.ietf.org/html/rfc7665" type="TXT"/>
      </reference>

      <reference anchor="VXLAN-GPE">
        <front>
          <title>Generic Protocol Extension for VXLAN</title>

          <author fullname="Fabio Maino" initials="F." surname="Maino">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <author fullname="Larry Kreeger" initials="L." surname="Kreeger">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <author fullname="Uri Elzur" initials="U." surname="Elzur">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <date/>
        </front>

        <seriesInfo name="Internet-Draft" value="draft-ietf-nvo3-vxlan-gpe-06"/>

        <format target="https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-06"
                type="TXT"/>
      </reference>

      <reference anchor="LISP-GPE">
        <front>
          <title>LISP Generic Protocol Extension</title>

          <author fullname="Fabio Maino" initials="F." surname="Maino">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <author fullname="John Lemon" initials="J." surname="Lemon">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <author fullname="Puneet Agrawal" initials="P." surname="Agrawal">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <author fullname="Darrel Lewis" initials="D." surname="Lewis">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <author fullname="Michael Smith" initials="M." surname="Smith">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <date/>
        </front>

        <seriesInfo name="Internet-Draft" value="draft-ietf-lisp-gpe-06"/>

        <format target="https://tools.ietf.org/html/draft-ietf-lisp-gpe-06"
                type="TXT"/>
      </reference>

      <reference anchor="LISP">
        <front>
          <title>Locator/ID Separation Protocol (LISP)</title>

          <author initials="D." surname="Farinacci"/>

          <author initials="V." surname="Fuller"/>

          <author initials="D." surname="Meyer"/>

          <author initials="D." surname="Lewis"/>

          <date month="January" year="2013"/>
        </front>

        <seriesInfo name="" value="RFC 6830"/>

        <format target="http://tools.ietf.org/html/rfc6830" type="TXT"/>
      </reference>
    </references>
  </back>
</rfc>
