<?xml version="1.0" encoding="UTF-8"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->

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

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

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

    <title abbrev="LISP Transport for Policy Distribution">LISP Transport for Policy Distribution </title>

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

    <!-- Another author who claims to be an editor -->
    <author fullname="Michael Kowal" initials="M." surname="Kowal">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>111 Wood Ave. South</street>
          <code>08830</code>
          <city>Iselin</city>
          <region>NJ</region>
          <country>USA</country>
        </postal>
        <email>mikowal@cisco.com</email>
      </address>
    </author>

    <author fullname="Marc Portoles Comeras" initials="M." surname="Portoles">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>170 Tasman Drive</street>
          <code>95134</code>
          <city>San Jose</city>
          <region>CA</region>
          <country>USA</country>
        </postal>
        <email>mportole@cisco.com</email>
      </address>
    </author>

    <author fullname="Amit Jain" initials="A." surname="Jain">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>1133 Innovation Way</street>
          <code>94089</code>
          <city>Sunnyvale</city>
          <region>CA</region>
          <country>USA</country>
        </postal>
        <email>atjain@juniper.net</email>
      </address>
    </author>

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

    <date year="2022" />

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

    <!-- Meta-data Declarations -->

    <area>Internet</area>

    <workgroup>Network Working Group</workgroup>

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

    <keyword>LISP; Overlay, QoS</keyword>

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

    <abstract>
      <t> This document describes the use of the Locator/ID Separation Protocol
        (LISP) to encode and transport data models for the configuration of
        LISP ITRs.</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in
      <xref target="RFC2119"/>.</t>
    </note>

  </front>

  <middle>

    <section title="Introduction">
      <t>When LISP ITRs are deployed with enough configuration to build a LISP overlay, they may require additional
        configurations such as security, QoS, and/or traffic forwarding policies. As networks continue to grow, it
        can be challenging to ensure these configurations are distributed to many ITRs and kept in sync. LISP network
        operators may wish to re-use their existing LISP architecture to distribute these configurations as opposed to
        configuring them by hand, using a script, or investing in a configuration management system. The configurations
        can be distributed via a mapping system that the network operator manages or is managed by a third-party
        as part of a managed service offering.</t>
    </section>

    <section title="Definition of Terms">
      <t> LISP related terms are defined as part of the LISP specification
        <xref target="RFC6830"/>, notably EID, RLOC, Map-Request, Map-
       Reply, Map-Notify, Ingress Tunnel Router (ITR), Egress Tunnel Router (ETR), Map-
       Server (MS) and Map-Resolver (MR). </t>
    </section>

    <section title="Policy Distribution Use Cases">
    <t>The ITR could use the mapping system to receive configuration policies
      for use cases such as:
    <list style="symbols">
        <t>The RLOC interfaces of an ITR may be connected to WAN links that are
          policed at sub-line rate by its upstream provider. Using the mapping
          system, the ITR could receive and apply the QoS policies that would
          shape traffic to the correct rate on each ITR RLOC interface.</t>

        <t>ITRs use the mapping system to receive access-list (ACL)
          configuration(s) that would allow them to restrict traffic from
          authorized sources to authorized services.</t>

        <t>ITRs receive configurations that determine local forwarding
          policies, such as specifying ITR RLOCs to be used for egress
          forwarding on a per-application basis or RLOCs on different ITRs
          within the same LISP site to maintain application symmetry.</t>

        <t>Baseline configurations for common services (e.g., DNS, SSH, Syslog)
          can be maintained in a mapping system and distributed across
          multiple ITRs.</t>
      </list></t>
      <t>Policy distribution is not meant to provide zero-touch provisioning
        for ITRs within a LISP network. At a minimum, the ITR must have a map
        resolver defined, IP connectivity to the map resolver, and one or more
        distinguished names <xref target="I-D.ietf-lisp-name-encoding"/> defined
        for receiving specific policies from the mapping system.</t>
    </section>

    <section title="Policy Distribution: Packet Flow Description">
      <t>The following figure illustrates a reference system used to support
      packet flow descriptions in this section.</t>

        <figure anchor="figure_reference"
                title="Reference system for policy distribution">
          <artwork><![CDATA[
                 +----------+         +-+---+
                 |controller|---------|MS/MR|
                 +----------+         +-----+
                                         |
                     _..-._.--._...._.,.-|_.,--._.-_._.-.._
                 .-.'                                      '.-.
                (                  RLOC SPACE                  )
                (                                              )
                 '..'.-._.'--'._.'.-._.'.-._.'.-._.'.-._.'.--.'
                          /                           \
                   (ifaceA)                         (ifaceB)
                  +-+--+--+                         +-+--+--+
                 .| xTR A |.-.                     .| xTR B |.-.
                ( +-+--+--+   )                   ( +-+--+--+   )
               .'   Site A   )                   .'   Site B   )
               (            .                    (             .
               '--'._.'.     )                    '--'._.'.     )
                         '--'                               '--'
           ]]></artwork>
        </figure>

      <t>The reference system contains two sites, site A and site B, with
        corresponding xTR-A and xTR-B providing encapsulation and decapsulation
        services for the overlay traffic. xTR-A uses interface-A to forward and
        receive encapsulated traffic through the RLOC space; and xTR-B uses
        interface-B for it.</t>

      <t>For packet flow purposes the reference system assumes that a network
        controller provides the policies to a map-server.</t>

      <t>When an ITR comes up, it requests it's designated policies with
        it's map-server. The MS may have this policy configured by the
        administrator via a network controller.</t>

        <section title="Policy Distribution">
          <t>The following is an illustration of the sequence to distribute a
            policy registered by the controller with the mapping system, down
            to an ITR that requests its designated policies. In the
            example &lt;ITR-A&gt; represents the hostname of the ITR that learns a
            policy using this mechanism.</t>

          <t><list style="symbols">
              <t>The Mapping-System is either configured by an operator or
                learns a mapping sent by a controller though a Map-Register.
                The Mapping System learns the mapping: EID=”policy-&lt;ITR-A&gt;” -->
                RLOC= “{ "shape":{ "interface":"ifaceA", "direction":"outbound",
                 "value":100Mbps }}”. The EID is encoded as a Distinguished
                 Name and the RLOC as a JSON string.</t>

              <t>ITR-A is configured to dynamically learn policies from
                the Mapping System with the name “policy-ITR-A”
                (policy followed by its hostname).</t>

              <t>ITR-A sends a Map-Request to the Mapping System with
                EID=”policy-&lt;ITR-A&gt;” encoded as a Distinguished Name.
                The Map-Request is sent with the N-bit set.</t>

              <t>The Mapping System forwards the request to the appropriate
                Map-Server. The Map-Server adds ITR-A to the subscription list
                of EID=”policy-&lt;ITR-A&gt;” and sends back a Map-Notify with the
                mapping that the controller has registered.</t>

              <t>When ITR-A receives the Map-Notify installs the received
                policy locally, to shape traffic sent over the RLOC facing
                interface.</t>

              <t>Note that when the map-server has multiple policies
                associated with this ITR, it can send each one of the policies
                as an additional locator record (following the same JSON
                format) in the mapping. The locator count in the Map-Notify
                reflects the number of policies distributed with the
                mapping.</t>
            </list></t>
        </section>

        <section title="Policy Updates">
          <t>Policy distribution takes advantage of the LISP pubsub model to
            ensure that router updates are properly distributed when policies
            change. In such a case, and using the same reference sytem as
            above, the information exchange  is as follows:
            <list style="symbols">
                <t>The controller sends a Map-Register to the Mapping System,
                  updating the policy mapping with: EID=”policy-&lt;ITR-A&gt;” -->
                  RLOC= “{ "shape":{ "interface":"ifaceA",
                  "direction":"outbound", "value":200Mbps }}”.</t>

                <t>When the corresponding Map-Server receives this update it
                  checks the list of ITRs subscribed for updates of
                  EID=”policy-&lt;ITR-A&gt;” and finds out that ITR-A is
                  subscribed.</t>

                <t>The Map-Server sends a Map-Notify to ITR-A with the updated
                  mapping information that has been registered.</t>

                <t>When ITR-A receives and validates the Map-Notify, it updates
                  the local policy, changing the shaping rate as specified in
                  the new JSON description. Note that if the JSON specifies
                  the same policy that is currently applied the notification
                  is ignored.</t>
              </list></t>
        </section>
    </section>
    <section title="Mapping System Operations">
      <t>The mapping system that is used for distributing policy configurations
        can be managed by either the administrator who owns and operates their
        own LISP sites or a third-party administrator who offers LISP mapping
        system functionality as a managed service. A controller or orchestrator
        could be used to update and optimize policies within the mapping system
        based on network or ITR telemetry.</t>

      <t>Within the mapping system, the administrator must define a
        distinguished name that is specific to an ITR. The distinguished name
        is associated with the specific policy configurations that the ITR is
        to receive. Each ITR is configured with the minimal requirements to
        perform a mapping request procedure as well as a distinguished name
        that can be matched upon in the mapping system.</t>

      <t>Map-Servers should be able to receive policy registrations through
        the Map-Registration process. The Map-Registration must encode the
        policy following the specification in the policy distribution
        encoding section.</t>
    </section>
    <section title="Policy Distribution Process">
      <t>The ITR subscribes to its policy via the Map-Request procedure defined
        in section 5 of <xref target="I-D.ietf-lisp-pubsub"/>. The PubSub
        procedure is used to ensure that policies can be updated or audited
        after an ITR has received them. Policies are published to the ITR
        from the mapping system using the mapping notification procedure
        defined in section 6 of <xref target="I-D.ietf-lisp-pubsub"/>.</t>

      <t>EID-to-RLOC mappings used for policy distribution are of the type
        EID &lt;Distinguished Name&gt; to RLOC &lt;JSON policy specification&gt;.
        The EID is a distinguished name uniquely identifying a router
        in the system, while each RLOC record uses JSON encoding to
        specify the particular policy (or policies) that this router
        needs to implement.</t>
    </section>
    <section title="Policy Distribution Encoding">
      <t>When the ITR is configured to receive a policy using a distinguished
        name, the ITR sends a subscription for the EID record encoded as this
        Distinguished Name. When a policy has been registered with the Mapping
        System for this Distinguished Name, the ITR receives a publication
        with a list of policies as RLOC records and encoded as JSON strings
        (as defined in section 5.4 of <xref target="RFC8060"/>.</t>

      <t> Example encoding for QoS policy that shapes traffic to 50 percent
          of the line-rate: EID-Record encoded as distinguished name
          “policy-ce-router1” RLOC-Record record encoded as JSON string
          “{"shape":{"interface":"ethernet1","direction":"outbound",
          "unit":"percent","value":50}}”</t>

      <t>Example encoding for setting the ITR’s NTP server to 10.10.10.10:
        EID-Record encoded as distinguished name “policy-ce-router”
        RLOC-Record record encoded as JSON string "{"NTP-address":
        "10.10.10.10"}"</t>

      <t>Multiple ITRs can be configured to use multiple distinguished names
        for receiving multiple sets policies. This allows for an ITR to receive
        specific policies and many ITRs to receive policies that can be broadly
        applied. Referring to the two examples above, an ITR can be configured
        to use a distinguished name of “policy-ce-router1” to receive a QoS
        configuration that is specific to that node while also using a
        distinguished name of “policy-ce-router” to receive configurations that
        are common to each ITR in the LISP network (e.g., NTP configuration).
        The use of multiple distinguished names per ITR reduces the amount of
        configuration within the mapping system.</t>
    </section>


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

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>Thanks to James Stankiewicz for his thorough comments and suggestions.</t>
    </section>




  </middle>

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

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

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

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

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

    </references>

    <references title="Informative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-name-encoding.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-lisp-pubsub-09.xml"?>
    </references>
  </back>
</rfc>
