<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY RFC1918 SYSTEM "reference.RFC.1918.xml">
  <!ENTITY RFC2119 SYSTEM "reference.RFC.2119.xml">
  <!ENTITY RFC3552 SYSTEM "reference.RFC.3552.xml">
  <!ENTITY RFC1034 SYSTEM "reference.RFC.1034.xml">
  <!ENTITY RFC3261 SYSTEM "reference.RFC.3261.xml">
  <!ENTITY RFC2460 SYSTEM "reference.RFC.2460.xml">
  <!ENTITY RFC6830 SYSTEM "reference.RFC.6830.xml">
  <!ENTITY RFC6833 SYSTEM "reference.RFC.6833.xml">
  <!ENTITY RFC6835 SYSTEM "reference.RFC.6835.xml">
  <!ENTITY RFC7835 SYSTEM "reference.RFC.7835.xml">
  <!ENTITY RFC8060 SYSTEM "reference.RFC.8060.xml">
  <!ENTITY RFC8174 SYSTEM "reference.RFC.8174.xml">
]>

<rfc category="info" number="8112" submissionType="independent">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

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

<front>
  <title abbrev="LISP-DDT Referral Internet Groper (RIG)">Locator/ID Separation Protocol Delegated Database Tree (LISP-DDT) Referral Internet Groper (RIG)</title>

  <author fullname="Dino Farinacci" initials="D." surname="Farinacci">
  <organization>lispers.net</organization>
    <address>
      <postal>
        <street></street>
        <city>San Jose</city>
        <region>California</region>
        <code></code>
        <country>United States of America</country>
      </postal>
      <phone>408-718-2001</phone>
      <email>farinacci@gmail.com</email>
    </address>
  </author>

  <author fullname="Amit Jain" initials="A." surname="Jain">
  <organization>Juniper Networks</organization>
    <address>
      <postal>
        <street></street>
        <city>San Jose</city>
        <region>California</region>
        <code></code>
        <country>United States of America</country>
      </postal>
      <phone></phone>
      <email>atjain@juniper.net</email>
    </address>
  </author>

  <author fullname="Isidor Kouvelas" initials="I." surname="Kouvelas">
  <organization>Arista</organization>
    <address>
      <postal>
        <street></street>
        <city>Santa Clara</city>
        <region>California</region>
        <code></code>
        <country>United States of America</country>
      </postal>
      <phone></phone>
      <email>kouvelas@arista.com</email>
    </address>
  </author>

  <author fullname="Darrel Lewis" initials="D." surname="Lewis">
  <organization>Cisco Systems</organization>
    <address>
      <postal>
        <street>Tasman Ave.</street>
        <city>San Jose</city>
        <region>California</region>
        <code></code>
        <country>United States of America</country>
      </postal>
      <phone></phone>
      <email>darlewis@cisco.com</email>
    </address>
  </author>

  <date month="May" year="2017"/>

  <abstract>
    <t>A simple tool called the Locator/ID Separation Protocol Delegated
    Database Tree (LISP-DDT) Referral Internet Groper (RIG), also
    referred to in this document as "rig", can be used to query the
    LISP-DDT hierarchy.  This document describes how the "rig" tool works.</t>
  </abstract>
</front>

