<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<rfc category="std" ipr="trust200902" docName="draft-ietf-lisp-rfc6830bis-36"
     obsoletes="6830">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle="yes"?>

<front>
    <title abbrev="LISP">The Locator/ID Separation Protocol (LISP)</title>
	<author initials='D' surname="Farinacci" fullname='Dino Farinacci'>
        <organization>lispers.net</organization>
        <address>
        <email>farinacci@gmail.com</email></address>
    </author>

    <author initials='V' surname="Fuller" fullname='Vince Fuller'>
      <organization>vaf.net Internet Consulting</organization>
      <address>
        <email>vince.fuller@gmail.com</email></address>

    </author>

    <author initials='D' surname="Meyer" fullname='Dave Meyer'>
        <organization>1-4-5.net</organization>
        <address>
        <email>dmm@1-4-5.net</email></address>
    </author>

    <author initials='D' surname="Lewis" fullname='Darrel Lewis'>
        <organization>Cisco Systems</organization>
        <address><postal>
            <street>170 Tasman Drive</street>
            <city>San Jose</city> <region>CA</region>
            <country>USA</country>
          </postal>
        <email>darlewis@cisco.com</email></address>
    </author>

    <author initials='A' surname="Cabellos (Ed.)" fullname='Albert Cabellos'>
            <organization>UPC/BarcelonaTech</organization>
            <address><postal>
                <street>Campus Nord, C. Jordi Girona 1-3</street>
                <city>Barcelona</city> <region>Catalunya</region>
                <country>Spain</country>
              </postal>
            <email>acabello@ac.upc.edu</email></address>
        </author>

    <date />

    <abstract>
      <t>This document describes the Data-Plane protocol for the
      Locator/ID Separation Protocol (LISP). LISP defines two
      namespaces, End-point Identifiers (EIDs) that identify end-hosts
      and Routing Locators (RLOCs) that identify network attachment
      points. With this, LISP effectively separates control from data,
      and allows routers to create overlay networks. LISP-capable
      routers exchange encapsulated packets according to EID-to-RLOC
      mappings stored in a local Map-Cache.</t>

      <t>LISP requires no change to either host protocol stacks or
      to underlay routers and offers Traffic Engineering,
      multihoming and mobility, among other features.</t>

      <t>This document obsoletes RFC 6830.</t>
    </abstract>
</front>

<middle>

<section title="Introduction">
  <t>This document describes the Locator/Identifier Separation
  Protocol (LISP). LISP is an encapsulation protocol built around the
  fundamental idea of separating the topological location of a network
  attachment point from the node's identity <xref target="CHIAPPA"
  />. As a result LISP creates two namespaces: Endpoint Identifiers
  (EIDs), that are used to identify end-hosts (e.g., nodes or Virtual
  Machines) and routable Routing Locators (RLOCs), used to identify
  network attachment points.  LISP then defines functions for mapping
  between the two namespaces and for encapsulating traffic
  originated by devices using non-routable EIDs for transport across a
  network infrastructure that routes and forwards using RLOCs. LISP
  encapsulation uses a dynamic form of tunneling where no static provisioning
  is required or necessary.</t>

  <t>LISP is an overlay protocol that separates control from
  Data-Plane, this document specifies the Data-Plane as well as how LISP-capable
  routers (Tunnel Routers) exchange packets by encapsulating them to
  the appropriate location. Tunnel routers are equipped with a cache,
  called Map-Cache, that contains EID-to-RLOC mappings.  The Map-Cache
  is populated using the LISP Control-Plane protocol <xref
  target="I-D.ietf-lisp-rfc6833bis"/>.</t>

  <t>LISP does not require changes to either the host protocol stack or to
  underlay routers. By separating the EID from the RLOC space, LISP
  offers native Traffic Engineering, multihoming and mobility, among
  other features.</t>

  <t>Creation of LISP was initially motivated by discussions during
  the IAB-sponsored Routing and Addressing Workshop held in Amsterdam
  in October 2006 (see <xref target="RFC4984" />).</t>

  <t>This document specifies the LISP Data-Plane encapsulation and
  other LISP forwarding node functionality while <xref
  target="I-D.ietf-lisp-rfc6833bis"/> specifies the LISP control
  plane. LISP deployment guidelines can be found in <xref
  target="RFC7215"/> and <xref target="RFC6835"/> describes
  considerations for network operational management.  Finally, <xref
  target="I-D.ietf-lisp-introduction"/> describes the LISP architecture.</t>

  <t>This document obsoletes RFC 6830.</t>

  <section title="Scope of Applicability" anchor="soa">
    <t>LISP was originally developed to address the Internet-wide
    route scaling problem <xref target="RFC4984"/>.  While there are a
    number of approaches of interest for that problem, as LISP as been
    developed and refined, a large number of other LISP uses have been
    found and are being used.  As such, the design and development of
    LISP has changed so as to focus on these use cases. The common
    property of these uses is a large set of cooperating entities
    seeking to communicate over the public Internet or other large
    underlay IP infrastructures, while keeping the addressing and
    topology of the cooperating entities separate from the underlay
    and Internet topology, routing, and addressing.</t>

  </section>
</section>

<section title="Requirements Notation">
  <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
  NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
  "MAY", and "OPTIONAL" in this document are to be interpreted as
  described in BCP 14 <xref target="RFC2119"/> <xref
  target="RFC8174"/> when, and only when, they appear in all capitals,
  as shown here.</t>
</section>

<section title="Definition of Terms" anchor="DEFINITIONS">
  <t><list style="hanging">

    <t hangText="Address Family Identifier (AFI): ">AFI is a term used
    to describe an address encoding in a packet. An address family
    that pertains to addresses found in Data-Plane headers. See <xref
    target="AFN"/> and <xref target="RFC3232"/> for details. An AFI
    value of 0 used in this specification indicates an unspecified
    encoded address where the length of the address is 0 octets
    following the 16-bit AFI value of 0.</t>

    <t hangText="Anycast Address:">Anycast Address refers to the same
      IPv4 or IPv6 address configured
    and used on multiple systems at the same time. An EID or RLOC can
    be an anycast address in each of their own address spaces.</t>

    <t hangText="Client-side:">Client-side is a term used in this
    document to indicate a connection initiation attempt by an end-system
    represented by an EID.</t>

    <t hangText="Egress Tunnel Router (ETR): ">An ETR is a router that
    accepts an IP packet where the destination address in the "outer"
    IP header is one of its own RLOCs. The router strips the "outer"
    header and forwards the packet based on the next IP header
    found. In general, an ETR receives LISP-encapsulated IP packets
    from the Internet on one side and sends decapsulated IP packets to
    site end-systems on the other side. ETR functionality does not
    have to be limited to a router device.  A server host can be the
    endpoint of a LISP tunnel as well.</t>

    <t hangText="EID-to-RLOC Database: ">The EID-to-RLOC Database is a
    distributed database that contains all known EID-Prefix-to-RLOC
    mappings.  Each potential ETR typically contains a small piece of
    the database: the EID-to-RLOC mappings for the EID-Prefixes
    "behind" the router. These map to one of the router's own IP
    addresses that are routable on the underlay.

    Note that there MAY be transient conditions when the EID-Prefix
    for the LISP site and Locator-Set for each EID-Prefix may not be the
    same on all ETRs. This has no negative implications, since a
    partial set of Locators can be used.</t>



    <t hangText="EID-to-RLOC Map-Cache: ">The EID-to-RLOC Map-Cache is
    generally short-lived, on-demand table in an ITR that stores, tracks, and
    is responsible for timing out and otherwise validating EID-to-RLOC
    mappings. This cache is distinct from the full "database" of
    EID-to-RLOC mappings; it is dynamic, local to the ITR(s), and
    relatively small, while the database is distributed, relatively
    static, and much more widely scoped to LISP nodes.</t>

    <t hangText="EID-Prefix: ">An EID-Prefix is a power-of-two block
    of EIDs that are allocated to a site by an address allocation
    authority.  EID-Prefixes are associated with a set of RLOC
    addresses. EID-Prefix allocations can be broken up into smaller
    blocks when an RLOC set is to be associated with the larger
    EID-Prefix block.</t>

    <t hangText="End-System: ">An end-system is an IPv4 or IPv6 device
    that originates packets with a single IPv4 or IPv6 header. The
    end-system supplies an EID value for the destination address field
    of the IP header when communicating outside of its routing domain.
    An end-system can be a host computer, a switch or router device,
    or any network appliance.</t>

    <t hangText="Endpoint ID (EID): ">An EID is a 32-bit (for IPv4) or
    128-bit (for IPv6) value that identifies a host. EIDs are generally
    only found in the source and destination
    address fields of the first (most inner) 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 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
    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. 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 underlay routing system. In theory, the bit
    string that represents an EID for one device can represent an RLOC
    for a different device. 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="Ingress Tunnel Router (ITR): ">An ITR is a router
    that resides in a LISP site. Packets sent by sources inside of the
    LISP site to destinations outside of the site are candidates for
    encapsulation by the ITR. The ITR treats the IP destination
    address as an EID and performs an EID-to-RLOC mapping lookup. The
    router then prepends an "outer" IP header with one of its routable
    RLOCs (in the RLOC space) in the source address field and the
    result of the mapping lookup in the destination address field.
    Note that this destination RLOC may be an intermediate, proxy
    device that has better knowledge of the EID-to-RLOC mapping closer
    to the destination EID. In general, an ITR receives IP packets
    from site end-systems on one side and sends LISP-encapsulated IP
    packets toward the Internet on the other side.</t>

    <t hangText="LISP Header: ">LISP header is a term used in this
    document to refer to the outer IPv4 or IPv6 header, a UDP header,
    and a LISP-specific 8-octet header that follow the UDP header and
    that an ITR prepends or an ETR strips.</t>

    <t hangText="LISP Router: ">A LISP router is a router that
    performs the functions of any or all of the following: ITR, ETR, RTR,
    Proxy-ITR (PITR), or Proxy-ETR (PETR).</t>

    <t hangText="LISP Site:">LISP site is a set of routers in an edge
    network that are under a single technical administration. LISP
    routers that reside in the edge network are the demarcation points
    to separate the edge network from the core network.</t>

    <t hangText="Locator-Status-Bits (LSBs):"> Locator-Status-Bits are
    present in the LISP header. They are used by ITRs to inform ETRs
    about the up/down status of all ETRs at the local site. These bits
    are used as a hint to convey up/down router status and not path
    reachability status. The LSBs can be verified by use of one of the
    Locator reachability algorithms described in <xref
    target="loc-reach" />. An ETR MUST rate-limit the action it takes
    when it detects changes in the Locator-Status-Bits.</t>

    <t hangText="Proxy-ETR (PETR): ">A PETR is defined and described
    in <xref target="RFC6832" />. A PETR acts like an ETR but does so
    on behalf of LISP sites that send packets to destinations at
    non-LISP sites.</t>

    <t hangText="Proxy-ITR (PITR): ">A PITR is defined and described
    in <xref target="RFC6832" />. A PITR acts like an ITR but does so
    on behalf of non-LISP sites that send packets to destinations at
    LISP sites.</t>

    <t hangText="Recursive Tunneling: ">Recursive Tunneling occurs
    when a packet has more than one LISP IP header. Additional layers
    of tunneling MAY be employed to implement Traffic Engineering or
    other re-routing as needed. When this is done, an additional
    "outer" LISP header is added, and the original RLOCs are preserved
    in the "inner" header.</t>

    <t hangText="Re-Encapsulating Tunneling Router (RTR): ">
    An RTR acts like an ETR to remove a LISP header, then acts as an
    ITR to prepend a new LISP header. This is known as
    Re-encapsulating Tunneling. Doing this allows a packet to be
    re-routed by the RTR without adding the overhead of additional
    tunnel headers. When using multiple mapping database systems, care
    must be taken to not create re- encapsulation loops through
    misconfiguration.</t>

    <t hangText="Route-Returnability:">Route-returnability is an
    assumption that the underlying routing system will deliver packets
    to the destination. When combined with a nonce that is provided by
    a sender and returned by a receiver, this limits off-path data
    insertion. A route-returnability check is verified when a message
    is sent with a nonce, another message is returned with the same
    nonce, and the destination of the original message appears as the
    source of the returned message.</t>

    <t hangText="Routing Locator (RLOC): ">An RLOC is an IPv4 <xref
    target="RFC0791" /> or IPv6 <xref target="RFC8200" /> address of
    an Egress Tunnel Router (ETR). An RLOC is the output of an
    EID-to-RLOC mapping lookup. An EID maps to zero or more
    RLOCs. Typically, RLOCs are numbered from blocks that
    are assigned to a site at each point to which it attaches to the
    underlay network; where the topology is defined by the connectivity
    of provider networks. Multiple RLOCs can be assigned to the same
    ETR device or to multiple ETR devices at a site.</t>

    <t hangText="Server-side:">Server-side is a term used in this
    document to indicate that a connection initiation attempt is being
    accepted for a destination EID.</t>

    <t hangText="xTR: ">An xTR is a reference to an ITR or ETR when
    direction of data flow is not part of the context description.
    "xTR" refers to the router that is the tunnel endpoint and is used
    synonymously with the term "Tunnel Router". For example, "An xTR
    can be located at the Customer Edge (CE) router" indicates both
    ITR and ETR functionality at the CE router.</t>

  </list></t>
