<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="no"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-ietf-rift-kv-registry-05" ipr="trust200902" obsoletes="" submissionType="IETF" updates="" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 2.45.3 -->
  <front>
    <title abbrev="draft-ietf-rift-kv-registry-05">
            RIFT Key/Value Structure and Registry 
    </title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-rift-kv-registry-05"/>
    <author role="editor" fullname="Jordan Head" initials="J." surname="Head">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>1137 Innovation Way
          </street>
          <city>Sunnyvale</city>
          <region>CA
          </region>
          <code/>
          <country>USA
          </country>
        </postal>
        <phone/>
        <email>jhead@juniper.net
        </email>
        <uri/>
      </address>
    </author>
    <author fullname="Tony Przygienda" initials="T." surname="Przygienda">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>1137 Innovation Way
          </street>
          <city>Sunnyvale</city>
          <region>CA
          </region>
          <code/>
          <country>USA
          </country>
        </postal>
        <phone/>
        <email>prz@juniper.net
        </email>
        <uri/>
      </address>
    </author>
    <date year="2023"/>
    <area>Routing Area</area>
    <workgroup>RIFT</workgroup>
    <keyword>rift</keyword>
    <keyword>kv</keyword>
    <abstract>
      <t>The RIFT (Routing in Fat-Trees) protocol allows for key/value
            pairs to be advertised within Key-Value Topology Information Elements 
            (KV-TIEs). The data contained within these KV-TIEs can be 
            used for any imaginable purpose. This document defines the
            various Key-Types (i.e. Well-Known, OUI, and Experimental) and a 
            method to structure corresponding values.
      </t>
    </abstract>
    <note>
      <name>Requirements Language</name>
      <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 asdescribed in BCP 
        14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all 
        capitals, as shown here.
      </t>
    </note>
  </front>
  <middle>
    <section toc="default" numbered="true">
      <name>Introduction</name>
      <t>The Routing in Fat-Trees <xref target="RIFT" format="default">RIFT</xref> protocol  
        allows for key/value pairs to be advertised within Key-Value Topology 
        Information Elements (KV-TIEs). There are no restrictions
        placed on the type of data that is contained in KV-TIEs nor what the
        data is used for.
      </t>
      <t>For example, it might be beneficial to advertise overlay protocol state 
        from leaf nodes to the Top-of-Fabric (ToF) nodes. This would make it possible to view critical 
        state of a fabric-wide service from a single ToF node rather than 
        retrieving and reconciling the same state from multiple leaf nodes.
      </t>
    </section>
    <section numbered="true" toc="default">
      <name>Key Structure</name>
      <t>This section describes the generic Key structure and semantics, 
        <xref target="f1" format="default"/> further illustrates these components.</t>
      <figure anchor="f1">
        <name>Generic Key-Value Structure</name>
        <artwork align="center" alt="" name="" type=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Key-Type    |                Key Identifier                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Values (variable)                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    ]]></artwork>
      </figure>
      <t><strong>where:</strong></t>
      <ul empty="true" spacing="normal">
        <li>
          <dl newline="true" spacing="normal">
            <dt><strong>Key-Type:</strong></dt>
            <dd>
              <t>A 1-byte value that identifies the Key-Type. It MUST be a 
              reserved value from the RIFT Key-Type Registry that is defined 
              later in this document.</t>
              <t>The range of valid values is 1 - 255 (2^8-1).</t>
              <t>0 is an illegal value and MUST NOT be allocated to or used by any 
               implementation. It MUST be ignored on receipt.</t>
            </dd>
            <dt><strong>Key Identifier:</strong></dt>
            <dd>
              <t>A 3-byte value that identifies the specific key and describes 
              the structure of the contained values.</t>
              <t>The range of valid values is 1 - 16777215 (2^24-1).</t>
              <t>0 is an illegal value and MUST NOT be allocated to or used by any 
                  implementation. It MUST be ignored on receipt.</t>
            </dd>
            <dt><strong>Values:</strong></dt>
            <dd>A variable length value that contains data associated with the 
              Key Identifier. It SHOULD contain 1 or more elements. Whether the collection
              of elements allows duplicates and/or is ordered is governed by
              the particular Key Identifier's specification.</dd>
          </dl>
        </li>
      </ul>
      <section numbered="true" toc="default">
        <name>Experimental Key-Type</name>
        <t>This section reserves a value in the RIFT Key-Type Registry to indicate an
        Experimental Key-Type.</t>
        <t>As shown in <xref target="f2" format="default"/>, the Key-Type will be used to 
        identify the Key-Type as Experimental. The Key Identifier will be
        used to identify the specific key and describe the 
        structure of the contained values.
        </t>
        <figure anchor="f2">
          <name>Experimental Key-Type</name>
          <artwork align="center" alt="" name="" type=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       1       |          Experimental Key Identifier          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Experimental Values (variable)                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    ]]></artwork>
        </figure>
      </section>
      <section numbered="true" toc="default">
        <name>Well-Known Key-Type</name>
        <t>This section reserves a value in the RIFT Key-Type Registry to indicate 
        Well-Known Key-Types that all implementations SHOULD support.</t>
        <t>As shown in <xref target="f3" format="default"/>, the Key-Type will be used to 
        identify the Key-Type as Well-Known. The Key Identifier will be 
        used to identify the specific key and describe the structure of 
        the contained values.
        </t>
        <figure anchor="f3">
          <name>Well-Known Key-Type</name>
          <artwork align="center" alt="" name="" type=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       2       |        Well-Known Key Identifier              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Well-Known Values (variable)                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    ]]></artwork>
        </figure>
      </section>
      <section numbered="true" toc="default">
        <name>OUI Key-Type</name>
        <t>This section reserves a value in the RIFT Key-Type Registry to indicate an
        OUI (vendor-specific) Key-Type that any implementation MAY support.</t>
        <t>As shown in <xref target="f4" format="default"/>, the Key-Type will be used to 
        identify the Key-Type as OUI. The Key Identifier MUST use the implementing 
        organization's reserved OUI space to indicate the key and value structure.
        </t>
        <figure anchor="f4">
          <name>OUI Key-Type</name>
          <artwork align="center" alt="" name="" type=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       3       |              OUI Key Identifier               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Vendor Specific Values (variable)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    ]]></artwork>
        </figure>
      </section>
    </section>
    <section anchor="design" toc="default" numbered="true">
      <name>Design Considerations</name>
      <t>While no restrictions are placed on Key-Value data or what it is used for, it 
        is RECOMMENDED that a serialized <xref target="THRIFT">Thrift</xref> model be used for simpler interoperability. 
        <xref target="RIFT-AUTO-EVPN" format="default"/> is an example of 
        this type of implementation.</t>
      <t>Key-Value elements SHOULD NOT be used to carry topology information
        used by RIFT itself to perform distributed computations.</t>
      <section anchor="tie-breaking" toc="default" numbered="true">
        <name>Tie-Breaking Considerations</name>
        <t>In cases where KV-TIEs are flooded from north to south, policies SHOULD be implemented 
        in order to avoid network-wide flooding.</t>
        <t>For networks with more than one ToF node, it is RECOMMENDED that those ToF nodes contain identical KV-TIE 
          information when being distributed from north to south. <xref target="RIFT" format="default">RIFT</xref> requires 
          that only one KV-TIE is selected when identical keys are received from multiple northbound neighbors. 
          If this is not considered then the tie-breaking rules may cause a node to select a suboptimal KV-TIE. 
          Consider a case where failure conditions cause the ToF nodes to become split-brained. While the Key-Type and Key Identifier will 
          be identical, the value(s) contained within may differ. The node(s) receiving these differing KV-TIEs will select 
          the one from the ToF node with the highest System ID, potentially leading to unintended effects.
        </t>
        <section>
          <name>Southbound Key-Value TIE Tie-Breaking Key/Value Pair</name>
          <t>This Key/Value pair contains information that allows for verification of proper tie-breaking for the Southbound 
            Key store.
          </t>
          <figure>
            <name>Southbound Tie-Break (Global) Key/Value Pair</name>
            <artset>
              <artwork align="center" name="" type="ascii-art" originalSrc="art/rift-kv-global-southbound-tie-break-kv.ascii-art"> 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Well-Known  |         Southbound Tie-Break (Global)          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     (System ID,                                               |
|      Level),                                                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+</artwork>
            </artset>
          </figure>
          <t><strong>where:</strong></t>
          <ul empty="true" spacing="normal">
            <li>
              <dl newline="true" spacing="normal">
                <dt><strong>System ID:</strong></dt>
                <dd>A REQUIRED value indicating the node's unique System ID.</dd>
                <dt><strong>Level:</strong></dt>
                <dd>A RECOMMENDED value indicating the node's level.</dd>
              </dl>
            </li>
          </ul>
          <!-- <t>Implementations leveraging this tie-breaking mechanism SHOULD refer 
            to the <xref target="app-src-auto-evpn-kv-schema">southbound_kv.thrift</xref> schema in the appendix.</t> -->
        </section>
      </section>
    </section>
    <section anchor="IANA" toc="default" numbered="true">
      <name>IANA Considerations</name>
      <t>Per <xref target="RFC8126"/>, IANA is requested to create two new registries under the top-level "RIFT" category:</t>
      <ul>
        <li>RIFT Key-Types</li>
        <li>RIFT Well-Known Key-Types</li>
      </ul>
      <t>The following sections detail each registry's individual requirements and suggested values.</t>
      <t>Experts reviewing requests for new values to either registry MUST consider the items in the 
        <xref target="expert_review_guide">Expert Review Guidance</xref> section.</t>
      <section numbered="true" toc="default">
        <name>RIFT Key-Types</name>
        <t>This section requests that IANA create and help govern the following registry:</t>
        <ul empty="true" spacing="normal">
          <li>
            <dl newline="true" spacing="normal">
              <dt><strong>Registry Name:</strong></dt>
              <dd>RIFT Key-Types</dd>
              <dt><strong>Registration Procedures:</strong></dt>
              <dd>Expert Review</dd>
              <dt><strong>Description:</strong></dt>
              <dd>Key-Type registry for the RIFT protocol.</dd>
              <dt><strong>Reference:</strong></dt>
              <dd>This document.</dd>
            </dl>
          </li>
        </ul>
        <section numbered="true" toc="default">
          <name>RIFT Key-Types Requested Entries</name>
          <t>This section requests that IANA register the following suggested values 
            to the "RIFT Key-Types" registry.
          </t>
          <table align="left">
            <thead>
              <tr>
                <th align="left">Value</th>
                <th align="left">Key-Type</th>
                <th align="left">Description</th>
                <th align="left">Status/Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left">0</td>
                <td align="left">Illegal</td>
                <td align="left">Not allowed.</td>
                <td align="left">This document</td>
              </tr>
              <tr>
                <td align="left">1</td>
                <td align="left">Experimental</td>
                <td align="left">Indicates that the Key-Type is Experimental.</td>
                <td align="left">This document.</td>
              </tr>
              <tr>
                <td align="left">2</td>
                <td align="left">Well-Known</td>
                <td align="left">Indicates that the Key-Type is Well-Known.</td>
                <td align="left">This document.</td>
              </tr>
              <tr>
                <td align="left">3</td>
                <td align="left">OUI</td>
                <td align="left">Indicates that the Key-Type is OUI (vendor specific).</td>
                <td align="left">This document.</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section numbered="true" toc="default">
        <name>RIFT Well-Known Key-Types</name>
        <t>This section requests that IANA create and help govern the following registry:</t>
        <ul empty="true" spacing="normal">
          <li>
            <dl newline="true" spacing="normal">
              <dt><strong>Registry Name:</strong></dt>
              <dd>RIFT Well-Known Key-Types</dd>
              <dt><strong>Registration Procedures:</strong></dt>
              <dd>Expert Review</dd>
              <dt><strong>Description:</strong></dt>
              <dd>Well-Known Key-Types registry for the RIFT protocol.</dd>
              <dt><strong>Reference:</strong></dt>
              <dd>This document.</dd>
            </dl>
          </li>
        </ul>
        <section numbered="true" toc="default">
          <name>RIFT Well-Known Key-Types Requested Entries</name>
          <t>This section requests that IANA register the following suggested values 
              to the "RIFT Well-Known Key-Types" Registry.
          </t>
          <table align="left">
            <thead>
              <tr>
                <th align="left">Value</th>
                <th align="left">Key-Identifier</th>
                <th align="left">Description</th>
                <th align="left">Status/Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left">0</td>
                <td align="left">Illegal</td>
                <td align="left">Not allowed.</td>
                <td align="left">This document.</td>
              </tr>
              <tr>
                <td align="left">1</td>
                <td align="left">MAC/IP Binding</td>
                <td align="left">To be defined.</td>
                <td align="left">To be defined.</td>
              </tr>
              <tr>
                <td align="left">2</td>
                <td align="left">FAM Security Roll-Over Key</td>
                <td align="left">To be defined.</td>
                <td align="left">To be defined.</td>
              </tr>
              <tr>
                <td align="left">127</td>
                <td align="left">Southbound Tie-Break Key</td>
                <td align="left">Used for Southbound Keystore tie-breaking purposes.</td>
                <td align="left">This document.</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="expert_review_guide" toc="default" numbered="true">
        <name>Expert Review Guidance</name>
        <t>Experts reviewing requests for values from the "RIFT Key-Types" registry or 
          the "RIFT Well-Known Key-Types" registry are responsible for the following:</t>
        <ol>
            <li>
            <t>Determining the existence of a specification that clearly 
              defines the purpose supporting the request and MUST contain all 
              required fields for given registry.</t>
            <t>The document MUST also be permenent and publically available.</t>
          </li>
          <li>
            <t>Ensuring that any requests are made available to the RIFT working 
              group for review should the work originate from outside of the RIFT
              Working Group.</t>
          </li>
          <li>
            <t>Ensuring that any work produce outside of the IETF does not conflict 
              with any work that is already published or actively pursuing being 
              published.</t>
          </li>
        </ol>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>This document introduces no new security concerns to RIFT or other
         specifications referenced in this document given that the Key-Value TIEs
         are already extensively secured by the
         <xref target="RIFT" format="default">RIFT</xref> protocol specification itself. 
      </t>
    </section>
    <section numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>To be provided.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="BCP" value="14"/>
          <author initials="S." surname="Bradner" fullname="S. Bradner">
            <organization/>
          </author>
          <date year="1997" month="March"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
      </reference>
      <reference anchor="RFC8126" target="https://www.rfc-editor.org/info/rfc8126" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml">
        <front>
          <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
          <author initials="M." surname="Cotton" fullname="M. Cotton">
            <organization/>
          </author>
          <author initials="B." surname="Leiba" fullname="B. Leiba">
            <organization/>
          </author>
          <author initials="T." surname="Narten" fullname="T. Narten">
            <organization/>
          </author>
          <date year="2017" month="June"/>
        </front>
      </reference>
      <reference anchor="RIFT" target="https://www.ietf.org/archive/id/draft-ietf-rift-rift-15.pdf">
        <front>
          <title>RIFT: Routing in Fat Trees</title>
          <seriesInfo name="Work in Progress" value="draft-ietf-rift-rift-15"/>
          <author initials="T." surname="Przygienda" fullname="Tony Przygienda">
            <organization/>
          </author>
          <author initials="A." surname="Sharma" fullname="Alankar Sharma">
            <organization/>
          </author>
          <author initials="P." surname="Thubert" fullname="Pascal Thubert">
            <organization/>
          </author>
          <author initials="B." surname="Rijsman" fullname="Bruno Rijsman">
            <organization/>
          </author>
          <author initials="D." surname="Afanasiev" fullname="Dmitry Afanasiev">
            <organization/>
          </author>
          <date month="July" year="2021"/>
        </front>
      </reference>
    </references>
    <references>
      <name>Informative References</name>
      <reference anchor="RIFT-AUTO-EVPN" target="https://www.ietf.org/archive/id/draft-ietf-rift-auto-evpn-03.html">
        <front>
          <title>RIFT Auto-EVPN</title>
          <seriesInfo name="Work in Progress," value="draft-ietf-rift-auto-evpn-03"/>
          <author initials="J." surname="Head" fullname="Jordan Head">
            <organization/>
          </author>
          <author initials="T." surname="Przygienda" fullname="Tony Przygienda">
            <organization/>
          </author>
          <author initials="W." surname="Lin" fullname="Wen Lin">
            <organization/>
          </author>
          <date month="June" year="2022"/>
        </front>
      </reference>
      <reference anchor="THRIFT" target="https://github.com/apache/thrift/tree/0.15.0/doc">
        <front>
          <title>Thrift Language Implementation and Documentation</title>
          <author>
            <organization>Apache Software Foundation</organization>
          </author>
          <date/>
        </front>
      </reference>
    </references>
    <section anchor="app-additional-thrift" numbered="true" toc="default">
      <name>Thrift Models</name>
      <t>This section contains the normative Thrift models required to support Auto-EVPN. 
        Per the main <xref target="RIFT">RIFT</xref> specification, all signed 
        values MUST be interpreted as unsigned values.</t>
      <section anchor="app-rift-common-thrift-model">
        <name>southbound_kv.thrift</name>
        <figure title="RIFT Key-Value Store: southbound_kv.thrift">
          <name>RIFT Common Schema for Auto-EVPN</name>
          <artset>
            <artwork align="left" type="ascii-art" originalSrc="art/southbound_kv.thrift.ascii-art">include "common.thrift"

namespace py southbound_kv
namespace rs models

const i8            GlobalSystemIdentifierKV  = 127

/** simple type to test correct tie-breaking based on system ID */
struct SystemIdentifierKV {
    1:  required   common.SystemIDType         system_id,
    2:  optional   common.LevelType            level,
}

</artwork>
          </artset>
        </figure>
      </section>
    </section>
  </back>
</rfc>
