<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<rfc category="exp" ipr="trust200902" docName="draft-ietf-lisp-name-encoding-05">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
  
<!--  Edited by Dino Farinacci farinacci@gmail.com -->

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>

<front>
  <title>LISP Distinguished Name Encoding</title>

  <author initials='D' surname="Farinacci" fullname='Dino Farinacci'>
    <organization>lispers.net</organization>
    <address>
      <postal>
      <street></street>
      <city>San Jose</city> <region>CA</region>
      <code></code>
      <country>USA</country>
      </postal>
      <email>farinacci@gmail.com</email>
    </address>
  </author>

  <date />
  <area>Routing Area</area>
  <workgroup>Internet Engineering Task Force</workgroup>
  <keyword>template</keyword>

  <abstract>
    <t>This draft defines how to use the AFI=17 Distinguished Names in LISP.</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>
  <section title="Introduction">
    <t>The LISP architecture and protocols <xref target="RFC9300" />
    introduces two new numbering spaces, Endpoint Identifiers (EIDs)
    and Routing Locators (RLOCs) which are intended to replace most
    use of IP addresses on the Internet. To provide flexibility for
    current and future applications, these values can be encoded in
    LISP control messages using a general syntax that includes Address
    Family Identifier (AFI) <xref target="RFC3232" />.</t>

    <t>The length of the value field is implicit in the type of
    address that follows. For AFI 17, a Distinguished Name can be
    encoded. A name can be a variable length field so the length
    cannot be determined solely from the AFI value 17. This draft
    defines a termination character, an 8-bit value of 0 to be used as
    a string terminator so the length can be determined.</t>

    <t>LISP Distinguished Names are useful when encoded either in
    EID-Records or RLOC-records in LISP control messages. As EIDs,
    they can be registered in the mapping system to find resources,
    services, or simply used as a self-documenting feature that
    accompany other address specific EIDs. As RLOCs, Distinguished
    Names, along with RLOC specific addresses and parameters, can be
    used as labels to identify equipment type, location, or any
    self-documenting string a registering device desires to
    convey.</t>
    <t><vspace blankLines='30' /></t>
  </section>

  <section title="Definition of Terms">
    <t><list style="hanging">
      <t hangText="Address Family Identifier (AFI):">a term used to
      describe an address encoding in a packet. An address family
      currently defined for IPv4 or IPv6 addresses. See <xref
      target="IANA-ADDRESS-FAMILY-REGISTRY" /> and <xref
      target="RFC3232" /> for details on other types of information
      that can be AFI encoded.</t>
    </list></t>
  </section>

  <section title="Distinguished Name Format">
    <figure>
      <preamble>An AFI=17 Distinguished Name is encoded as:</preamble>
      <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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |            AFI = 17           |       ASCII String ...        | 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |               ...  ASCII String             |       0         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       ]]></artwork>
      <postamble />
    </figure>
	    
    <t>The string of characters are encoded in the ASCII character-set
    definition <xref target="RFC0020" />.</t>

    <t>When Distinguished Names are encoded for EIDs, the EID-Prefix
    length of the EIDs as they appear in EID-Records for all LISP
    control messages is the length of the string in bits (include the
    null 0 byte). Where Distinguished Names are encoded anywhere else
    (i.e. nested in LCAF encodings), then any length field is the
    length of the ASCII string including the null 0 byte in units of
    bytes.</t>
    <t><vspace blankLines='30' /></t>
  </section>

   <section title="Mapping System Lookups for Distinguished Name EIDs">
     <t>Distinguished Name EID lookups MUST carry as an EID-Prefix length equal to
     the length of the name string. This instructs the mapping system to do either
     an exact match or longest match lookup.</t>

     <t>If the Distinguished Name EID is registered with the same length as the length
     in a Map-Request, the Map-Server
     (when configured for proxy Map-Replying) returns an exact match lookup with the
     same EID-Prefix length. If a less specific name is registered, then the Map-Server
     returns the registered name with the registered EID-Prefix length.</t>

     <t>For example, if the registered EID name is "ietf" with
     EID-prefix length of 40 bits (the length of string "ietf" plus
     the null byte is 5 bytes), and a Map-Request is received for EID
     name "ietf.lisp" with an EID-prefix length of 80 bits, the Map-Server
     will return EID "ietf" with length of 40 bits.</t>
  </section>

  <section title="Example Use-Cases" anchor="USECASE">
    <t>This section identifies three specific use-cases examples for the
    Distinguished Name format. Two are used for an EID encoding and
    one for a RLOC-record encoding. When storing public keys in the
    mapping system, as in <xref target="I-D.ietf-lisp-ecdsa-auth"/>, a
    well known format for a public-key hash can be encoded as a
    Distinguished Name. When street location to GPS coordinate
    mappings exist in the mapping system, as in <xref
    target="I-D.ietf-lisp-geo"/>, the street location can be a
    free form ASCII representation (with whitespace characters)
    encoded as a Distinguished Name. An RLOC that describes an xTR
    behind a NAT device can be identified by its router name, as in
    <xref target="I-D.farinacci-lisp-lispers-net-nat"/>, uses a
    Distinguished Name encoding. As well as identifying the router
    name (neither an EID or an RLOC) in NAT Info-Request messages uses
    Distinguished Name encodings.</t>
  </section>

  <section title="Name Collision Considerations">
    <t>When a Distinguished Name encoding is used to format an EID,
    the uniqueness and allocation concerns are no different than
    registering IPv4 or IPv6 EIDs to the mapping system. See <xref
    target="RFC9301"/> for more details. Also, the use-case documents
    specified in <xref target="USECASE"/> provide allocation
    recommendations for their specific uses.</t>

    <t>It is RECOMMENDED that each use-case register their Distinguish
    Names with a unique Instance-ID. For any use-cases which require
    different uses for Distinguish Names within an Instance-ID MUST
    define their own Instance-ID and structure syntax for the name
    registered to the Mapping System. See the encoding procedures in
    <xref target="I-D.ietf-lisp-vpn"/> for an example.</t>
  </section>

  <section title="Security Considerations">
    <t>There are no security considerations.</t>
  </section>

  <section title="IANA Considerations">
    <t>The code-point values in this specification are already
    allocated in <xref target="IANA-ADDRESS-FAMILY-REGISTRY" />.</t>
  </section>