</section>

<section title="Basic Overview" anchor="OVERVIEW">
  <t>One key concept of LISP is that end-systems operate the same way
  they do today. The IP addresses that hosts use for tracking sockets
  and connections, and for sending and receiving packets, do not
  change. In LISP terminology, these IP addresses are called Endpoint
  Identifiers (EIDs).</t>

  <t>Routers continue to forward packets based on IP destination
  addresses. When a packet is LISP encapsulated, these addresses are
  referred to as Routing Locators (RLOCs). Most routers along a path
  between two hosts will not change; they continue to perform
  routing/forwarding lookups on the destination addresses. For routers
  between the source host and the ITR as well as routers from the ETR
  to the destination host, the destination address is an EID. For the
  routers between the ITR and the ETR, the destination address is an
  RLOC.</t>

  <t>Another key LISP concept is the "Tunnel Router". A Tunnel Router
  prepends LISP headers on host-originated packets and strips them
  prior to final delivery to their destination. The IP addresses in
  this &quot;outer header&quot; are RLOCs. During end-to-end packet
  exchange between two Internet hosts, an ITR prepends a new LISP
  header to each packet, and an ETR strips the new header. The ITR
  performs EID-to-RLOC lookups to determine the routing path to the
  ETR, which has the RLOC as one of its IP addresses. </t>

  <t>Some basic rules governing LISP are:</t>
    <t><list style="symbols">
      <t>End-systems only send to addresses that are EIDs.  EIDs are
      typically IP addresses assigned to hosts (other types of EID are
      supported by LISP, see <xref target="RFC8060"/> for further
      information). End-systems don't know that addresses are EIDs
      versus RLOCs but assume that packets get to their intended
      destinations.  In a system where LISP is deployed, LISP routers
      intercept EID-addressed packets and assist in delivering them
      across the network core where EIDs cannot be routed.  The
      procedure a host uses to send IP packets does not change.</t>

      <t>LISP routers mostly deal with Routing Locator addresses.  See
      details in <xref target="MOSTLY" /> to clarify what is meant by
      &quot;mostly&quot;.</t>

      <t>RLOCs are always IP addresses assigned to routers, preferably
      topologically oriented addresses from provider CIDR (Classless
      Inter-Domain Routing) blocks. </t>

      <t>When a router originates packets, it MAY use as a source
      address either an EID or RLOC. When acting as a host (e.g., when
      terminating a transport session such as Secure SHell (SSH),
      TELNET, or the Simple Network Management Protocol (SNMP)), it
      MAY use an EID that is explicitly assigned for that purpose. An
      EID that identifies the router as a host MUST NOT be used as an
      RLOC; an EID is only routable within the scope of a site.  A
      typical BGP configuration might demonstrate this "hybrid"
      EID/RLOC usage where a router could use its "host-like" EID to
      terminate iBGP sessions to other routers in a site while at the
      same time using RLOCs to terminate eBGP sessions to routers
      outside the site.</t>

      <t>Packets with EIDs in them are not expected to be delivered
      end-to-end in the absence of an EID-to-RLOC mapping
      operation. They are expected to be used locally for intra-site
      communication or to be encapsulated for inter-site
      communication.</t>

      <t>EIDs MAY also be structured (subnetted) in a manner suitable
      for local routing within an Autonomous System (AS).</t>
    </list></t>

    <t>An additional LISP header MAY be prepended to packets by a
    TE-ITR when re-routing of the path for a packet is desired. A
    potential use-case for this would be an ISP router that needs to
    perform Traffic Engineering for packets flowing through its
    network. In such a situation, termed "Recursive Tunneling", an ISP
    transit acts as an additional ITR, and the destination RLOC it
    uses for the new prepended header would be either a TE-ETR within
    the ISP (along an intra-ISP traffic engineered path) or a TE-ETR
    within another ISP (an inter-ISP traffic engineered path, where an
    agreement to build such a path exists). </t>

    <t>In order to avoid excessive packet overhead as well as possible
    encapsulation loops, this document RECOMMENDS that a maximum of two
    LISP headers can be prepended to a packet. For initial LISP
    deployments, it is assumed that two headers is sufficient, where
    the first prepended header is used at a site for Location/Identity
    separation and the second prepended header is used inside a
    service provider for Traffic Engineering purposes.</t>

    <t>Tunnel Routers can be placed fairly flexibly in a multi-AS
    topology. For example, the ITR for a particular end-to-end packet
    exchange might be the first-hop or default router within a site
    for the source host. Similarly, the ETR might be the last-hop
    router directly connected to the destination host. Another
    example, perhaps for a VPN service outsourced to an ISP by a site,
    the ITR could be the site&apos;s border router at the service
    provider attachment point. Mixing and matching of site-operated,
    ISP-operated, and other Tunnel Routers is allowed for maximum
    flexibility. </t>

    <section title="Deployment on the Public Internet" anchor="DPI">
         <t>Several of the mechanisms in this document are intended for deployment in controlled,
           trusted environments, and are insecure for use over the public Internet.
           In particular, on the public internet xTRs:</t>

           <t><list style="symbols">
             <t>MUST set the N, L, E, and V bits in the LISP header (<xref target="header"/>) to zero.</t>
             <t>MUST NOT use Locator-Status-Bits and echo-nonce, as described in <xref target="loc-reach"/> for Routing Locator Reachability.
             Instead MUST rely solely on control-plane methods.</t>
             <t>MUST NOT use Gleaning or Locator-Status-Bits and Map-Versioning, as described in <xref target="update_mapping"/> to update the EID-to-RLOC Mappings.
               Instead relying solely on control-plane methods.</t>
             </list></t>

    </section>

    <section title="Packet Flow Sequence" anchor="MOSTLY">
      <t>This section provides an example of the unicast packet flow,
      including also Control-Plane information as specified in <xref
      target="I-D.ietf-lisp-rfc6833bis"/>.  The example also assumes
      the following conditions:</t>

      <t><list style="symbols">
        <t>Source host &quot;host1.abc.example.com&quot; is sending a
        packet to &quot;host2.xyz.example.com&quot;, exactly as it would if the site was not
        not using LISP.</t>

        <t>Each site is multihomed, so each Tunnel Router has an
        address (RLOC) assigned from the service provider address
        block for each provider to which that particular Tunnel Router
        is attached.</t>

        <t>The ITR(s) and ETR(s) are directly connected to the source
        and destination, respectively, but the source and destination
        can be located anywhere in the LISP site.</t>

        <t>A Map-Request is sent for an external destination when the
        destination is not found in the forwarding table or matches a
        default route. Map-Requests are sent to the mapping database
        system by using the LISP Control-Plane protocol documented in
        <xref target="I-D.ietf-lisp-rfc6833bis"/>.</t>

        <t>Map-Replies are sent on the underlying routing system
        topology using the <xref target="I-D.ietf-lisp-rfc6833bis"/>
        Control-Plane protocol.</t>
       </list></t>

       <t>Client host1.abc.example.com wants to communicate with
       server host2.xyz.example.com:</t>

       <t><list style="numbers">

         <t>host1.abc.example.com wants to open a TCP connection to
         host2.xyz.example.com. It does a DNS lookup on
         host2.xyz.example.com. An A/AAAA record is returned. This
         address is the destination EID. The locally assigned address
         of host1.abc.example.com is used as the source EID. An IPv4
         or IPv6 packet is built and forwarded through the LISP site
         as a normal IP packet until it reaches a LISP ITR.</t>

         <t>The LISP ITR must be able to map the destination EID to an
         RLOC of one of the ETRs at the destination site. A method
         to do this is to send a LISP Map-Request, as specified in
         <xref target="I-D.ietf-lisp-rfc6833bis"/>.</t>

         <t>The mapping system helps forwarding the Map-Request to the
         corresponding ETR. When the Map-Request arrives at one of the
         ETRs at the destination site, it will process the packet as a
         control message.</t>

         <t>The ETR looks at the destination EID of the Map-Request
         and matches it against the prefixes in the ETR's configured
         EID-to-RLOC mapping database.  This is the list of
         EID-Prefixes the ETR is supporting for the site it resides
         in. If there is no match, the Map-Request is
         dropped. Otherwise, a LISP Map-Reply is returned to the
         ITR.</t>

         <t>The ITR receives the Map-Reply message, parses the message,
		 and stores the mapping information from the packet. This information
		 is stored in the ITR&apos;s EID-to-RLOC Map-Cache.  Note that the
         Map-Cache is an on-demand cache. An ITR will manage its
         Map-Cache in such a way that optimizes for its resource
         constraints.</t>

         <t>Subsequent packets from host1.abc.example.com to
         host2.xyz.example.com will have a LISP header prepended by
         the ITR using the appropriate RLOC as the LISP header
         destination address learned from the ETR. Note that the
         packet MAY be sent to a different ETR than the one that
         returned the Map-Reply due to the source site's hashing
         policy or the destination site's Locator-Set policy.</t>

         <t>The ETR receives these packets directly (since the
         destination address is one of its assigned IP addresses),
         checks the validity of the addresses, strips the LISP header,
         and forwards packets to the attached destination host.</t>

         <t>In order to defer the need for a mapping lookup in the
         reverse direction, an ETR can OPTIONALLY create a cache entry
         that maps the source EID (inner-header source IP address) to
         the source RLOC (outer-header source IP address) in a
         received LISP packet. Such a cache entry is termed a
         "glean mapping" and only contains a single RLOC for the EID
         in question.  More complete information about additional
         RLOCs SHOULD be verified by sending a LISP Map-Request for
         that EID. Both the ITR and the ETR MAY also influence the
         decision the other makes in selecting an RLOC.</t>
       </list></t>
     </section>
  </section>

  <section title="LISP Encapsulation Details">
    <t>Since additional tunnel headers are prepended, the packet
    becomes larger and can exceed the MTU of any link traversed from
    the ITR to the ETR.  It is RECOMMENDED in IPv4 that packets do not
    get fragmented as they are encapsulated by the ITR. Instead, the
    packet is dropped and an ICMP Unreachable/Fragmentation-Needed
    message is returned to the source.</t>

    <t>In the case when fragmentation is needed, this specification
    RECOMMENDS that implementations provide support for one of the
    proposed fragmentation and reassembly schemes. Two existing
    schemes are detailed in <xref target="fragment" />.</t>

    <t>Since IPv4 or IPv6 addresses can be either EIDs or RLOCs, the
    LISP architecture supports IPv4 EIDs with IPv6 RLOCs (where the
    inner header is in IPv4 packet format and the outer header is in
    IPv6 packet format) or IPv6 EIDs with IPv4 RLOCs (where the inner
    header is in IPv6 packet format and the outer header is in IPv4
    packet format). The next sub-sections illustrate packet formats
    for the homogeneous case (IPv4-in-IPv4 and IPv6-in-IPv6), but all
    4 combinations MUST be supported. Additional types of EIDs are
    defined in <xref target="RFC8060" />.</t>

    <t>As LISP uses UDP encapsulation to carry traffic between xTRs
    across the Internet, implementors should be aware of the
    provisions of <xref target="RFC8085"/>, especially those given in
    section 3.1.11 on congestion control for UDP tunneling.</t>

    <t>Implementors are encouraged to consider UDP checksum usage
    guidelines in section 3.4 of <xref target="RFC8085"/> when it is
    desirable to protect UDP and LISP headers against corruption.</t>

    <section title="LISP IPv4-in-IPv4 Header Format" anchor="header">
        <figure> <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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  / |Version|  IHL  |    DSCP   |ECN|          Total Length         |
 /  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   |         Identification        |Flags|      Fragment Offset    |