<middle>

  <section title="Introduction">
    <t>"The Locator/ID Separation Protocol (LISP)" <xref target="RFC6830"/>
    specifies an architecture and mechanism for replacing the semantics
    of an address currently used by IP with two separate namespaces:
    Endpoint Identifiers (EIDs), used within sites; and Routing Locators
    (RLOCs), used on the transit networks that make up the Internet
    infrastructure. To achieve this separation, LISP defines protocol
    mechanisms for mapping from EIDs to RLOCs.  In addition, LISP assumes
    the existence of a database to store and propagate those mappings
    globally. This document focuses on the LISP Delegated Database Tree
    (LISP-DDT) <xref target="RFC8111"/> mapping database system.</t>

    <t>The "rig" tool is a manual management tool to query the LISP-DDT
    mapping database hierarchy.  It can be run by all devices that
    implement LISP, including Ingress Tunnel Routers (ITRs),
    Egress Tunnel Routers (ETRs), Proxy ITRs (PITRs), Proxy ETRs (PETRs),
    Map&nbhy;Resolvers, Map-Servers, and LISP-DDT nodes, as well as by a
    host system at either a LISP-capable or non-LISP-capable site.</t>

    <t>The LISP-DDT "rig" tool is similar to the "LISP Internet Groper"
    ("lig") tool <xref target="RFC6835"/> in that they are both diagnostic
    tools to query a database.  However, the "rig"&nbsp;tool is used to
    find Map&nbhy;Servers serving an EID-prefix, specifically within a
    LISP-DDT mapping database framework. And "lig" can be used on top of
    any mapping database system to retrieve locators used for packet
    encapsulation.</t>
  </section>

  <section title="Requirements Language">

    <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
    "SHALL&nbsp;NOT", "SHOULD", "SHOULD&nbsp;NOT", "RECOMMENDED",
    "NOT&nbsp;RECOMMENDED", "MAY", and "OPTIONAL" in this document
    are to be interpreted as described in BCP&nbsp;14
    <xref format="default" pageno="false" target="RFC2119"/>
    <xref format="default" pageno="false" target="RFC8174"/> when,
    and only when, they appear in all capitals, as shown here.</t>

  </section>

  <section title="Definitions of Terms">
    <t><list style="hanging">
      <t hangText="Endpoint Identifier (EID):">a 32-bit (for IPv4)
      or 128-bit (for IPv6) value (or an address encoded per
      <xref target="RFC8060"/>) used in the source and destination
      address fields of the first (innermost) LISP header of a
      packet. The host obtains a destination EID the same way it
      obtains a destination address today -- for example, through a
      Domain Name System (DNS) <xref target="RFC1034" /> lookup or a
      Session Initiation Protocol (SIP) <xref target="RFC3261" />
      exchange.  The source EID is obtained via existing mechanisms
      used to set a host's "local" IP address. An EID used on the
      public Internet must have the same properties as any other IP
      address used in that manner; this means, among other things,
      that it must be globally unique. An EID is allocated to a host
      from an EID-prefix block associated with the site where the host
      is located.  An EID can be used by a host to refer to other
      hosts.  EIDs MUST NOT be used as LISP RLOCs. Note that EID
      blocks MAY be assigned in a hierarchical manner, independent of
      the network topology, to facilitate scaling of the mapping
      database. In addition, an EID block assigned to a site may have
      site-local structure (subnetting) for routing within the site;
      this structure is not visible to the global routing system. In
      theory, the bit string that represents an EID for one device can
      represent an RLOC for a different device.  As the architecture
      is realized, if a given bit string is both an RLOC and an EID,
      it must refer to the same entity in both cases.  When used in
      "discussions" with other Locator/ID separation proposals, a LISP
      EID will be called an "LEID". Throughout this document, any
      references to "EID" refer to an LEID.</t>

      <t hangText="Extended EID (XEID):">a LISP EID, optionally
      extended with a non-zero Instance ID (IID) if the EID is
      intended for use in a context where it may not be a unique
      value, such as in a Virtual Private Network where private
      address space <xref target="RFC1918"/> is used. See
      Section&nbsp;5.5 of <xref target="RFC6830"/> for more
      discussion of IIDs.</t>

      <t hangText="Routing Locator (RLOC):">an IPv4 <xref target="RFC791"/>
      or IPv6 <xref target="RFC2460" /> address of an Egress Tunnel
      Router (ETR). An RLOC is the output of an EID-to-RLOC mapping lookup.
      An EID maps to one or more RLOCs. Typically, RLOCs are numbered from
      topologically aggregatable blocks that are assigned to a site at
      each point to which it attaches to the global Internet; where
      the topology is defined by the connectivity of provider networks,
      RLOCs can be thought of as Provider-Assigned (PA) addresses.
      Multiple RLOCs can be assigned to the same ETR device or to
      multiple ETR devices at a site.</t>

      <t hangText="DDT node:">a network infrastructure component
      responsible for specific XEID-prefix(es) and for the delegation
      of more-specific sub-prefixes to other DDT nodes.</t>

      <t hangText="DDT client:">a network infrastructure component
      that sends DDT Map&nbhy;Request messages and implements the iterative
      following of Map&nbhy;Referral results.  Typically, a DDT client
      will be a Map&nbhy;Resolver (as defined by <xref target="RFC6833"/>),
      but it is also possible for an ITR to implement DDT client
      functionality. A DDT client can be a device that is originating
      "rig"&nbsp;requests.</t>

      <t hangText="DDT Map-Server:">a DDT node that also implements
      Map-Server functionality (forwarding Map-Requests and/or
      returning Map&nbhy;Replies if offering a proxy Map-Reply service)
      for a subset of its delegated prefixes. Map-Server functions,           
      including proxying Map&nbhy;Replies, are described in <xref
      target="RFC6833"/>.</t>

      <t hangText="DDT Map-Resolver:">a network infrastructure
      element that accepts a Map-Request, adds the XEID to its lookup
      queue, then queries one or more DDT nodes for the requested EID,
      following returned referrals until it receives one with the
      MS-ACK action code <xref target="RFC8111"/>. This indicates that the
      Map-Request has been sent to a Map-Server that will forward it to
      an ETR that, in turn, will provide a Map&nbhy;Reply to the original
      sender.  A DDT Map&nbhy;Resolver maintains both (1)&nbsp;a cache of
      Map-Referral message results (termed the "referral cache")
      containing RLOCs for DDT nodes responsible for XEID&nbhy;prefixes
      of interest and (2)&nbsp;a lookup queue of XEIDs that are being
      resolved through iterative querying of DDT nodes.</t>

      <t hangText="Encapsulated Map-Request:">a LISP Map-Request that is
      carried within an Encapsulated Control Message (ECM) and that has an
      additional LISP header prepended.  Sent to UDP destination port
      4342.  The "outer" addresses are globally routable IP addresses,
      also known as RLOCs.  Used by an ITR when sending a Map-Request
      to a Map&nbhy;Resolver and by a Map-Server when forwarding a Map-Request
      to an ETR as documented in <xref target="RFC6833" />.</t>

      <t hangText="Map-Referral:">a LISP message sent by a DDT node
      when it receives a DDT Map-Request for an XEID that matches a
      configured XEID-prefix delegation.  A non-Negative Map-Referral
      message includes a "referral" -- a set of RLOCs for DDT nodes that have
      more information about the sub-prefix; a DDT client "follows
      the referral" by sending another DDT Map-Request to one of those
      RLOCs to obtain either an answer or another referral to DDT
      nodes responsible for a more-specific XEID-prefix.</t>

      <t hangText="Authoritative XEID-prefix:">an XEID-prefix
      delegated to a DDT node and for which the DDT node may provide
      further delegations of more-specific sub-prefixes.</t>
    </list></t>
  </section>

  <section title="Basic Overview">
      <t>LISP-DDT <xref target="RFC8111"/> is a hierarchical
      distributed database that embodies the delegation of authority
      to provide mappings from LISP EIDs to RLOCs. It is a statically
      defined distribution of the EID namespace among a set of
      LISP-speaking servers called "DDT nodes". Each DDT node is
      configured as "authoritative" for one or more EID&nbhy;prefixes,
      along with the set of RLOCs for Map-Servers or "child" DDT nodes
      to which more-specific EID-prefixes are delegated.</t>

      <t>Map-Resolvers send Map-Requests to the DDT hierarchy and
      maintain referral caches by receiving Map-Referral messages from
      DDT nodes.  Map-Resolvers follow the DDT hierarchy for a given
      EID lookup based on the EID-prefix and delegation referrals
      contained in the Map&nbhy;Referral messages.  The "rig" tool is
      intended to perform the same operation as that of a Map-Resolver
      but to also be used as a management tool for the network
      administrator.</t>
     
      <t>When the "rig" command is run, an Encapsulated Control Message
      Map&nbhy;Request is sent for a destination EID.  When a LISP-DDT
      Map&nbhy;Referral is returned, the contents are displayed to the
      user.  The information displayed includes:</t>

    <t><list style="symbols">
      <t>A delegated EID-prefix configured in a DDT node or a
      configured site EID-prefix in a DDT Map-Server that matches the
      requested EID.</t>

      <t>The type of DDT node that sent the Map-Referral.</t>
      
      <t>The action code and TTL set by the sender of the Map-Referral.</t>
                
      <t>The referral RLOC addresses from the Map-Referral message.</t>

      <t>A round-trip-time estimate for the ECM-Map-Request / Map-Referral
      message exchange.</t>
    </list></t>

      <figure>
        <preamble>A possible syntax for a "rig" command MAY be:</preamble>
        <artwork><![CDATA[
rig [instance-id <iid>] <eid> to <ddt-node> [follow-all-referrals]
        ]]></artwork>
        <postamble />
      </figure>

    <t>Parameter descriptions:</t>
      <t><list style="hanging">
        <t hangText="[instance-id &lt;iid&gt;]:">&lt;iid&gt; is the
        IID portion of the XEID used as a VPN identifier or for other
        future purposes. When the DDT hierarchy is not configured with IIDs,
        this argument is omitted from the command line.</t>

        <t hangText="&lt;eid&gt;:">&lt;eid&gt; is either a
        Fully Qualified Domain Name or a destination EID that is being
        queried in the LISP-DDT mapping database.</t>

        <t hangText="&lt;ddt-node&gt;:">&lt;ddt-node&gt; is the
        RLOC address of any DDT node in the DDT hierarchy. This can be
        the DDT root node, a DDT transit node, or a DDT Map&nbhy;Server.</t>

        <t hangText="[follow-all-referrals]:">When this keyword is
        used, each referral RLOC is queried so "rig" can descend the
        entire DDT hierarchy starting from the node &lt;ddt-node&gt;.
        When this keyword is not used, one of the referral RLOCs will be
        selected to descend a branch of the DDT hierarchy.</t>
      </list></t>

      <t>The "rig" utility not only shows branches of the delegation
      hierarchy but can also report:</t>

      <t><list style="symbols">
        <t>When a DDT Map-Server would forward a Map-Request to the
        ETRs at a registered LISP site. This is known as an "MS&nbhy;ACK"
        action.</t>
   
        <t>When a DDT Map-Server sends a Negative Map-Referral indicating that
        a requested EID is configured but not registered to the mapping
        database system. This is known as an "MS-NOT-REGISTERED" action.</t>
   
        <t>When a DDT node is sending referrals for a transit or leaf
        node in the hierarchy. These are known as
        "NODE-REFERRAL" and "MS&nbhy;REFERRAL" actions, respectively.</t>
	
        <t>When a DDT node finds a hole in the address space that has not
	been allocated or configured in the delegation hierarchy. This is
        typically associated with a hole in a DDT node's configured 
        authoritative prefix. This is known as a "DELEGATION-HOLE" action.</t>

	<t>When a DDT node finds a hole in the address space that has not
        been allocated or configured in the delegation hierarchy at all. This
        is typically associated with a hole that is outside of a DDT node's
        authoritative prefix. This is known as a "NOT&nbhy;AUTHORITATIVE"
        action.</t>
     </list></t>

      <t>Refer to <xref target="RFC8111"/> for more details about
      Map-Referral actions.</t>
  </section>

  <section title="Implementation Details">
    <t>The Cisco LISP prototype implementations on IOS and NX-OS have
    "rig" support for IPv4 and IPv6 EIDs in either the default instance or 
    a non-zero IID.</t>
    
    <figure>
     <preamble>The IOS syntax is:</preamble>
       <artwork><![CDATA[
rig [instance-id <iid>] <eid> to <ddt-node> [follow-all-referrals]
       ]]></artwork>
       <postamble />
    </figure>

    <figure>
     <preamble>The NX-OS syntax is:</preamble>
       <artwork><![CDATA[
rig [instance-id <iid>] { <hostname> | {<eid> | <eid6>} }
                        to { <ddt-hostname> | {<ddt> | <ddt6>} }
       ]]></artwork>
       <postamble />
    </figure>

    <t>Here is some sample IOS output:</t>

    <figure>
     <preamble>Router# rig 12.0.1.1 to 1.1.1.1</preamble>
       <artwork><![CDATA[
Send Map-Request to DDT-node 1.1.1.1 ... node referral, rtt: 0 ms
EID-prefix: [0] 12.0.0.0/16, ttl: 1440
referrals: 2.2.2.2

Send Map-Request to DDT-node 2.2.2.2 ... node referral, rtt: 0 ms
EID-prefix: [0] 12.0.1.0/24, ttl: 1440
referrals: 4.4.4.4, 5.5.5.5

Send Map-Request to DDT-node 4.4.4.4 ... map-server acknowledgement, 
                                         rtt: 0 ms
EID-prefix: [0] 12.0.1.0/28, ttl: 1440
referrals: 4.4.4.4, 5.5.5.5
       ]]></artwork>
       <postamble />
    </figure>

    <figure>
     <preamble>Router# rig 12.0.1.1 to 1.1.1.1 follow-all-referrals</preamble>
       <artwork><![CDATA[
Send Map-Request to DDT-node 1.1.1.1 ... node referral, rtt: 4 ms
EID-prefix: [0] 12.0.0.0/16, ttl: 1440
referrals: 2.2.2.2

Send Map-Request to DDT-node 2.2.2.2 ... node referral, rtt: 0 ms
EID-prefix: [0] 12.0.1.0/24, ttl: 1440
referrals: 4.4.4.4, 5.5.5.5

Send Map-Request to DDT-node 4.4.4.4 ... map-server acknowledgement, 
                                         rtt: 0 ms
EID-prefix: [0] 12.0.1.0/28, ttl: 1440
referrals: 4.4.4.4, 5.5.5.5

Send Map-Request to DDT-node 5.5.5.5 ... map-server acknowledgement, 
                                         rtt: 0 ms
EID-prefix: [0] 12.0.1.0/28, ttl: 1440
referrals: 4.4.4.4, 5.5.5.5

No more referrals to pursue.
       ]]></artwork>
       <postamble />
    </figure>

    <t>Here is some sample NX-OS output:</t>
    <figure>
     <preamble>Router# rig 12.0.1.1 to 1.1.1.1</preamble>
       <artwork><![CDATA[
rig LISP-DDT hierarchy for EID [0] 12.0.1.1
Send Map-Request to DDT-node 1.1.1.1 ... replied, rtt: 0.003509 secs
EID-prefix [0] *, ttl: 1440, action: node-referral, referrals:
  2.2.2.2, priority/weight: 0/0

Send Map-Request to DDT-node 2.2.2.2 ... replied, rtt: 0.003173 secs
EID-prefix [0] 12.0.0.0/20, ttl: 1440, action: node-referral, 
  referrals:
  3.3.3.3, priority/weight: 0/0

Send Map-Request to DDT-node 3.3.3.3 ... replied, rtt: 0.004145 secs
EID-prefix [0] 12.0.1.0/24, ttl: 1440, action: node-referral, 
  referrals:
  5.5.5.5, priority/weight: 0/0
  6.6.6.6, priority/weight: 0/0

Send Map-Request to DDT-node 6.6.6.6 ... replied, rtt: 0.005800 secs
EID-prefix [0] 12.0.1.0/28, ttl: 1440, action: ms-ack, referrals:
  5.5.5.5, priority/weight: 0/0
  6.6.6.6, priority/weight: 0/0
       ]]></artwork>
       <postamble />
    </figure>
  </section>

  <section title="Security Considerations">
     <t>The use of "rig" does not affect the security of the LISP
     infrastructure, as it is simply a tool that facilitates diagnostic
     querying. See <xref target="RFC6830"/>, <xref target="RFC6833"/>,
     <xref target="RFC7835"/>, and <xref target="RFC8111"/> for
     descriptions of the security properties of the LISP infrastructure.</t>

     <t>LISP "rig" provides easy access to the information in the public
     mapping database. Therefore, it is important to protect the
     mapping information for private use. This can be provided by
     disallowing access to specific mapping entries or placing such
     entries in a private mapping database system.</t>
  </section>

  <section title="IANA Considerations">
    <t>This document does not require any IANA actions.</t>
  </section>