</middle>

<back>
  <references title='Normative References'>
    <?rfc include="reference.RFC.2119'?>
    <?rfc include="reference.RFC.3232'?>
    <?rfc include="reference.RFC.9300'?>
    <?rfc include="reference.RFC.9301'?>
    <?rfc include="reference.RFC.0020'?>

    <reference anchor="IANA-ADDRESS-FAMILY-REGISTRY">
      <front>
	    <title>IANA Address Family Numbers Registry</title>
        <author fullname="IANA"/>
	    <date year="2023" month="December" />
      </front>
      <refcontent>https://www.iana.org/assignments/address-family-numbers/</refcontent>
    </reference>

  </references>

  <references title='Informative References'>
    <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-ecdsa-auth.xml'?>
    <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-geo.xml'?>
    <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.farinacci-lisp-lispers-net-nat.xml'?>
    <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-vpn.xml'?>
  </references>

  <section title="Acknowledgments">
    <t>The author would like to thank the LISP WG for their review and
    acceptance of this draft. And a special thank you goes to Marc
    Portoles for moving this document through the process.</t>
  </section>

  <section title="Document Change Log">

    <section title="Changes to draft-ietf-lisp-name-encoding-05">
      <t><list style="symbols">
        <t>Submitted December 2023.</t>
	    <t>Update IANA AFI reference.</t>
      </list></t>
    </section>

    <section title="Changes to draft-ietf-lisp-name-encoding-04">
      <t><list style="symbols">
        <t>Submitted December 2023.</t>
        <t>More comments from Alberto. Change to standard spellings throughout.</t>
        <t>Add RFC 2119 boilerplate.</t>
	    <t>Update reference RFC1700 to RFC3232.</t>
      </list></t>
    </section>

    <section title="Changes to draft-ietf-lisp-name-encoding-03">
      <t><list style="symbols">
        <t>Submitted December 2023.</t>
        <t>Address comments from Alberto, document shepherd.</t>
	    <t>Update references.</t>
      </list></t>
    </section>

    <section title="Changes to draft-ietf-lisp-name-encoding-02">
      <t><list style="symbols">
        <t>Submitted August 2023.</t>
	    <t>Update references and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-ietf-lisp-name-encoding-01">
      <t><list style="symbols">
        <t>Submitted February 2023.</t>
	    <t>Update references and document expiry timer.</t>
	    <t>Change 68**.bis references to proposed RFC references.</t>
      </list></t>
    </section>

    <section title="Changes to draft-ietf-lisp-name-encoding-00">
      <t><list style="symbols">
        <t>Submitted August 2022.</t>
        <t>Move individual submission to LISP WG document.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-15">
      <t><list style="symbols">
        <t>Submitted July 2022.</t>
        <t>Added more clarity text about how using VPNs (instance-ID encoding) addresses name
        collisions from multiple use-cases.</t>
	    <t>Update references and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-14">
      <t><list style="symbols">
        <t>Submitted May 2022.</t>
	    <t>Update references and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-13">
      <t><list style="symbols">
        <t>Submitted November 2021.</t>
	    <t>Update references and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-12">
      <t><list style="symbols">
        <t>Submitted May 2021.</t>
	    <t>Update references and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-11">
      <t><list style="symbols">
        <t>Submitted November 2020.</t>
        <t>Made changes to reflect working group comments.</t>
	    <t>Update references and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-10">
      <t><list style="symbols">
        <t>Submitted August 2020.</t>
	    <t>Update references and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-09">
      <t><list style="symbols">
        <t>Submitted March 2020.</t>
	    <t>Update references and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-08">
      <t><list style="symbols">
        <t>Submitted September 2019.</t>
	    <t>Update references and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-07">
      <t><list style="symbols">
        <t>Submitted March 2019.</t>
	    <t>Update referenes and document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-06">
      <t><list style="symbols">
        <t>Submitted September 2018.</t>
	    <t>Update document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-05">
      <t><list style="symbols">
        <t>Submitted March 2018.</t>
	    <t>Update document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-04">
      <t><list style="symbols">
        <t>Submitted September 2017.</t>
	    <t>Update document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-03">
      <t><list style="symbols">
        <t>Submitted March 2017.</t>
	<t>Update document expiry timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-02">
      <t><list style="symbols">
        <t>Submitted October 2016.</t>
	<t>Add a comment that the distinguished-name encoding is 
	restricted to ASCII character encodings only.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-01">
      <t><list style="symbols">
        <t>Submitted October 2016.</t>
	<t>Update document timer.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-name-encoding-00">
      <t><list style="symbols">
        <t>Initial draft submitted April 2016.</t>
      </list></t>
    </section>

  </section>
</back>
</rfc>