|   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
OH  |  Time to Live | Protocol = 17 |         Header Checksum       |
|   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   |                    Source Routing Locator                     |
 \  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  \ |                 Destination Routing Locator                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  / |       Source Port = xxxx      |       Dest Port = 4341        |
UDP +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  \ |           UDP Length          |        UDP Checksum           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
L   |N|L|E|V|I|R|K|K|            Nonce/Map-Version                  |
I \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
S / |                 Instance ID/Locator-Status-Bits               |
P   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  / |Version|  IHL  |    DSCP   |ECN|          Total Length         |
 /  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   |         Identification        |Flags|      Fragment Offset    |
|   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IH  |  Time to Live |    Protocol   |         Header Checksum       |
|   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   |                           Source EID                          |
 \  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  \ |                         Destination EID                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    IHL = IP-Header-Length
        ]]></artwork> </figure>
      </section>

      <section title="LISP IPv6-in-IPv6 Header Format">
        <figure> <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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  / |Version|    DSCP   |ECN|           Flow Label                  |
 /  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   |         Payload Length        | Next Header=17|   Hop Limit   |
v   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
O   +                                                               +
u   |                                                               |
t   +                     Source Routing Locator                    +
e   |                                                               |
r   +                                                               +
    |                                                               |
H   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
d   |                                                               |
r   +                                                               +
    |                                                               |
^   +                  Destination Routing Locator                  +
|   |                                                               |
 \  +                                                               +
  \ |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  / |       Source Port = xxxx      |       Dest Port = 4341        |
UDP +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  \ |           UDP Length          |        UDP Checksum           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
L   |N|L|E|V|I|R|K|K|            Nonce/Map-Version                  |
I \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
S / |                 Instance ID/Locator-Status-Bits               |
P   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  / |Version|    DSCP   |ECN|           Flow Label                  |
 /  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/   |         Payload Length        |  Next Header  |   Hop Limit   |
v   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
I   +                                                               +
n   |                                                               |
n   +                          Source EID                           +
e   |                                                               |
r   +                                                               +
    |                                                               |
H   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
d   |                                                               |
r   +                                                               +
    |                                                               |
