<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY I-D.ietf-lisp-rfc6833bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-rfc6833bis.xml">
<!ENTITY RFC8060 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8060.xml">
<!ENTITY I-D.ietf-lisp-te SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-te.xml">
<!ENTITY RFC8111 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8111.xml">
<!ENTITY I-D.cheng-lisp-shdht SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.cheng-lisp-shdht.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="exp" docName="draft-rodrigueznatal-lisp-multi-tuple-eids-12" ipr="trust200902">

  <front>

    <title abbrev="LISP-Multi-Tuple-EIDs">LISP support for Multi-Tuple EIDs</title>

    <author fullname="Alberto Rodriguez-Natal" initials="A." surname="Rodriguez-Natal">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>170 Tasman Drive</street>
          <city>San Jose</city>
          <region>CA</region>
          <code></code>
          <country>USA</country>
        </postal>
        <phone></phone>
        <email>natal@cisco.com</email>
      </address>
    </author>

    <author fullname="Albert Cabellos-Aparicio" initials="A." surname="Cabellos-Aparicio">
      <organization>Technical University of Catalonia</organization>
      <address>
        <postal>
          <street></street>
          <city>Barcelona</city>
          <region></region>
          <code></code>
          <country>Spain</country>
        </postal>
        <phone></phone>
        <email>acabello@ac.upc.edu</email>
      </address>
    </author>

    <author fullname="Sharon Barkai" initials="S." surname="Barkai">
      <organization>Nexar Inc.</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region>CA</region>
          <code></code>
          <country>USA</country>
        </postal>
        <phone></phone>
        <email>sharon.barkai@getnexar.com</email>
      </address>
    </author>

    <author fullname="Vina Ermagan" initials="V." surname="Ermagan">
      <organization>Google</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <code></code>
          <country>USA</country>
        </postal>
        <phone></phone>
        <email>ermagan@gmail.com</email>
      </address>
    </author>


    <author fullname="Darrel Lewis" initials="D." surname="Lewis">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>170 Tasman Drive</street>
          <city>San Jose</city>
          <region>CA</region>
          <code></code>
          <country>USA</country>
        </postal>
        <phone></phone>
        <email>darlewis@cisco.com</email>
      </address>
    </author>

    <author fullname="Fabio Maino" initials="F." surname="Maino">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>170 Tasman Drive</street>
          <city>San Jose</city>
          <region>CA</region>
          <code></code>
          <country>USA</country>
        </postal>
        <phone></phone>
        <email>fmaino@cisco.com</email>
      </address>
    </author>

    <author fullname="Dino Farinacci" initials="D." surname="Farinacci">
      <organization>lispers.net</organization>
      <address>
        <postal>
          <street></street>
          <city>San Jose</city>
          <region>CA</region>
          <code></code>
          <country>USA</country>
        </postal>
        <phone></phone>
        <email>farinacci@gmail.com</email>
      </address>
    </author>

    <date year="2021" />

    <area>Internet</area>

    <workgroup>LISP Working Group</workgroup>

    <keyword>multi-tuple, lisp, eid, tuple, 5-tuple, sdn, nfv</keyword>

    <abstract>
      <t>This document describes extensions for LISP to support EIDs based on tuples of multiple elements.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">

      <t>This document describes how LISP handles lookups based on Extended-EIDs, i.e. tuples of n elements. Particularly it describes how the Tunnel Routers and the Mapping System operate when Extended-EIDs are in place, the different types of Extended-EIDs defined so far, how the lookup is performed for each Extended-EID type and which mapping databases are recommended to use depending on the kind of Extended-EIDs used. </t>

      <section 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">RFC 2119</xref>.</t>
        </section>
      </section>

      <section anchor="definition_terms" title="Definition of terms">

        <t><list style="symbols">

          <t>n-tuple: The term n-tuple is used in this document to describe the set of n elements present in a data packet (e.g. IP address, port, protocol) that can be used to identify unequivocally a packet or a set of packets.</t>

          <t>5-tuple: The term 5-tuple is used in this document to describe the set comprised by 5 elements, being these the source IP address, the destination IP address, the level 4 protocol number, the level 4 protocol source port and the level 4 protocol destination port of a data packet.</t>

          <t>Extended-EID: This document uses the term Extended-EID to refer to any n-tuple (including a 5-tuple) used in a EID role. See as well <xref target="RFC8111"></xref></t>

          <t>Flow: The term flow is used in this document to refer to the sequence of packets identified by the same n-tuple.</t>

          <t>MT-[xTR, RTR, MS, MR]: A LISP [xTR, RTR, MS, MR] that supports the enhanced operation for Multi-Tuple Extended-EIDs described in this document.</t>

          <t>MT-TR: A LISP tunnel router (e.g. xTR, RTR) that supports the enhanced operation for Multi-Tuple Extended-EIDs described in this document, e.g. MT-xTR, MT-RTR. </t>

        </list> The rest of the terms are defined in their respective documents. See the LISP specification <xref target="I-D.ietf-lisp-rfc6833bis"></xref> for most of the definitions, <xref target="RFC8060"></xref> for LCAF and <xref target="I-D.ietf-lisp-te"></xref> for RTR.</t>
      </section>

      <section anchor="overview" title="Overview">
        <t>This document describes extensions for LISP to support Multi-Tuple Extended-EIDs. Protocol operation follows the specification defined on <xref target="I-D.ietf-lisp-rfc6833bis"></xref> except for the following. Besides of IP mappings, a Mapping System can store Extended-EID mappings. Being Extended-EID a n-tuple identifying a flow. LISP routers perform look-ups based on these Extended-EIDs, instead of on destination IPs. Apart from using n-tuples instead of IPs, retrieving information from the Mapping System follows LISP standard mechanisms (i.e. Map-Request, Map-Reply). </t>

      </section>

      <section anchor="operation" title="Protocol Operation with Extended-EIDs">
        <section anchor="xTR" title="LISP Tunnel Routers">
          <t>LISP tunnel routers with enhanced operation for Multi-Tuple Extended-EIDs, or MT-TRs (MT-xTRs and MT-RTRs), behave as specified on  and <xref target="I-D.ietf-lisp-rfc6833bis"></xref>, with the particularity that MT-TRs perform mapping lookups based on Extended-EIDs (n-tuples).</t>

          <t>Any MT-TR must keep an internal map-cache indexed by Extended-EIDs. When a MT-TR receives a packet to encapsulate, it extracts the fields required by the n-tuple lookup in use and stores them in an Extended-EID structure. In the case of a 5-tuple lookup, it will extract the source address, destination address, level 4 protocol, source port (if any) and destination port (if any) from the packet. The MT-TR uses the Extended-EID to perform a look-up into the map-cache. The lookup process must follow the procedure described in section <xref target="lookup"></xref>. If there is an entry on the map-cache that matches the Extended-EID, the MT-TR retrieves the mapping information, selects a destination RLOC and encapsulates the packet, as defined in <xref target="I-D.ietf-lisp-rfc6833bis"></xref></t>

          <t>If the map-cache of the MT-TR contains no entry for the Extended-EID, the MT-TR sends a Map-Request to a MT-MR. The MT-TR MUST be provisioned with the RLOC of at least one MT-MR. The Map-Request sent carries the Extended-EID (encoded in the specific LCAF for that Extended-EID type) in the EID-prefix field of the Map-Request. This Map-Request will eventually trigger a Map-Reply to be sent back the requester MT-TR, see section <xref target="mapping_system"></xref>. This Map-Reply carries an Extended-EID on the EID-prefix field. The MT-TR stores, as defined in <xref target="I-D.ietf-lisp-rfc6833bis"></xref>, the mapping for the Extended-EID. </t>
        </section>

        <section anchor="mapping_system" title="Mapping System">
          <t>Mapping System elements (comprising Map Servers and Map Resolvers) behave as specified on <xref target="I-D.ietf-lisp-rfc6833bis"></xref> when implementing enhanced Multi-Tuple Extended-EIDs operation, with the particularity that MT-MRs resolve Map-Requests based on Extended-EIDs and MT-MSs store mappings indexed by Extended-EIDs.</t>

          <t>MT-MRs must be capable of processing Map-Requests with an Extended-EID on the EID-prefix field, of finding the appropriate MT-MS for the Extended-EID and of forwarding the Map-Request to it. This is done according to the lookup rules described in section <xref target="lookup"></xref> and using the mapping database described in section <xref target="databases"></xref> which differs depending on the specific Extended-EID.</t>

          <t>LISP elements must perform the mapping update mechanisms defined in <xref target="I-D.ietf-lisp-rfc6833bis"></xref> (e.g, SMR) using as EID the Extended-EID.</t>
        </section>

      </section>

      <section anchor="extended_eid_type" title="Extended-EIDs Encoding">
        <t>This section describes the Extended-EID types defined so far and the LCAFs to support them.</t>
        <section anchor="fivetupletype" title="5-Tuple">
          <t>The 5-tuple LCAF is a combination of Application Data Type 4 and Source/Dest Type 12 LCAFs. Experimental deployment may indicate that a specific 5-tuple type LCAF is necessary.</t>
        </section>
      </section>

      <section anchor="lookup" title="Extended-EID Lookups">
        <t>This section describes the lookup process to be followed when using Extended-EID. At this point, this document only covers 5-tuple kind of Extended-EID lookups (with options for coarse or exact lookup). It is expected to include lookup mechanism for n-tuple lookups with more complex protocol combinations.</t>

        <section anchor="fivetuplelookupcoarse" title="5-Tuple (Coarse)">
          <t>When using a coarse lookup for 5-tuple, the encoding described in <xref target="fivetupletype"></xref> is used to carry the Extended-EID. Note that a coarse lookup also covers exact lookups. The lookup is (logically) done at steps, one per each element of the tuple. The lookup MUST follow this strict order: </t>

          <t><list style="format (%d)">
            <t>Destination address</t>
            <t>Source address</t>
            <t>Protocol number</t>
            <t>Destination port</t>
            <t>Source port</t>
          </list></t>

          <t> This means that for a given 5-tuple, the lookup process will first select from the available 5-tuples present in the system, the ones that match the destination address. Among them, those that also match the source address. This is iterated for the rest of the elements in the tuple. If a 5-tuple matches several entries, then the one with the longest prefix match or shortest port-range has priority. To clarify the process an example is provided below. </t>

          <t> Suppose that a MT-MS stores the mappings indexed by the tuples (A), (B), (C), (D) and (E), and that it receives Map-Request messages carrying the Extended-EIDs (T), (U), (V), (W), (X) and (Y). </t>

          <t><figure align="center"
            title="5-tuple example for coarse lookup">
            <artwork align="center"><![CDATA[

      dst-add     src-add    pr   dst-prt    src-prt

(A) [1.1.1.0/24, 2.2.0.0/16, 17, 1000-3000, 1000-3000]
(B) [1.1.0.0/16, 2.2.2.0/24, 17, 1000-3000, 1000-3000]
(C) [3.3.3.0/24, 4.4.4.0/24,  6, 4000-4500, 7000-8000]
(D) [3.3.3.0/24, 4.4.4.0/24,  6, 4000-6000, 7000-8000]
(E) [5.5.5.0/24, 6.6.6.0/24, 17,   0-65535,   0-65535]

(T) [ 1.1.1.8,     2.2.2.9,  17,   2000,      2000   ]
(U) [ 1.1.8.8,     2.2.9.9,  17,   2000,      2000   ]
(V) [ 1.1.8.8,     2.2.2.9,  17,   2000,      2000   ]
(W) [ 3.3.3.3,     4.4.4.4,   6,   4300,      7500   ]
(X) [ 3.3.3.3,     4.4.4.4,   6,   5000,      7500   ]
(Y) [ 5.5.5.5,     6.6.6.6,  17,   6000,      6000   ]

              ]]></artwork>
            </figure></t>

            <t><list style="format (%d)">
              <t>When (T) is Map-Requested, the lookup could match both (A) and (B), however destination address has preference over source address and therefore (A) is returned.</t>
              <t>When (U) is Map-Requested, the lookup will return that no entry exists for the 5-tuple.</t>
              <t>When (V) is Map-Requested, the lookup will return (B).</t>
              <t>When (W) is Map-Requested, the lookup will return (C) and not (D), although both could match the tuple, since the destination port range is shorter in (C).</t>
              <t>When (X) is Map-Requested, the lookup will return (D).</t>
              <t>When (Y) is Map-Requested, the lookup will return (E). A port range of 0-65535 means any port.</t>
            </list></t>

          </section>

          <section anchor="fivetuplelookupexact" title="5-Tuple (Exact)">
            <t> In scenarios where 5-tuple coarse lookup is not required, the lookup can be optimized to only account for exact matchs. When using a exact lookup for 5-tuple, the encoding described in <xref target="fivetuplelookupcoarse"></xref> is used to carry the Extended-EID. The exact match lookup is performed by serializing the elements of the 5-tuple as a single vector of bits. The order to serialize the elements is the same that is described in <xref target="fivetupletype"></xref> This (unique) vector of bits is then used as the key to perform a exact match lookup over the available entries.</t>
            <t></t>

          </section>
        </section>
        <section anchor="databases" title="Mapping Databases for Extended-EIDs">
          <t> The mapping database, i.e. the system to interconnect (MT-)MRs and (MT-)MSs should be optimal for each one of the different Extended-EIDs types. This section covers recommended mapping databases for each of the Extended-EIDs described in this document. </t>

          <section anchor="fivetupledb1" title="5-Tuple (Coarse)">
            <t>The mapping database to be used for a coarse lookup of 5-tuples can leverage on the LISP-DDT mapping database <xref target="RFC8111"></xref> since it supports multi-tuple lookups. Note that a LISP-DDT based database can support also a exact lookup.</t>
          </section>


          <section anchor="fivetupledb2" title="5-Tuple (Exact)">
            <t>Although a LISP-DDT based mapping database supports both coarse and exact lookups, the particularities of the latter benefit of using a mapping database optimized for flat namespaces rather than one optimized for hierarchical data. In that sense, the exact match mechanism should be supported by a DHT-like mapping database, such <xref target="I-D.cheng-lisp-shdht"></xref> or [LISP-DHT].</t>
          </section>

        </section>

        <section anchor="IID" title="A Note on Instance-ID">

          <t> Instance-ID is a special case to be considered. If it is in use, its lookup is resolved before the lookup for the Extended-EID begins (regardless of the Extended-EID type). In terms of implementation this means that if the Instance-ID is present, it will have always more priority that any other field within the multi-tuple EID. In other words, Instance-ID is the high-order parts of the destination and source addresses and a longest match lookup should be applied to it before looking up the address itself. </t>

        </section>
        <section anchor="Acknowledgments" title="Acknowledgments">

        </section>

        <section anchor="IANA" title="IANA Considerations">
          <t>This memo includes no request to IANA.</t>

        </section>

        <section anchor="Security" title="Security Considerations">
          <t>Security Considerations TBD</t>
        </section>
      </middle>

      <back>

        <references title="Normative References">

          &RFC2119;

          &I-D.ietf-lisp-rfc6833bis;

          &RFC8060;

          &I-D.ietf-lisp-te;

          &RFC8111;

          &I-D.cheng-lisp-shdht;

        </references>

      </back>
    </rfc>