</middle>

<back>
  <references title="Normative References">

<reference anchor='RFC791' target='http://www.rfc-editor.org/info/rfc791'>
<front>
<title>Internet Protocol</title>
<author initials='J.' surname='Postel' fullname='J. Postel'><organization /></author>
<date year='1981' month='September' />
</front>
<seriesInfo name='STD' value='5'/>
<seriesInfo name='RFC' value='791'/>
<seriesInfo name='DOI' value='10.17487/RFC0791'/>
</reference>

      &RFC2119;
      &RFC1034;
      &RFC6830;
      &RFC6833;
      &RFC6835;

<!-- draft-ietf-lisp-ddt (RFC 8111) -->
  <reference anchor='RFC8111' target="http://www.rfc-editor.org/info/rfc8111">
   <front>
   <title>Locator/ID Separation Protocol Delegated Database Tree (LISP-DDT)</title>
   <author initials='V' surname='Fuller' fullname='Vince Fuller'>
    <organization />
   </author>
   <author initials='D' surname='Lewis' fullname='Darrel Lewis'>
    <organization />
   </author>
   <author initials='V' surname='Ermagan' fullname='Vina Ermagan'>
    <organization />
   </author>
   <author initials='A' surname='Jain' fullname='Amit Jain'>
    <organization />
   </author>
   <author initials='A' surname='Smirnov' fullname='Anton Smirnov'>
    <organization />
   </author>
   <date month='May' year='2017' />
   </front>
   <seriesInfo name="RFC" value="8111"/>
   <seriesInfo name="DOI" value="10.17487/RFC8111"/>
   </reference>

      &RFC8174;

  </references>

  <references title="Informative References">
      &RFC1918;
      &RFC2460;
      &RFC3261;

<!-- RFC 7835 (draft-ietf-lisp-threats) (published) -->
      &RFC7835;

<!-- RFC 8060 (draft-ietf-lisp-lcaf) (published) -->
      &RFC8060;
  </references>

  <section title="Acknowledgments" numbered="no">
    <t>The authors would like to thank Damien Saucez and Fabio Maino
    for their ideas and comments. Appreciation also goes to Joel Halpern,
    Luigi Iannone, and Nevil Brownlee for their help with this document.
    </t>
  </section>
</back>
</rfc>