^   +                        Destination EID                        +
\   |                                                               |
 \  +                                                               +
  \ |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork> </figure>

      </section>

      <section title="Tunnel Header Field Descriptions" anchor="LRB" >
          <t><list style="hanging"> <t hangText="Inner Header
          (IH):">The inner header is the header on the datagram
          received from the originating host <xref target="RFC0791" />
          <xref target="RFC8200" /> <xref target="RFC2474"/>. The
          source and destination IP addresses are EIDs.</t>

          <t hangText="Outer Header: (OH)">The outer header is a new
          header prepended by an ITR. The address fields contain RLOCs
          obtained from the ingress router's EID-to-RLOC Cache. The IP
          protocol number is &quot;UDP (17)&quot; from <xref
          target="RFC0768" />.  The setting of the Don't Fragment (DF)
          bit 'Flags' field is according to rules listed in Sections
          <xref target="MTU-STATELESS" format="counter"/> and <xref
          target="MTU-STATEFUL" format="counter"/>.</t>

          <t hangText="UDP Header:">The UDP header contains an ITR
          selected source port when encapsulating a packet. See <xref
          target="loc-hash" /> for details on the hash algorithm used
          to select a source port based on the 5-tuple of the inner
          header. The destination port MUST be set to the well-known
          IANA-assigned port value 4341.</t>

          <t hangText="UDP Checksum:">The 'UDP Checksum' field SHOULD
          be transmitted as zero by an ITR for either IPv4 <xref
          target="RFC0768" /> and IPv6 encapsulation <xref
          target="RFC6935" /> <xref target="RFC6936" />.  When a
          packet with a zero UDP checksum is received by an ETR, the
          ETR MUST accept the packet for decapsulation.  When an ITR
          transmits a non-zero value for the UDP checksum, it MUST
          send a correctly computed value in this field.  When an ETR
          receives a packet with a non-zero UDP checksum, it MAY
          choose to verify the checksum value.  If it chooses to
          perform such verification, and the verification fails, the
          packet MUST be silently dropped.  If the ETR chooses not to
          perform the verification, or performs the verification
          successfully, the packet MUST be accepted for
          decapsulation. The handling of UDP zero checksums over IPv6
          for all tunneling protocols, including LISP, is subject to
          the applicability statement in <xref target="RFC6936"/>.</t>

          <t hangText="UDP Length:">The 'UDP Length' field is set for
          an IPv4-encapsulated packet to be the sum of the
          inner-header IPv4 Total Length plus the UDP and LISP header
          lengths.  For an IPv6-encapsulated packet, the 'UDP Length'
          field is the sum of the inner-header IPv6 Payload Length,
          the size of the IPv6 header (40 octets), and the size of the
          UDP and LISP headers.</t>

          <t hangText="N:">The N-bit is the nonce-present bit. When
          this bit is set to 1, the low-order 24 bits of the first 32
          bits of the LISP header contain a Nonce. See <xref
          target="echo-nonce"/> for details. Both N- and V-bits MUST
          NOT be set in the same packet. If they are, a decapsulating
          ETR MUST treat the 'Nonce/Map-Version' field as having a
          Nonce value present.</t>

          <t hangText="L:">The L-bit is the 'Locator-Status-Bits'
          field enabled bit.  When this bit is set to 1, the
          Locator-Status-Bits in the second 32&nbsp;bits of the LISP
          header are in use.</t>
        </list></t>

        <figure> <artwork><![CDATA[
  x 1 x x 0 x x x
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |N|L|E|V|I|R|K|K|            Nonce/Map-Version                  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                      Locator-Status-Bits                      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork> </figure>

        <t><list style="hanging">
          <t hangText="E:">The E-bit is the echo-nonce-request bit.
          This bit MUST be ignored and has no meaning when the N-bit
          is set to 0.  When the N-bit is set to 1 and this bit is set
          to 1, an ITR is requesting that the nonce value in the
          'Nonce' field be echoed back in LISP-encapsulated packets
          when the ITR is also an ETR. See <xref target="echo-nonce"/>
          for details.</t>

          <t hangText="V:">The V-bit is the Map-Version present
          bit. When this bit is set to 1, the N-bit MUST be 0. Refer
          to <xref target="map-versioning" /> for more details. This
          bit indicates that the LISP header is encoded in this
          case&nbsp;as:</t>
        </list></t>

        <figure> <artwork><![CDATA[
  0 x 0 1 x x x x
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |N|L|E|V|I|R|K|K|  Source Map-Version   |   Dest Map-Version    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                 Instance ID/Locator-Status-Bits               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork> </figure>

        <t><list style="hanging">
          <t hangText="I:">The I-bit is the Instance ID bit. See <xref
          target="instance" /> for more details. When this bit is set
          to 1, the 'Locator-Status-Bits' field is reduced to 8 bits
          and the high-order 24 bits are used as an Instance ID.  If
          the L-bit is set to 0, then the low-order 8&nbsp;bits are
          transmitted as zero and ignored on receipt. The format of
          the LISP header would look like this:</t>
        </list></t>

        <figure> <artwork><![CDATA[
  x x x x 1 x x x
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |N|L|E|V|I|R|K|K|            Nonce/Map-Version                  |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                 Instance ID                   |     LSBs      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork> </figure>

        <t><list style="hanging">
          <t hangText="R:">The R-bit is a Reserved and unassigned bit
          for future use. It MUST be set to 0 on transmit and MUST be
          ignored on receipt.</t>

          <t hangText="KK:">The KK-bits are a 2-bit field used when
          encapsulated packets are encrypted.  The field is set to 00
          when the packet is not encrypted.  See <xref
          target="RFC8061" /> for further information.</t>

          <t hangText="LISP Nonce:">The LISP 'Nonce' field is a 24-bit
          value that is randomly generated by an ITR when the N-bit is
          set to 1. Nonce generation algorithms are an implementation
          matter but are required to generate different nonces when
          sending to different RLOCs.  The nonce is also used when the E-bit is set to
          request the nonce value to be echoed by the other side when
          packets are returned. When the E-bit is clear but the N-bit
          is set, a remote ITR is either echoing a previously
          requested echo-nonce or providing a random nonce. See <xref
          target="echo-nonce" /> for more details. Finally, when
          both the N and V-bit are not set (N=0, V=0), then both the Nonce
          and Map-Version fields are set to 0 and ignored on receipt.</t>

          <t hangText="LISP Locator-Status-Bits (LSBs):">When the
          L-bit is also set, the 'Locator-Status-Bits' field in the
          LISP header is set by an ITR to indicate to an ETR the
          up/down status of the Locators in the source site. Each RLOC
          in a Map-Reply is assigned an ordinal value from 0 to n-1
          (when there are n RLOCs in a mapping entry). The
          Locator-Status-Bits are numbered from 0 to n-1 from the
          least significant bit of the field.  The field is 32 bits
          when the I-bit is set to 0 and is 8 bits when the I-bit is
          set to 1. When a Locator-Status-Bit is set to 1, the ITR is
          indicating to the ETR that the RLOC associated with the bit
          ordinal has up status. See <xref target="loc-reach" /> for
          details on how an ITR can determine the status of the ETRs
          at the same site.  When a site has multiple EID-Prefixes
          that result in multiple mappings (where each could have a
          different Locator-Set), the Locator-Status-Bits setting in
          an encapsulated packet MUST reflect the mapping for the
          EID-Prefix that the inner-header source EID address
          matches (longest-match). If the LSB for an anycast Locator is set to 1, then
          there is at least one RLOC with that address, and the ETR is
          considered 'up'.</t>
        </list></t>

        <t>When doing ITR/PITR encapsulation:</t>

        <t><list style="symbols">
           <t>The outer-header 'Time to Live' field (or 'Hop Limit'
           field, in the case of IPv6) SHOULD be copied from the
           inner-header 'Time to Live' field. </t>

	       <t>The outer-header IPv4 'Differentiated Services Code Point'
	       (DSCP) field or the 'Traffic Class' field, in the case of
	       IPv6, SHOULD be copied from the inner-header IPv4 DSCP field or
	       'Traffic Class' field in the case of IPv6, to the
	       outer-header. Guidelines for this can be found at <xref target="RFC2983"/>.</t>

           <t>The IPv4 'Explicit Congestion Notification' (ECN) field and bits
           6 and 7 of the IPv6 'Traffic Class' field requires special
           treatment in order to avoid discarding indications of
           congestion as specified in <xref target="RFC6040"/>.</t>
        </list></t>

        <t>When doing ETR/PETR decapsulation:</t>

        <t><list style="symbols">
	      <t>The inner-header IPv4 'Time to Live' field or 'Hop Limit'
	      field in the case of IPv6, MUST be copied from the
	      outer-header 'Time to Live'/'Hop Limit' field, when the 'Time to Live'/'Hop Limit'
	      value of the outer header is less than the 'Time to Live'/'Hop Limit'
	      value of the inner header.  Failing to perform this check
	      can cause the 'Time to Live'/'Hop Limit' of the inner header to increment
	      across encapsulation/decapsulation cycles.  This check is
	      also performed when doing initial encapsulation, when a
	      packet comes to an ITR or PITR destined for a LISP site.</t>

	      <t>The outer-header IPv4 'Differentiated Services Code Point'
	      (DSCP) field or the 'Traffic Class' field in the case of
	      IPv6, SHOULD be copied from the outer-header IPv4 DSCP field or
	      'Traffic Class' field in the case of IPv6, to the
	      inner-header. Guidelines for this can be found at <xref target="RFC2983"/>.</t>

          <t>The IPv4 'Explicit Congestion Notification' (ECN) field and bits
          6 and 7 of the IPv6 'Traffic Class' field, requires special
          treatment in order to avoid discarding indications of
          congestion as specified in <xref target="RFC6040"/>.  Note
          that implementations exist that copy the 'ECN' field from
          the outer header to the inner header even though <xref
          target="RFC6040"/> does not recommend this behavior.  It is
          RECOMMENDED that implementations change to support the
          behavior in <xref target="RFC6040"/>.</t>
        </list></t>

        <t>Note that if an ETR/PETR is also an ITR/PITR and chooses to
        re-encapsulate after decapsulating, the net effect of this
        is that the new outer header will carry the same Time to
        Live as the old outer header minus 1.</t>

        <t>Copying the Time to Live (TTL) serves two purposes:
        first, it preserves the distance the host intended the packet to
        travel; second, and more importantly, it provides for
        suppression of looping packets in the event there is a loop of
        concatenated tunnels due to misconfiguration.</t>

        <t>Some xTRs and PxTRs performs re-encapsulation operations
        and need to treat the 'Explicit Congestion Notification' (ECN)
        in a special way.  Because the re-encapsulation operation is a
        sequence of two operations, namely a decapsulation followed by
        an encapsulation, the ECN bits MUST be treated as described
        above for these two operations.</t>

		<t>
		The LISP dataplane protocol is not backwards compatible with
		<xref target="RFC6830"/> and does not have explicit support for introducing
		future protocol changes (e.g. an explicit version field). However,
		the LISP control plane <xref
  target="I-D.ietf-lisp-rfc6833bis"/> allows an ETR to register
		dataplane capabilities by means of new LCAF types <xref target="RFC8060"/>.
		In this way an ITR can be made aware of the dataplane capabilities
		of an ETR, and encapsulate accordingly. The specification of the new
		LCAF types, new LCAF mechanisms, and their use, is out of the
		scope of this document.
		</t>

    </section>
</section>

<section title="LISP EID-to-RLOC Map-Cache" anchor="Map-Cache">

     <t>ITRs and PITRs maintain an on-demand cache, referred as LISP
     EID-to-RLOC Map-Cache, that contains mappings from EID-prefixes
     to locator sets. The cache is used to encapsulate packets from
     the EID space to the corresponding RLOC network attachment point.</t>

     <t>When an ITR/PITR receives a packet from inside of the LISP
     site to destinations outside of the site a longest-prefix match
     lookup of the EID is done to the Map-Cache.</t>

     <t>When the lookup succeeds, the Locator-Set retrieved from the
     Map-Cache is used to send the packet to the EID's topological
     location.</t>

     <t>If the lookup fails, the ITR/PITR needs to retrieve the
     mapping using the LISP Control-Plane protocol <xref
     target="I-D.ietf-lisp-rfc6833bis"/>. While the mapping is being retrieved,
	 the ITR/PITR can either drop or buffer the packets. This document does not have specific
	 recommendations about the action to be taken.
	 It is up to the deployer to consider whether or not it is desirable to buffer packets
	 and deploy a LISP implementation that offers the desired behaviour. Once the mapping is resolved
	 it is then stored in the local Map-Cache to forward subsequent packets addressed to
     the same EID-prefix.</t>

     <t>The Map-Cache is a local cache of mappings, entries are
     expired based on the associated Time to live. In addition,
     entries can be updated with more current information, see <xref
     target="update_mapping" /> for further information on
     this. Finally, the Map-Cache also contains reachability
     information about EIDs and RLOCs, and uses LISP reachability
     information mechanisms to determine the reachability of RLOCs,
     see <xref target="loc-reach" /> for the specific mechanisms.</t>

</section>

<section title="Dealing with Large Encapsulated Packets" anchor="fragment">

    <t>This section proposes two mechanisms to deal with
    packets that exceed the path MTU between the ITR and ETR.</t>

    <t>It is left to the implementor to decide if the stateless or
    stateful mechanism SHOULD be implemented. Both or neither can be
    used, since it is a local decision in the ITR regarding how
    to deal with MTU issues, and sites can interoperate with differing
    mechanisms.</t>

    <t>Both stateless and stateful mechanisms also apply to
    Re-encapsulating and Recursive Tunneling, so any actions
    below referring to an ITR also apply to a TE-ITR.</t>


    <section anchor="MTU-STATELESS" title="A Stateless Solution to MTU Handling">
    <t>An ITR stateless solution to handle MTU issues is described as
    follows:</t>

    <t><list style="numbers">
    <t>Define H to be the size, in octets, of the outer header an ITR
    prepends to a packet. This includes the UDP and LISP header lengths.</t>

    <t>Define L to be the size, in octets, of the maximum-sized packet
    an ITR can send to an ETR without the need for the ITR or any
    intermediate routers to fragment the packet.
	The network administrator of the LISP deployment has to determine
	what is the suitable value of L so to make sure that no MTU issues arise.</t>

    <t>Define an architectural constant S for the maximum size of a
    packet, in octets, an ITR MUST receive from the source so the
    effective MTU can be met. That is, L = S + H.</t>
    </list></t>

    <t>When an ITR receives a packet from a site-facing interface and
    adds H octets worth of encapsulation to yield a packet size
    greater than L octets (meaning the received packet size was
    greater than S octets from the source), it resolves the MTU issue
    by first splitting the original packet into 2 equal-sized
    fragments.  A LISP header is then prepended to each fragment. The
    size of the encapsulated fragments is then (S/2 + H), which is
    less than the ITR's estimate of the path MTU between the ITR and
    its correspondent ETR.</t>

    <t>When an ETR receives encapsulated fragments, it treats them
    as two individually encapsulated packets. It strips the LISP
    headers and then forwards each fragment to the destination host of
    the destination site.  The two fragments are reassembled at
    the destination host into the single IP datagram that was
    originated by the source host. Note that reassembly can happen
    at the ETR if the encapsulated packet was fragmented at or after the
    ITR.</t>

    <t>This behavior MUST be performed by the ITR only when the source
    host originates a packet with the 'DF' field of the IP header set
    to 0.  When the 'DF' field of the IP header is set to 1, or the
    packet is an IPv6 packet originated by the source host, the ITR
    will drop the packet when the size (adding in the size of the
    encapsulation header) is greater than L and send an ICMPv4 ICMP
    Unreachable/Fragmentation-Needed or ICMPv6 "Packet Too Big"
    message to the source with a value of S, where S is (L - H).</t>

    <t>When the outer-header encapsulation uses an IPv4 header, an
    implementation SHOULD set the DF bit to 1 so ETR fragment
    reassembly can be avoided. An implementation MAY set the DF
    bit in such headers to 0 if it has good reason to believe
    there are unresolvable path MTU issues between the sending ITR
    and the receiving ETR.</t>

    <t>This specification RECOMMENDS that L be defined as 1500.
    Additional information about in-network MTU and fragmentation issues can be found at <xref target="RFC4459"/>.</t>
    </section>

    <section anchor="MTU-STATEFUL" title="A Stateful Solution to MTU Handling">
    <t>An ITR stateful solution to handle MTU issues is described as
    follows:</t>

    <t><list style="numbers">
        <t>The ITR will keep state of the effective MTU for each Locator
        per Map-Cache entry. The effective MTU is what the core network
        can deliver along the path between the ITR and ETR.</t>

        <t>When an IPv4-encapsulated packet with the DF bit set to 1, exceeds what the core network
        can deliver, one of the intermediate routers on the path will
        send an an ICMPv4
        Unreachable/Fragmentation-Needed to the ITR, respectively. The
        ITR will parse the ICMP message to determine which Locator is
        affected by the effective MTU change and then record the new
        effective MTU value in the Map-Cache entry.</t>

        <t>When a packet is received by the ITR from a source inside
        of the site and the size of the packet is greater than the
        effective MTU stored with the Map-Cache entry associated with
        the destination EID the packet is for, the ITR will send an
        ICMPv4 ICMP Unreachable/Fragmentation-Needed message back to the source. The packet size
        advertised by the ITR in the ICMP message is the effective
        MTU minus the LISP encapsulation length.</t>
    </list></t>

    <t>Even though this mechanism is stateful, it has advantages over
    the stateless IP fragmentation mechanism, by not involving the
    destination host with reassembly of ITR fragmented packets.</t>

    <t>Please note that <xref target="RFC1191"/> and <xref target="RFC1981"/>, which describe the use
      of ICMP packets for PMTU discovery, can behave suboptimally in the
      presence of ICMP black holes or off-path attackers that spoof ICMP.
      Possible mitigations include ITRs and ETRs cooperating on MTU probe
      packets (<xref target="RFC4821"/>, <xref target="I-D.ietf-tsvwg-datagram-plpmtud"/>), or ITRs
      storing the beginning of large packets to verify that they match
      the echoed packet in ICMP Frag Needed/PTB.</t>
    </section></section>

    <section anchor="instance" title="Using Virtualization and Segmentation with LISP">
	<t>There are several cases where segregation is needed at the
	EID level.  For instance, this is the case for deployments
	containing overlapping addresses, traffic isolation policies
	or multi-tenant virtualization.  For these and other scenarios
	where segregation is needed, Instance IDs are used.</t>

        <t>An Instance ID can be carried in a LISP-encapsulated
        packet.  An ITR that prepends a LISP header will copy a
        24-bit value used by the LISP router to uniquely identify
        the address space. The value is copied to the 'Instance ID'
        field of the LISP header, and the I-bit is set to&nbsp;1.</t>

        <t>When an ETR decapsulates a packet, the Instance ID from the
        LISP header is used as a table identifier to locate the
        forwarding table to use for the inner destination EID
        lookup.</t>

        <t>For example, an 802.1Q VLAN tag or VPN identifier could be
        used as a 24-bit Instance ID. See <xref target="I-D.ietf-lisp-vpn"/>
        for LISP VPN use-case details. Please note that the Instance ID
        is not protected, an on-path attacker can modify the tags and for instance,
        allow communicatons between logically isolated VLANs.</t>

        <t>Participants within a LISP deployment must agree
          on the meaning of Instance ID values. The source and destination EIDs
          MUST belong to the same Instance ID.
        </t>

        <t>Instance ID SHOULD NOT be used with overlapping IPv6 EID addresses.</t>

    </section>

    <section title="Routing Locator Selection">

		<t>The Map-Cache contains the state used by ITRs and PITRs to
		encapsulate packets.  When an ITR/PITR receives a packet from
		inside the LISP site to a destination outside of the site a
		longest-prefix match lookup of the EID is done to the
		Map-Cache (see <xref target="Map-Cache" />). The lookup
		returns a single Locator-Set containing a list of RLOCs
		corresponding to the EID's topological location.  Each RLOC in
		the Locator-Set is associated with a 'Priority' and 'Weight',
		this information is used to select the RLOC to
		encapsulate.</t>

		<t>The RLOC with the lowest 'Priority' is selected. An RLOC
		with 'Priority' 255 means that MUST NOT be used for
		forwarding. When multiple RLOCs have the same 'Priority' then
		the 'Weight' states how to load balance traffic among them.
		The value of the 'Weight' represents the relative weight of
		the total packets that match the mapping entry.</t>

		<t>The following are different scenarios for choosing
        RLOCs and the controls that are available:</t>

        <t><list style="symbols">

        <t>The server-side returns one RLOC. The client-side can only
        use one RLOC. The server-side has complete control of the
        selection.</t>

        <t>The server-side returns a list of RLOCs where a subset
        of the list has the same best Priority. The client can only use
        the subset list according to the
        weighting assigned by the server-side. In this case, the
        server-side controls both the subset list and load-splitting
        across its members. The client-side can use RLOCs outside
        of the subset list if it determines that the subset
        list is unreachable (unless RLOCs are set to a Priority of 255).
        Some sharing of control exists: the server-side determines
        the destination RLOC list and load distribution while the
        client-side has the option of using alternatives to this list if
        RLOCs in the list are unreachable.</t>

        <t>The server-side sets a Weight of zero for the RLOC subset
        list. In this case, the client-side can choose how the traffic
        load is spread across the subset list. See <xref
        target="loc-hash"/> for details on load-sharing mechanisms.
        Control is shared by the server-side determining the list and
        the client-side determining load distribution. Again, the
        client can use alternative RLOCs if the server-provided list
        of RLOCs is unreachable.</t>

        <t>Either side (more likely the server-side ETR) decides to "glean"
          the RLOCs. For example, if the server-side ETR gleans RLOCs,
          then the client-side ITR gives the client-side ITR responsibility
          for bidirectional RLOC reachability and preferability.  Server-side
          ETR gleaning of the client-side ITR RLOC is done by caching the
          inner-header source EID and the outer-header source RLOC of
          received packets. The client-side ITR controls how traffic is
          returned and can alternate using an outer-header source RLOC,
          which then can be added to the list the server-side ETR uses
          to return traffic.  Since no Priority or Weights are provided
          using this method, the server-side ETR MUST assume that each
          client-side ITR RLOC uses the same best Priority with a Weight
          of zero.  In addition, since EID-Prefix encoding cannot be conveyed
          in data packets, the EID-to-RLOC Cache on Tunnel Routers can grow
          to be very large. Gleaning has several important considerations.
          A "gleaned" Map-Cache entry is only stored and used for a RECOMMENDED period of 3 seconds,
          pending verification.  Verification MUST be performed by
          sending a Map-Request to the source EID (the inner-header IP source
          address) of the received encapsulated packet.  A reply to this
          "verifying Map-Request" is used to fully populate the Map-Cache entry
          for the "gleaned" EID and is stored and used for the time indicated
          from the 'TTL' field of a received Map-Reply.  When a verified Map-
          Cache entry is stored, data gleaning no longer occurs for subsequent
          packets that have a source EID that matches the EID-Prefix of the
          verified entry.  This "gleaning" mechanism MUST NOT be used over
          the public Internet and SHOULD only be used in trusted and closed
          deployments.  Refer to <xref target="SECURITY"/> for security issues regarding this
          mechanism.</t>

		</list></t>

        <t>RLOCs that appear in EID-to-RLOC Map-Reply messages are
        assumed to be reachable when the R-bit <xref
        target="I-D.ietf-lisp-rfc6833bis"/> for the Locator record is set
        to 1.  When the R-bit is set to 0, an ITR or PITR MUST NOT
        encapsulate to the RLOC. Neither the information contained in
        a Map-Reply nor that stored in the mapping database system
        provides reachability information for RLOCs. Note that
        reachability is not part of the mapping system and is
        determined using one or more of the Routing Locator
        reachability algorithms described in the next section.</t>

    </section>

    <section anchor="loc-reach" title="Routing Locator Reachability">

        <t>Several Data-Plane mechanisms for determining RLOC
        reachability are currently defined. Please note that
        additional Control-Plane based reachability mechanisms are
        defined in <xref target="I-D.ietf-lisp-rfc6833bis"/>.</t>

        <t><list style="numbers">

            <t>An ETR MAY examine the Locator-Status-Bits in the LISP
            header of an encapsulated data packet received from an
            ITR. If the ETR is also acting as an ITR and has
            traffic to return to the original ITR site, it can use
            this status information to help select an RLOC.</t>

            <t>When an ETR receives an encapsulated packet from an ITR,
            the source RLOC from the outer header of the packet is likely
            to be reachable. Please note that in some scenarios the
            RLOC from the outer header can be an spoofable field.</t>

            <t>An ITR/ETR pair can use the 'Echo-Noncing' Locator
            reachability algorithms described in this section.</t>

        </list></t>

        <t>When determining Locator up/down reachability by
        examining the Locator-Status-Bits from the LISP-encapsulated
        data packet, an ETR will receive up-to-date status from an
        encapsulating ITR about reachability for all ETRs at the
        site.  CE-based ITRs at the source site can determine
        reachability relative to each other using the site IGP as
        follows:</t>

        <t><list style="symbols">

            <t>Under normal circumstances, each ITR will advertise
            a default route into the site IGP.</t>

            <t>If an ITR fails or if the upstream link to its PE
            fails, its default route will either time out or be
            withdrawn.</t>

        </list></t>

        <t>Each ITR can thus observe the presence or lack of a
        default route originated by the others to determine the
        Locator-Status-Bits it sets for them.</t>

		<t>When ITRs at the site are not deployed in CE routers, the IGP
        can still be used to determine the reachability of Locators,
        provided they are injected into the IGP. This is
        typically done when a /32 address is configured on a loopback
        interface.</t>

        <t> RLOCs listed in a Map-Reply are numbered with ordinals
        0 to n-1.  The Locator-Status-Bits in a LISP-encapsulated
        packet are numbered from 0 to n-1 starting with the least
        significant bit. For example, if an RLOC listed in the 3rd
        position of the Map-Reply goes down (ordinal value 2),
        then all ITRs at the site will clear the 3rd least
        significant bit (xxxx x0xx) of the 'Locator-Status-Bits'
        field for the packets they encapsulate.</t>

        <t>When an xTR decides to use 'Locator-Status-Bits'
          to affect reachability information, it acts as follows:
          ETRs decapsulating a packet will check for any change in
          the 'Locator-Status-Bits' field.  When a bit goes from 1 to 0, the
          ETR, if acting also as an ITR, will refrain from encapsulating
          packets to an RLOC that is indicated as down. It will only resume
          using that RLOC if the corresponding Locator-Status-Bit
          returns to a value of 1. Locator-Status-Bits are associated with a Locator-Set
          per EID-Prefix. Therefore, when a Locator becomes unreachable, the
          Locator-Status-Bit that corresponds to that Locator's position in the
          list returned by the last Map-Reply will be set to zero for that
          particular EID-Prefix.
        </t>


		<t>Locator-Status-Bits MUST NOT be used
		over the public Internet and SHOULD only be used  in trusted
		and closed deployments. In addition Locator-Status-Bits
		SHOULD be coupled with Map-Versioning (<xref target="map-versioning"/>)
    to prevent race conditions where Locator-Status-Bits are interpreted as
    referring to different RLOCs than intended. Refer to <xref target="SECURITY"/>
		for security issues regarding this mechanism.</t>


        <t>If an ITR encapsulates a packet to an ETR and the packet is
        received and decapsulated by the ETR, it is implied but not
        confirmed by the ITR that the ETR's RLOC is reachable.  In
        most cases, the ETR can also reach the ITR but cannot assume
        this to be true, due to the possibility of path asymmetry. In
        the presence of unidirectional traffic flow from an ITR to an
        ETR, the ITR SHOULD NOT use the lack of return traffic as an
        indication that the ETR is unreachable. Instead, it MUST use
        an alternate mechanism to determine reachability.</t>

        <t>The security considerations of <xref target="SECURITY"/>
        related to data-plane reachability applies to the data-plane
        RLOC reachability mechanisms described in this section.</t>

       <section anchor="echo-nonce" title="Echo Nonce Algorithm">
         <t>When data flows bidirectionally between Locators from
         different sites, a Data-Plane mechanism called "nonce
         echoing" can be used to determine reachability between an ITR
         and ETR.  When an ITR wants to solicit a nonce echo, it sets
         the N- and E-bits and places a 24-bit nonce <xref
         target="RFC4086" /> in the LISP header of the next
         encapsulated data packet.</t>

         <t>When this packet is received by the ETR, the encapsulated
         packet is forwarded as normal. When the ETR is an xTR
         (co-located as an ITR), it then sends a data packet to the
         ITR (when it is an xTR co-located as an ETR), it includes the
         nonce received earlier with the N-bit set and E-bit
         cleared. The ITR sees this "echoed nonce" and knows that the
         path to and from the ETR is up.</t>

         <t>The ITR will set the E-bit and N-bit for every packet it
         sends while in the echo-nonce-request state.  The time the
         ITR waits to process the echoed nonce before it determines
         the path is unreachable is variable and is a choice left for
         the implementation.</t>

         <t>If the ITR is receiving packets from the ETR but does not
         see the nonce echoed while being in the echo-nonce-request
         state, then the path to the ETR is unreachable. This decision
         MAY be overridden by other Locator reachability
         algorithms. Once the ITR determines that the path to the ETR
         is down, it can switch to another Locator for that
         EID-Prefix.</t>

         <t>Note that "ITR" and "ETR" are relative terms here. Both
         devices MUST be implementing both ITR and ETR functionality
         for the echo nonce mechanism to operate.</t>

         <t>The ITR and ETR MAY both go into the echo-nonce-request
         state at the same time. The number of packets sent or the
         time during which echo nonce requests are sent is an
         implementation-specific setting. In this case, an xTR
         receiving the echo-nonce-request packets will suspend
         the echo-nonce-request state and setup a 'echo-nonce-request-state' timer.
         After the 'echo-nonce-request-state' timer expires it will resume
         the echo-nonce-request state.</t>

         <t>This mechanism does not completely solve the forward path
         reachability problem, as traffic may be unidirectional. That
         is, the ETR receiving traffic at a site MAY not be the same
         device as an ITR that transmits traffic from that site, or
         the site-to-site traffic is unidirectional so there is no ITR
         returning traffic.</t>

         <t>The echo-nonce algorithm is bilateral. That is, if one
         side sets the E-bit and the other side is not enabled for
         echo-noncing, then the echoing of the nonce does not occur
         and the requesting side may erroneously consider the Locator
         unreachable. An ITR SHOULD set the E-bit in an
         encapsulated data packet when it knows the ETR is enabled for
         echo-noncing. This is conveyed by the E-bit in the
         Map-Reply message.</t>

         <t>Many implementations default to not advertising they are
         echo-nonce capable in Map-Reply messages and so RLOC-probing tends
         to be used for RLOC reachability.</t>

		<t>The echo-nonce mechanism MUST NOT be used
		over the public Internet and MUST only be used in trusted
		and closed deployments. Refer to <xref target="SECURITY"/> for
		security issues regarding this mechanism.</t>
       </section>
     </section>

     <section anchor="eid-reach" title="EID Reachability within a LISP Site">
        <t>A site MAY be multihomed using two or more ETRs.  The hosts
        and infrastructure within a site will be addressed using one
        or more EID-Prefixes that are mapped to the RLOCs of the
        relevant ETRs in the mapping system.  One possible failure
        mode is for an ETR to lose reachability to one or more of the
        EID-Prefixes within its own site. When this occurs when the
        ETR sends Map-Replies, it can clear the R-bit associated with
        its own Locator. And when the ETR is also an ITR, it can clear
        its Locator-Status-Bit in the encapsulation data header.</t>

        <t>It is recognized that there are no simple solutions to the
        site partitioning problem because it is hard to know which
        part of the EID-Prefix range is partitioned and which Locators
        can reach any sub-ranges of the EID-Prefixes. Note that this
        is not a new problem introduced by the LISP architecture. The
        problem exists today when a multihomed site uses BGP to
        advertise its reachability upstream.</t>
      </section>

        <section anchor="loc-hash" title="Routing Locator Hashing">
          <t>When an ETR provides an EID-to-RLOC mapping in a
          Map-Reply message that is stored in the Map-Cache of a
          requesting ITR, the Locator-Set for the EID-Prefix MAY
          contain different Priority and Weight values for each
          locator address.  When more than one best Priority Locator
          exists, the ITR can decide how to load-share traffic against
          the corresponding Locators.</t>

          <t>The following hash algorithm MAY be used by an ITR to
          select a Locator for a packet destined to an EID for the
          EID-to-RLOC mapping:</t>

          <t><list style="numbers">
            <t>Either a source and destination address hash or the
            traditional 5-tuple hash can be used.  The traditional
            5-tuple hash includes the source and destination
            addresses; source and destination TCP, UDP, or Stream
            Control Transmission Protocol (SCTP) port numbers; and the
            IP protocol number field or IPv6 next-protocol fields of a
            packet that a host originates from within a LISP
            site. When a packet is not a TCP, UDP, or SCTP packet, the
            source and destination addresses only from the header are
            used to compute the hash.</t>

            <t>Take the hash value and divide it by the number of
            Locators stored in the Locator-Set for the EID-to-RLOC
            mapping.</t>

            <t>The remainder will yield a value of 0 to "number of
            Locators minus 1". Use the remainder to select the Locator
            in the Locator-Set.</t>
        </list></t>

        <t>The specific hash algorithm the ITR uses for load-sharing
        is out of scope for this document and does not prevent
        interoperability.</t>

        <t>The Source port SHOULD be the same for all packets belonging to the
		same flow. Also note that when a packet is LISP encapsulated, the source
        port number in the outer UDP header needs to be set. Selecting
        a hashed value allows core routers that are attached to Link
        Aggregation Groups (LAGs) to load-split the encapsulated
        packets across member links of such LAGs. Otherwise, core
        routers would see a single flow, since packets have a source
        address of the ITR, for packets that are originated by
        different EIDs at the source site. A suggested setting for the
        source port number computed by an ITR is a 5-tuple hash
        function on the inner header, as described above. The source
        port SHOULD be the same for all packets belonging to the same
        flow.</t>

        <t>Many core router implementations use a 5-tuple hash to decide
        how to balance packet load across members of a LAG. The 5-tuple
        hash includes the source and destination addresses of the packet
        and the source and destination ports when the protocol number in
        the packet is TCP or UDP. For this reason, UDP encoding is
        used for LISP encapsulation. In this scenario, when the outer header is IPv6, the flow label MAY also be
          set following the procedures specified in <xref target="RFC6438"/>. When the inner header
          is IPv6 then the flow label is not zero, it MAY be used to compute the hash.</t>

        </section>

    <section anchor="update_mapping" title="Changing the Contents of EID-to-RLOC Mappings">

    <t>Since the LISP architecture uses a caching scheme to
    retrieve and store EID-to-RLOC mappings, the only way an ITR
    can get a more up-to-date mapping is to re-request the
    mapping. However, the ITRs do not know when the mappings
    change, and the ETRs do not keep track of which ITRs
    requested its mappings. For scalability reasons, it is
    desirable to maintain this approach but need to provide a
    way for ETRs to change their mappings and inform the sites
    that are currently communicating with the ETR site using
    such mappings.</t>

  <t>This section defines two Data-Plane mechanism for updating
  EID-to-RLOC mappings. Additionally, the Solicit-Map Request
  (SMR) Control-Plane updating mechanism is specified in <xref
  target="I-D.ietf-lisp-rfc6833bis" />.</t>

  <section anchor="lsb-changing" title="Locator-Status-Bits">

  <t>Locator-Status-Bits (LSB) can also be used to keep track of the
  Locator status (up or down) when EID-to-RLOC mappings are changing. When LSB are used in a LISP deployment, all LISP tunnel routers MUST implement both ITR and ETR capabilities (therefore all tunnel routers are effectively xTRs). In this section the term "source xTR" is used to refer to the xTR setting the LSB and "destination xTR" is used to refer to the xTR receiving the LSB. The procedure is as follows:
  </t>

  <t>First, when a Locator record is added or removed from the Locator-Set, the source xTR
  will signal this by sending a Solicit-Map Request (SMR) Control-Plane message <xref
target="I-D.ietf-lisp-rfc6833bis" /> to the destination xTR. At this point the source xTR MUST NOT use LSB (L-bit = 0) since the
destination xTR site has outdated information. The source xTR will setup a 'use-LSB' timer.</t>

  <t>Second and as defined in <xref target="I-D.ietf-lisp-rfc6833bis" />,
upon reception of the SMR message the destination xTR will retrieve the updated
EID-to-RLOC mappings by sending a Map-Request.</t>

  <t>And third, when the 'use-LSB' timer expires, the source xTR can use again LSB with the destination xTR to signal the Locator status (up or down).
  The specific value for the 'use-LSB' timer depends on the LISP deployment, the 'use-LSB' timer needs to be large enough
for the destination xTR  to retreive the updated EID-to-RLOC mappings. A RECOMMENDED value for the 'use-LSB' timer is 5 minutes.</t>
  </section>

  <section anchor="map-versioning" title="Database Map-Versioning">
    <t>When there is unidirectional packet flow between an ITR and
    ETR, and the EID-to-RLOC mappings change on the ETR, it needs to
    inform the ITR so encapsulation to a removed Locator can stop
    and can instead be started to a new Locator in the
    Locator-Set.</t>

    <t>An ETR, when it sends Map-Reply messages, conveys its
    own Map-Version Number. This is known as the Destination
    Map-Version Number. ITRs include the Destination
    Map-Version Number in packets they encapsulate to the
    site.  When an ETR decapsulates a packet and detects that the
    Destination Map-Version Number is less than the current
    version for its mapping, the SMR procedure described in
    <xref target="I-D.ietf-lisp-rfc6833bis" /> occurs.</t>

    <t>An ITR, when it encapsulates packets to ETRs, can convey
    its own Map-Version Number. This is known as the Source
    Map-Version Number. When an ETR decapsulates a packet and
    detects that the Source Map-Version Number is greater than the
    last Map-Version Number sent in a Map-Reply from the ITR's site,
    the ETR will send a Map-Request to one of the ETRs for the source
    site.</t>

    <t>A Map-Version Number is used as a sequence number per
    EID-Prefix, so values that are greater are considered to be
    more recent. A value
    of 0 for the Source Map-Version Number or the Destination
    Map-Version Number conveys no versioning information, and an
    ITR does no comparison with previously received Map-Version
    Numbers.</t>

    <t>A Map-Version Number can be included in Map-Register messages
    as well. This is a good way for the Map-Server to assure that
    all ETRs for a site registering to it will be synchronized
    according to Map-Version Number.</t>

    <t>Map-Version requires that ETRs within the LISP site are synchronized
      with respect to the Map-Version Number, EID-prefix and the set and status (up/down)
      of the RLOCs. The use of Map-Versioning without proper synchronization may cause
      traffic disruption. The synchronization protocol is out-of-the-scope of this document, but MUST
      keep ETRs synchronized within a 1 minute window.</t>


  <t>Map-Versioning MUST NOT be used over the public Internet and
  SHOULD only be used in trusted and closed deployments. Refer to
  <xref target="SECURITY"/> for security issues regarding this mechanism.</t>

    <t>See <xref target="I-D.ietf-lisp-6834bis" /> for a more
    detailed analysis and description of Database
    Map-Versioning.</t>
  </section>

  </section>


    <section title="Multicast Considerations" anchor="multicast">
       <t>A multicast group address, as defined in the original Internet
       architecture, is an identifier of a grouping of topologically
       independent receiver host locations.  The address encoding itself
       does not determine the location of the receiver(s).  The multicast
       routing protocol, and the network-based state the protocol creates,
       determine where the receivers are located.</t>

       <t>In the context of LISP, a multicast group address is both an
       EID and a Routing Locator.  Therefore, no specific semantic or
       action needs to be taken for a destination address, as it would
       appear in an IP header.  Therefore, a group address that
       appears in an inner IP header built by a source host will be
       used as the destination EID.  The outer IP header (the
       destination Routing Locator address), prepended by a LISP
       router, can use the same group address as the destination
       Routing Locator, use a multicast or unicast Routing Locator
       obtained from a Mapping System lookup, or use other means to
       determine the group address mapping.</t>

       <t>With respect to the source Routing Locator address, the ITR
       prepends its own IP address as the source address of the outer
       IP header, just like it would if the destination EID was a
       unicast address. This source Routing Locator address, like any
       other Routing Locator address, MUST be routable on the underlay.</t>

       <t>There are two approaches for LISP-Multicast, one that uses
       native multicast routing in the underlay with no support from
       the Mapping System and the other that uses only unicast routing
       in the underlay with support from the Mapping System. See <xref
       target="RFC6831"/> and <xref target="RFC8378"/>, respectively,
       for details. Details for LISP-Multicast and interworking with
       non-LISP sites are described in <xref target="RFC6831"/> and
       <xref target="RFC6832"/>.</t>

    </section>

    <section title="Router Performance Considerations"
    anchor="PUNT">
        <t>LISP is designed to be very "hardware-based forwarding
        friendly". A few implementation techniques can be used to
        incrementally implement LISP:</t>

        <t><list style="symbols">
            <t>When a tunnel-encapsulated packet is received by an
            ETR, the outer destination address may not be the address
            of the router. This makes it challenging for the control
            plane to get packets from the hardware. This may be
            mitigated by creating special Forwarding Information Base
            (FIB) entries for the EID-Prefixes of EIDs served by the
            ETR (those for which the router provides an RLOC
            translation).  These FIB entries are marked with a flag
            indicating that Control-Plane processing SHOULD be
            performed. The forwarding logic of testing for particular
            IP protocol number values is not necessary. There are a
            few proven cases where no changes to existing deployed
            hardware were needed to support the LISP Data-Plane.</t>

            <t>On an ITR, prepending a new IP header consists of adding
            more octets to a MAC rewrite string and prepending the
            string as part of the outgoing encapsulation
            procedure.  Routers that support Generic Routing Encapsulation
            (GRE) tunneling <xref target="RFC2784"/> or 6to4 tunneling
            <xref target="RFC3056"/> may already support this
            action.</t>

            <t>A packet's source address or interface the
            packet was received on can be used to select VRF
            (Virtual Routing/Forwarding). The VRF's routing table
            can be used to find EID-to-RLOC mappings.</t>
        </list></t>

        <t>For performance issues related to Map-Cache management, see
        <xref target="SECURITY" />.</t>
    </section>

<section title="Security Considerations" anchor="SECURITY">
  <t>In what follows we highlight security
  considerations that apply when LISP is deployed in environments such
  as those specified in <xref target="soa"/>.</t>

  <t>The optional mechanisms of gleaning is offered to directly obtain
  a mapping from the LISP encapsulated packets. Specifically, an xTR
  can learn the EID-to-RLOC mapping by inspecting the source RLOC and
  source EID of an encapsulated packet, and insert this new mapping
  into its Map-Cache. An off-path attacker can spoof the source EID
  address to divert the traffic sent to the victim's spoofed EID. If
  the attacker spoofs the source RLOC, it can mount a DoS attack by
  redirecting traffic to the spoofed victim's RLOC, potentially
  overloading it.</t>

  <t>The LISP Data-Plane defines several mechanisms to monitor RLOC
  Data-Plane reachability, in this context Locator-Status Bits,
  Nonce-Present and Echo-Nonce bits of the LISP encapsulation header
  can be manipulated by an attacker to mount a DoS attack. An off-path
  attacker able to spoof the RLOC and/or nonce of a victim's xTR can
  manipulate such mechanisms to declare false information about the
  RLOC's reachability status.</t>

  <t>For example of such attacks, an off-path attacker can exploit the
  echo-nonce mechanism by sending data packets to an ITR with a random
  nonce from an ETR's spoofed RLOC. Note the attacker must guess a
  valid nonce the ITR is requesting to be echoed within a small window
  of time. The goal is to convince the ITR that the ETR's RLOC is
  reachable even when it may not be reachable. If the attack is
  successful, the ITR believes the wrong reachability status of the
  ETR's RLOC until RLOC-probing detects the correct status. This time
  frame is on the order of 10s of seconds.  This specific attack can
  be mitigated by preventing RLOC spoofing in the network by deploying
  uRPF BCP 38 <xref target="RFC2827"/>. In addition and in order to exploit
  this vulnerability, the off-path attacker must send echo-nonce
  packets at high rate. If the nonces have never been requested by the
  ITR, it can protect itself from erroneous reachability attacks.</t>

  <t>A LISP-specific uRPF check is also possible. When decapsulating,
    an ETR can check that the source EID and RLOC are valid EID-to-RLOC
    mappings by checking the Mapping System.</t>

  <t>Map-Versioning is a Data-Plane mechanism used to signal a peering
  xTR that a local EID-to-RLOC mapping has been updated, so that the
  peering xTR uses LISP Control-Plane signaling message to retrieve a
  fresh mapping.  This can be used by an attacker to forge the
  map-versioning field of a LISP encapsulated header and force an
  excessive amount of signaling between xTRs that may overload them.</t>

  <t>Locator-Status-Bits, echo-nonce and map-versioning MUST NOT be used
  over the public Internet and SHOULD only be used  in trusted
  and closed deployments. In addition Locator-Status-Bits
  SHOULD be coupled with map-versioning to prevent race conditions
  where Locator-Status-Bits are interpreted as referring to different RLOCs than intended.</t>

  <t>LISP implementations and deployments which permit outer header fragments
  of IPv6 LISP encapsulated packets as a means of dealing with MTU issues
  should also use implementation techniques in ETRs to prevent this
  from being a DoS attack vector. Limits on the number of fragments
  awaiting reassembly at an ETR, RTR, or PETR, and the rate of admitting
  such fragments may be used.</t>
</section>

<section title="Network Management Considerations">
  <t>Considerations for network management tools exist so the LISP
  protocol suite can be operationally managed.  These mechanisms can
  be found in <xref target="RFC7052" /> and <xref target="RFC6835"
  />.</t>
</section>

<section title="Changes since RFC 6830">
  <t>For implementation considerations, the following changes have been made
  to this document since RFC 6830 was published:</t>

  <t><list style="symbols">
    <t>It is no longer mandated that a maximum number of 2 LISP
    headers be prepended to a packet. If there is a application need
    for more than 2 LISP headers, an implementation can support
    more. However, it is RECOMMENDED that a maximum of two LISP
    headers can be prepended to a packet.</t>

    <t>The 3 reserved flag bits in the LISP header have been allocated
    for <xref target="RFC8061"/>. The low-order 2 bits of the 3-bit
    field (now named the KK bits) are used as a key identifier. The 1
    remaining bit is still documented as reserved and unassigned.</t>

    <t>Data-Plane gleaning for creating map-cache entries has been
    made optional. Any ITR implementations that depend on or assume the
    remote ETR is gleaning should not do so. This does not create any
    interoperability problems since the control-plane map-cache
    population procedures are unilateral and are the typical method
    for map-cache population.</t>

    <t>The bulk of the changes to this document which reduces its
    length are due to moving the LISP control-plane messaging and
    procedures to <xref target="I-D.ietf-lisp-rfc6833bis" />.</t>
  </list></t>
</section>

<section title="IANA Considerations" anchor="IANA">
  <t>This section provides guidance to the Internet Assigned Numbers
  Authority (IANA) regarding registration of values related to this
  Data-Plane LISP specification, in accordance with BCP 26 <xref
  target="RFC8126" />.</t>

  <section title="LISP UDP Port Numbers">
    <t>The IANA registry has allocated UDP port number 4341 for the
    LISP Data-Plane. IANA has updated the description for UDP port
    4341 as follows:</t>

    <figure> <artwork><![CDATA[
    lisp-data      4341 udp    LISP Data Packets
    ]]></artwork> </figure>
  </section>
</section>

</middle>

<back>

<references title='Normative References'>
  <?rfc include="reference.RFC.2827'?>
  <?rfc include="reference.RFC.2119'?>
  <?rfc include="reference.RFC.6040'?>
  <?rfc include="reference.RFC.2474'?>
  <?rfc include="reference.RFC.8200'?>
  <?rfc include="reference.RFC.0768'?>
  <?rfc include="reference.RFC.6438'?>
  <?rfc include="reference.RFC.0791'?>
  <?rfc include="reference.RFC.2983'?>
  <?rfc include="reference.RFC.6830'?>
  <?rfc include="reference.RFC.6831'?>
  <?rfc include="reference.RFC.8378'?>
  <?rfc include="reference.RFC.8174'?>
  <?rfc include="reference.RFC.8126'?>
  <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-rfc6833bis.xml'?>
  <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-6834bis.xml'?>
</references>

<references title="Informative References">
  <?rfc include="reference.RFC.1191'?>
  <?rfc include="reference.RFC.1981'?>
  <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-tsvwg-datagram-plpmtud.xml'?>
  <?rfc include="reference.RFC.4821'?>
  <?rfc include="reference.RFC.3232'?>
  <?rfc include="reference.RFC.4086'?>
  <?rfc include="reference.RFC.4459'?>
  <?rfc include="reference.RFC.1918'?>
  <?rfc include="reference.RFC.8061'?>
  <?rfc include="reference.RFC.7215'?>
  <?rfc include="reference.RFC.7052'?>
  <?rfc include="reference.RFC.1034'?>
  <?rfc include="reference.RFC.3261'?>
  <?rfc include="reference.RFC.2784'?>
  <?rfc include="reference.RFC.3056'?>
  <?rfc include="reference.RFC.4984'?>
  <?rfc include="reference.RFC.6832'?>
  <?rfc include="reference.RFC.6835'?>
  <?rfc include="reference.RFC.8060'?>
  <?rfc include="reference.RFC.6935'?>
  <?rfc include="reference.RFC.6936'?>
  <?rfc include="reference.RFC.8085'?>
  <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-introduction.xml'?>
  <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-vpn.xml'?>

  <reference anchor="CHIAPPA" target="http://mercury.lcs.mit.edu/~jnc/tech/endpoints.txt">
    <front>
    <title>Endpoints and Endpoint names: A Proposed
    </title>
    <author initials="J." surname="Chiappa">
    <organization /> </author>
    <date year="1999"/>
    </front>
  </reference>

  <reference anchor="AFN" target="http://www.iana.org/assignments/address-family-numbers">
    <front>
    <title>Address Family Numbers</title>
    <author>
    <organization>IANA</organization> </author>
    <date month="August" year="2016"/>
    </front>
  </reference>



</references>

<section title="Acknowledgments">
  <t>An initial thank you goes to Dave Oran for planting the seeds for
  the initial ideas for LISP. His consultation continues to provide
  value to the LISP authors.</t>

  <t>A special and appreciative thank you goes to Noel Chiappa for
  providing architectural impetus over the past decades on separation
  of location and identity, as well as detailed reviews of the LISP
  architecture and documents, coupled with enthusiasm for making LISP
  a practical and incremental transition for the Internet.</t>

  <t>The original authors would like to gratefully acknowledge many people who
  have contributed discussions and ideas to the making of this
  proposal.  They include Scott Brim, Andrew Partan, John Zwiebel,
  Jason Schiller, Lixia Zhang, Dorian Kim, Peter Schoenmaker, Vijay
  Gill, Geoff Huston, David Conrad, Mark Handley, Ron Bonica, Ted
  Seely, Mark Townsley, Chris Morrow, Brian Weis, Dave McGrew, Peter
  Lothberg, Dave Thaler, Eliot Lear, Shane Amante, Ved Kafle, Olivier
  Bonaventure, Luigi Iannone, Robin Whittle, Brian Carpenter, Joel
  Halpern, Terry Manderson, Roger Jorgensen, Ran Atkinson, Stig
  Venaas, Iljitsch van Beijnum, Roland Bless, Dana Blair, Bill Lynch,
  Marc Woolward, Damien Saucez, Damian Lezama, Attilla De Groot,
  Parantap Lahiri, David Black, Roque Gagliano, Isidor Kouvelas,
  Jesper Skriver, Fred Templin, Margaret Wasserman, Sam Hartman,
  Michael Hofling, Pedro Marques, Jari Arkko, Gregg Schudel, Srinivas
  Subramanian, Amit Jain, Xu Xiaohu, Dhirendra Trivedi, Yakov Rekhter,
  John Scudder, John Drake, Dimitri Papadimitriou, Ross Callon, Selina
  Heimlich, Job Snijders, Vina Ermagan, Fabio Maino, Victor Moreno,
  Chris White, Clarence Filsfils, Alia Atlas, Florin Coras and Alberto
  Rodriguez.</t>

  <t>This work originated in the Routing Research Group (RRG) of the
  IRTF. An individual submission was converted into the IETF LISP
  working group document that became this RFC.</t>

  <t>The LISP working group would like to give a special thanks to
  Jari Arkko, the Internet Area AD at the time that the set of LISP
  documents were being prepared for IESG last call, and for his
  meticulous reviews and detailed commentaries on the 7 working group
  last call documents progressing toward standards-track RFCs.</t>

  <t>The current authors would like to give a sincere thank you to the
  people who help put LISP on standards track in the IETF.  They
  include Joel Halpern, Luigi Iannone, Deborah Brungard, Fabio Maino,
  Scott Bradner, Kyle Rose, Takeshi Takahashi, Sarah Banks, Pete Resnick,
  Colin Perkins, Mirja Kuhlewind, Francis Dupont, Benjamin Kaduk, Eric
  Rescorla, Alvaro Retana, Alexey Melnikov, Alissa Cooper, Suresh
  Krishnan, Alberto Rodriguez-Natal, Vina Ermagen, Mohamed Boucadair,
  Brian Trammell, Sabrina Tanamal, and John Drake. The contributions
  they offered greatly added to the security, scale, and robustness of
  the LISP architecture and protocols.</t>
</section>

<section title="Document Change Log">
  <t>[RFC Editor: Please delete this section on publication as RFC.]</t>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-27">
    <t><list style="symbols">
	  <t>Posted November 2019.</t>
    <t>Fixed how LSB behave in the presence of new/removed locators.</t>
    <t>Added ETR synchronization requirements when using Map-Versioning.</t>
	  <t>Fixed a large set of minor comments and edits.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-27">
    <t><list style="symbols">
	  <t>Posted April 2019 post telechat.</t>
      <t>Made editorial corrections per Warren's suggestions.</t>
      <t>Put in suggested text from Luigi that Mirja agreed with.</t>
	  <t>LSB, Echo-Nonce and Map-Versioning SHOULD be only used in closed environments.</t>
	  <t>Removed paragraph stating that Instance-ID can be 32-bit in the control-plane.</t>
	  <t>6831/8378 are now normative.</t>
	  <t>Rewritten Security Considerations according to the changes.</t>
	  <t>Stated that LSB SHOULD be coupled with Map-Versioning.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-26">
    <t><list style="symbols">
	  <t>Posted late October 2018.</t>
      <t>Changed description about "reserved" bits to state "reserved
      and unassigned".</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-25">
    <t><list style="symbols">
	  <t>Posted mid October 2018.</t>
      <t>Added more to the Security Considerations section with discussion
      about echo-nonce attacks.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-24">
    <t><list style="symbols">
	  <t>Posted mid October 2018.</t>
      <t>Final editorial changes for Eric and Ben.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-23">
    <t><list style="symbols">
	  <t>Posted early October 2018.</t>
      <t>Added an applicability statement in section 1 to address security
      concerns from Telechat.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-22">
    <t><list style="symbols">
	  <t>Posted early October 2018.</t>
      <t>Changes to reflect comments post Telechat.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-21">
    <t><list style="symbols">
	  <t>Posted late-September 2018.</t>
      <t>Changes to reflect comments from Sep 27th Telechat.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-20">
    <t><list style="symbols">
	  <t>Posted late-September 2018.</t>
      <t>Fix old reference to RFC3168, changed to RFC6040.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-19">
    <t><list style="symbols">
	  <t>Posted late-September 2018.</t>
      <t>More editorial changes.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-18">
    <t><list style="symbols">
	  <t>Posted mid-September 2018.</t>
      <t>Changes to reflect comments from Secdir review (Mirja).</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-17">
    <t><list style="symbols">
	  <t>Posted September 2018.</t>
      <t>Indicate in the "Changes since RFC 6830" section why the document
      has been shortened in length.</t>
      <t>Make reference to RFC 8085 about UDP congestion control.</t>
      <t>More editorial changes from multiple IESG reviews.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-16">
    <t><list style="symbols">
	  <t>Posted late August 2018.</t>
      <t>Distinguish the message type names between ICMP for IPv4 and
      ICMP for IPv6 for handling MTU issues.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-15">
    <t><list style="symbols">
	  <t>Posted August 2018.</t>
	  <t>Final editorial changes before RFC submission for Proposed
	  Standard.</t>
      <t>Added section "Changes since RFC 6830" so implementers are informed
      of any changes since the last RFC publication.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-14">
    <t><list style="symbols">
      <t>Posted July 2018 IETF week.</t>
      <t>Put obsolete of RFC 6830 in Intro section in addition to abstract.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-13">
    <t><list style="symbols">
	  <t>Posted March IETF Week 2018.</t>
	  <t>Clarified that a new nonce is required per RLOC.</t>
	  <t>Removed 'Clock Sweep' section. This text must be placed in a
	  new OAM document.</t>
	  <t>Some references changed from normative to informative</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-12">
    <t><list style="symbols">
	<t>Posted July 2018.</t>
    <t>Fixed Luigi editorial comments to ready draft for RFC status.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-11">
    <t><list style="symbols">
	  <t>Posted March 2018.</t>
	  <t>Removed sections 16, 17 and 18 (Mobility, Deployment and
	  Traceroute considerations). This text must be placed in a new
	  OAM document.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-10">
    <t><list style="symbols">
	  <t>Posted March 2018.</t>
	  <t>Updated section 'Router Locator Selection' stating that the
	  Data-Plane MUST follow what's stored in the Map-Cache
	  (priorities and weights).</t>
	  <t>Section 'Routing Locator Reachability': Removed bullet point
	  2 (ICMP Network/Host Unreachable),3 (hints from BGP),4 (ICMP
	  Port Unreachable),5 (receive a Map-Reply as a response) and RLOC
	  probing </t>
	  <t>Removed 'Solicit-Map Request'.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-09">
    <t><list style="symbols">
      <t>Posted January 2018.</t>
      <t>Add more details in section 5.3 about DSCP processing during
      encapsulation and decapsulation.</t>
      <t>Added clarity to definitions in the Definition of Terms section
      from various commenters.</t>
      <t>Removed PA and PI definitions from Definition of Terms section.</t>
      <t>More editorial changes.</t>
      <t>Removed 4342 from IANA section and move to RFC6833 IANA section.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-08">
    <t><list style="symbols">
      <t>Posted January 2018.</t>
      <t>Remove references to research work for any protocol mechanisms.</t>
      <t>Document scanned to make sure it is RFC 2119 compliant.</t>
      <t>Made changes to reflect comments from document WG shepherd Luigi
      Iannone.</t>
      <t>Ran IDNITs on the document.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-07">
    <t><list style="symbols">
      <t>Posted November 2017.</t>
      <t>Rephrase how Instance-IDs are used and don't refer to <xref
      target="RFC1918"/> addresses.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-06">
    <t><list style="symbols">
      <t>Posted October 2017.</t>
      <t>Put RTR definition before it is used.</t>
      <t>Rename references that are now working group drafts.</t>
      <t>Remove "EIDs MUST NOT be used as used by a host to refer to
      other hosts.  Note that EID blocks MAY LISP RLOCs".</t>
      <t>Indicate what address-family can appear in data packets.</t>
      <t>ETRs may, rather than will,  be the ones to send Map-Replies.</t>
      <t>Recommend, rather than mandate, max encapsulation headers to 2.</t>
      <t>Reference VPN draft when introducing Instance-ID.</t>
      <t>Indicate that SMRs can be sent when ITR/ETR are in the same node.</t>
      <t>Clarify when private addresses can be used.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-05">
    <t><list style="symbols">
      <t>Posted August 2017.</t>
      <t>Make it clear that a Re-encapsulating Tunnel Router is an RTR.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-04">
    <t><list style="symbols">
      <t>Posted July 2017.</t>
      <t>Changed reference of IPv6 RFC2460 to RFC8200.</t>
      <t>Indicate that the applicability statement for UDP zero checksums
      over IPv6 adheres to RFC6936.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-03">
    <t><list style="symbols">
      <t>Posted May 2017.</t>
      <t>Move the control-plane related codepoints in the IANA Considerations
      section to RFC6833bis.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-02">
    <t><list style="symbols">
      <t>Posted April 2017.</t>
      <t>Reflect some editorial comments from Damien Sausez.</t>
    </list></t>
  </section>

  <section title="Changes to draft-ietf-lisp-rfc6830bis-01">
    <t><list style="symbols">
      <t>Posted March 2017.</t>
      <t>Include references to new RFCs published.</t>
      <t>Change references from RFC6833 to RFC6833bis.</t>
      <t>Clarified LCAF text in the IANA section.</t>
      <t>Remove references to "experimental".</t>
    </list></t>
  </section>

   <section title="Changes to draft-ietf-lisp-rfc6830bis-00">
      <t><list style="symbols">
        <t>Posted December 2016.</t>
        <t>Created working group document from draft-farinacci-lisp
        -rfc6830-00 individual submission. No other changes made.</t>
       </list></t>
   </section>
</section>

</back>
</rfc>
