<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-wang-lsr-isis-big-tlv-01" ipr="trust200902">
  <front>
    <title abbrev="IS-IS big TLV">IS-IS Extension for Big TLV</title>

    <author fullname="Aijun Wang" initials="A" surname="Wang">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street>Beiqijia Town, Changping District</street>

          <city>Beijing</city>

          <region/>

          <code>102209</code>

          <country>China</country>
        </postal>

        <email>wangaj3@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Huaimo Chen" initials="H" surname="Chen">
      <organization>Individual</organization>

      <address>
        <postal>
          <street/>

          <city>Boston, MA</city>

          <region/>

          <code/>

          <country>USA</country>
        </postal>

        <email>hchen.ietf@gmail.com</email>
      </address>
    </author>

    <author fullname="Jie Dong" initials="J" surname="Dong">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <region/>

          <code/>

          <country>China</country>
        </postal>

        <email>jie.dong@huawei.com</email>
      </address>
    </author>

    <author fullname="Changwang" initials="C" surname="Lin">
      <organization>New H3C Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country>China</country>
        </postal>

        <email>linchangwang.04414@h3c.com</email>
      </address>
    </author>

    <author fullname="Gyan S. Mishra" initials="G" surname="Mishra">
      <organization>Verizon</organization>

      <address>
        <postal>
          <street>13101 Columbia Pike</street>

          <city>Silver Spring</city>

          <code>MD 20904</code>

          <country>USA</country>
        </postal>

        <phone>301 502-1347</phone>

        <email>hayabusagsm@gmail.com</email>
      </address>
    </author>

    <date day="18" month="February" year="2025"/>

    <abstract>
      <t>The IS-IS routing protocol uses TLV (Type-Length-Value) encoding in a
      variety of protocol messages. The original IS-IS TLV definition allows
      for 255 octets of value in maximum. This document proposes a solution to
      IS-IS extension for encoding the TLV whose value is bigger than 255
      octets.</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"/>
      <xref target="RFC8174"/> when, and only when, they appear in all
      capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <!-- Introduction -->

    <section title="Introduction">
      <t>Type-Length-Value (TLV) encoding of information is widely used in
      Intermediate System to Intermediate System (IS-IS) routing protocol
      messages including Link State Protocol Data Units (LSPs). Each TLV
      defined in <xref target="ISO10589"/> allows for maximum of 255 octets of
      value (or say payload). This is because the length field of the TLV is
      one octet, which has 255 as its maximum value. When the size of the
      value of a TLV of type T (such as the Extended IS Reachability TLV of
      type 22) is bigger than 255 octets, this TLV is called a Big TLV of type
      T (or Big TLV for short). There is no general mechanism for encoding and
      distributing this Big TLV in classic IS-IS.</t>

      <t>IS-IS has been optionally extended by which permits larger TLV value,
      in principle up to 65,535 octets due to a two-octet length field.
      However, the<xref target="RFC7356"/> extensions are not widely deployed,
      are not backward compatible in the sense that they use a new Protocol
      Data Unit (PDU) and new LSP types that un-extended implementations will
      ignore, and in any case do not support values so large they do not fit
      into a single packet.</t>

      <t>This document proposes a simple IS-IS extension for encoding and
      distributing the Big TLVs whose value parts are bigger and can't be
      accommodated in a single TLV. This extension uses a "Container TLV".</t>
    </section>

    <!-- Introduction -->

    <section anchor="ex4-big-tlv" title="IS-IS Extension for Big TLV">
      <t>A new TLV, called the Container TLV, is defined. <xref
      target="new-tlv"/> shows the format of the new TLV in the classic <xref
      target="ISO10589"/> case. This new TLV is used to carry a piece of the
      value of a Big TLV of type T. <figure anchor="new-tlv"
          title="Format of Container TLV">
          <artwork align="center"><![CDATA[
  0                   1       
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+        -----------+
 |  Type (TBD1)  |    Length     |                   |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  --+              |
 |  Type (T)     |    Flag     |F|    |         Container TLV
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |        of type TBD1
 |      Length of Type T         |    |              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |              |
 |       Identification          |    |              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Value of         | 
 | Piece of value of Big TLV of  |  Container TLV    |
 ~ type T (less than 252 octets) ~    |              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  --+   -----------+
]]></artwork>
        </figure></t>

      <t>Type (TBD1) field: 1 octet. The type of the Container TLV, its value
      is assigned by IANA.</t>

      <t>Length field: 1 octet. The length of the Value field of the Container
      TLV.</t>

      <t>Value field: contains a Type (T) field, a Flag field, Length of Type
      T, a Identification field and a Piece of value of Big TLV of type T
      (Piece field for short).</t>

      <t>Type (T) field: 1 octet, Indicates the Type of the Big TLV that is
      being transported in this Container TLV.</t>

      <t>Flag field: 1 octet. Defines flag for the container TLV. F(bit 0)
      First Piece Flag is defined now, when F bit is set, it indicates the
      container is the first piece of Big TLV; Other pieces within the Big TLV
      will unset the F bit.</t>

      <t>Length of Type T: 2 octets. Actual lengths of Big TLV.</t>

      <t>Identification field: 2 octets. Together with Type(T), can identify
      unique Big TLV that each container TLV belongs to. The sender of Big TLV
      should keep the identification filed same when it fragments the Big TLV
      into several pieces which encapsulated within the container TLV. The
      receiver of the Big TLV should assemble the container TLV with the same
      identification field and Type(T) into the original Big TLV.</t>

      <t>Piece field: A piece of the value of the Big TLV of type T that is
      being transported in this Container TLV.</t>

      <t><!---->When a node has a Big TLV of type T to be originated, it
      splits the value of the Big TLV into a number of pieces, from Piece 1 to
      Piece n. Each piece from Piece 1 to Piece n is less than 252 octets.</t>

      <t>This is illustrated in <xref target="big-payload"/>.</t>

      <t><figure anchor="big-payload"
          title="Big TLV of type T with value field bigger than 255 octets">
          <artwork align="center"><![CDATA[
  0                   1       
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Type (T)     |    Length     |  
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  --+
 | Piece 1 (less than 252 octets)|    |
 ~                               ~    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
 | Piece 2 (less than 252 octets)|    |
 ~                               ~    Bigger than 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    255 octets
 ~               :               ~    |
 ~               .               ~    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    |
 | Piece n (less than 252 octets)|    |
 ~                               ~    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  --+
          ]]></artwork>
        </figure></t>

      <t>Each piece carries a subset of entries in the Big TLV. An entry is an
      existing sub-TLV or structure. One entry MUST NOT be split across
      pieces. The Big TLV is split in entries boundaries, not octets
      boundaries.</t>

      <t>The node originates n TLVs for the Big TLV of type T. These TLVs are
      the n new TLVs of type TBD1, each of which has a normal payload. The
      node advertises each of these TLVs to its neighbors according to the
      normal IS-IS procedure. <xref target="big-payload-encode"/> shows the
      encoding of the Big TLV with type T in <xref target="big-payload"/>.</t>

      <t><figure anchor="big-payload-encode"
          title="Encoding value bigger than 255 octets">
          <artwork align="center"><![CDATA[
  0                   1          
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ --+   ----------+
 |  Type (TBD1)  |    Length     |                 |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ --+             |
 |  Type (T)     |    Flag     |1|   |        Container TLV 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |         of type TBD1
 |      Length of Type T         |   |             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |             |
 |       Identification          |   |             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Value of        |
 | Piece 1 (less than 252 octets)| Container TLV   |
 ~                               ~   |             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ --+   ----------+
 ~               :               ~
 ~               .               ~

  0                   1          
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ --+   ----------+
 |  Type (TBD1)  |    Length     |                 |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ --+             |
 |  Type (T)     |    Flag     |0|   |         Container TLV n
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |           of type TBD1
 |      Length of Type T         |   |             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |             | 
 |       Identification          |   |             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Value of |     |
 | Piece n (less than 252 octets)|  Container TLV  |
 ~                               ~   |             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ --+   ----------+
]]></artwork>
        </figure></t>

      <t>For each of the n pieces of the value of the Big TLV, a Container TLV
      of type TBD1 carries the piece. Container TLV 1 contains Piece 1 of the
      value of the Big TLV, with the F bit set and SHOULD be sent first;
      Container TLV 2 contains Piece 2 of the value of the Big TLV, with the F
      bit unset; ...; Container TLV n contains Piece n of the value of the Big
      TLV, with also the F bit unset.</t>

      <t>If a node supports the extension (i.e., Container TLV), the node
      understands each piece of the value of the Big TLV received. Each of the
      n Container TLVs having Type (T) contains a piece of the Big TLV value
      in its Piece field.</t>

      <!--
when there are duplicated Sub-TLVs of the same type, 
the first Sub-TLV of the same type is used and 
the rest Sub-TLVs of the same type are ignored. 
</t>
-->
    </section>

    <!-- "IS-IS Extension for Big TLV Payload" -->

    <section anchor="split_and_glue" title="Split and Glue">
      <t>This section discusses a couple of ways in which a Big TLV is split
      into pieces at sending and the pieces are glued at receiving.</t>

      <t>When a TLV of type T is too big at an originating node, this Big TLV
      is split into a sequence of pieces. Each piece carries a subset of
      entries in the Big TLV. An entry is an existing Sub-TLV or
      structure.</t>

      <t>if there is only one Big TLV of type T, the node originates container
      TLVs with type T containing the pieces, and set the identification field
      the same value in each container TLV.</t>

      <t>When there are multiple (Big) TLVs of type T, the node originates
      multiple sequences of container TLVs, with each sequence of the
      container TLVs has unique different identification field.</t>

      <t>For example, suppose that a node has a Big TLV of type T = 22 as
      shown in <xref target="big-payload-ex1"/>. This TLV is too Big and split
      into two pieces piece 1 and piece 2 at boundary between Sub-TLV K and
      K+1.</t>

      <t><figure anchor="big-payload-ex1"
          title="Example Big TLV of type T=22 with Value Field &gt; 255 Octets">
          <artwork align="center"><![CDATA[
  0                   1       
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Type (T=22)  |    Length     |  
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ----+-----------+ 
 |system ID for neighbor 10.2.2.2|      |           |
 +         (6 octets)            +      |           |
 |                               |      |           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |           |
 |        Metric (continue)      |    Piece 1       |
 +               +-+-+-+-+-+-+-+-+    < 252 octets  |
 |               |sub-TLVs-length|      |           |   
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |       Bigger than
 |          sub-TLV 1            |      |       255 octets
 :             :                 :      |           |
 :          sub-TLV K            :      |           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ----+           |
 |          sub-TLV K+1          |      |           |
 :             :                 :    Piece 2       |
 :          sub-TLV N            :      |           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ----+-----------+
          ]]></artwork>
        </figure></t>

      <t>For this Big TLV of type T = 22, the node originates two container
      TLV with type T = 22 containing the two pieces (i.e., piece 1 and piece
      2) directly. The container TLV is illustrated in <xref
      target="big-payload-encode-ex1"/>. The F bit in piece 1 is set and is
      unset in piece 2. The sender SHOULD send the piece 1 first.</t>

      <t><figure anchor="big-payload-encode-ex1"
          title="Example Encoding of Value Field &gt; 255 Octets">
          <artwork align="center"><![CDATA[
  0                   1       
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  -----------------------+
 |  Type (TBD1)  |    Length     |                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ------------+   Container TLV
 |  Type (T=22)  |    Flag     |1|             |     of type TBD1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+             |           | 
 |      Length of Type T         |             |           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+             |           |
 |      Identification(ID X)     |             |           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -----+      |           | 
 |system ID for neighbor 10.2.2.2|      |      |           |
 +         (6 octets)            +      |      |           |
 |                               |      |      |           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |      |           |
 |        Metric (continue)      |      | Value of         |
 +               +-+-+-+-+-+-+-+-+      | Container TLV    |
 |               |sub-TLVs-length|      |      |           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |      |           |
 |          sub-TLV 1            |   Piece 1   |           |
 :             :                 :      |      |           |
 :          sub-TLV K            :      |      |           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ----+------------------+
                                
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  -----------------------+
 |  Type (TBD1)  |    Length     |                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ----------+        Container TLV
 |  Type (T=22)  |    Flag     |0|            |        of type TBD1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+         Value of        |
 |      Length of Type T         |            |            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+            |            |
 |      Identification(ID X)     |         Container TLV   |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -----+     |            |
 |          sub-TLV K+1          |      |     |            |
 :             :                 :   Piece 2  |            |
 :          sub-TLV N            :      |     |            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ----+-----+------------+
          ]]></artwork>
        </figure></t>

      <t>After receiving the container TLV with type T = 22 and the same
      identification filed(ID X), the node can glue the piece 1 and piece 2
      directly accordingly to the F flag that indicate the first first piece
      and other sequences piece.</t>

      <t>Alternatively, when a node has multiple (Big) TLVs of type T, for
      each (Big) TLV of type T split into a sequence of pieces, the node
      originates a sequence of container TLVs with type T and unique
      identification value for each sequence.</t>

      <t>After receiving the container TLV with type T = 22, and different
      sequence of container TLVs, the node can glue the piece 1 and piece 2
      for each sequence through the same identification value.</t>

      <t>The sliced container TLVs of one Big TLV SHOULD be encapsulated
      within one LSP if all the lengths of the container TLV can fit into one
      LSP. If such condition can't be met, these sliced container TLVs can be
      put into different LSPs.</t>

      <t>The receiver side will begin to concatenate the container TLVs only
      after it received the piece 1 container (with F bit set). If the
      container TLVs of one Big TLV locate in different LSPs, the receiver
      SHOULD wait until it receives all these updated LSPs, then begin the
      concatenating process and SPF calculation. Such process is similar as
      the general incremental updates of LSPs.</t>
    </section>

    <section anchor="cap" title="Big TLV Capability">
      <t>A new sub-TLV, called Big TLV Capability sub-TLV, is defined in the
      Router Capability TLV <xref target="RFC7981"/>. A node advertising this
      sub-TLV indicates that the node supports the Big TLV. The format of the
      sub-TLV is shown in <xref target="cap-sub-tlv"/>. <figure
          anchor="cap-sub-tlv" title="Big TLV Capability sub-TLV">
          <artwork align="center"><![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 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
 |  Type (TBD2) |   Length (1)  |     Flags      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          ]]></artwork>
        </figure></t>

      <t>Type (TBD2) field: 1 octet. The type of the Big TLV Capability
      sub-TLV, its value is assigned by IANA.</t>

      <t>Length field: 1 octet. Its value is 1.</t>

      <t>Flags field: 1 octet. The field of flags. No flag is defined now.</t>

      <t>A node supporting the Big TLV MUST advertise this sub-TLV in a Router
      Capability TLV.</t>
    </section>

    <!-- "Big TLV Capability" -->

    <section anchor="deployment" title="Incremental Deployment">
      <t>For a network using IS-IS, users can deploy the extension for Big TLV
      in a part of the network step by step. The network has some nodes
      supporting the extension (or say new nodes for short) and the other
      nodes not supporting the extension (or say old nodes for short) before
      the extension is deployed in the entire network.</t>

      <t>The pieces of the Big TLV, advertised in the Container TLVs, will
      only be understood by the new nodes and will be ignored by the old
      nodes. The originator of the Big TLV MUST consider the above properties
      when splitting the Big TLV into multiple pieces.</t>

      <t>If the size of the existing Sub-TLVs in a TLV is bigger than 255, for
      a piece of new information in existing Sub-TLVs, when adding this new
      information into a TLV makes the TLV bigger than 255, this new
      information in existing Sub-TLVs can be put into a container TLV. If all
      the nodes need to have the same new information for using the new
      information, every node needs to check if all the nodes support the Big
      TLV capability which is distributed by the nodes supporting it. If all
      the nodes support it, every node uses the new information.</t>

      <t>If it is not required that all the nodes must have the same new
      information for using the new information, the nodes supporting the Big
      TLV capability can use the new information, the nodes not supporting the
      Big TLV capability ignore the new information.</t>
    </section>

    <!-- "Incremental Deployment" -->

    <section anchor="Security" title="Security Considerations">
      <t>The mechanism described in this document does not raise any new
      security issues for the IS-IS protocols.</t>
    </section>

    <section anchor="ack" title="Acknowledgement">
      <t>TBD</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>IANA is requested to make a new allocation in the "IS-IS TLV
      Codepoint Registry" under the registry name "IS-IS TLV Codepoints" as
      follows: <figure>
          <artwork><![CDATA[ 
  +=========+==========+=====+=====+=====+======+==============+
  |  Type   | Name     | IIH | LSP | SNP |Purge |  reference   |
  +=========+==========+=====+=====+=====+======+==============+
  |  TBD1   | Container|  Y  |  Y  |  N  |  N   |This document |
  +---------+----------+-----+-----+-----+------+--------------+
  ]]></artwork>
        </figure></t>

      <t>IANA is requested to make a new allocation under the registry name
      "IS-IS Sub-TLVs for IS-IS Router CAPABILITY TLV" as follows: <figure>
          <artwork><![CDATA[ 
  +======+==================+===+=====+===+=====+==============+
  |Value |  Description     |IIH| LSP |SNP|Purge|  reference   |
  +======+==================+===+=====+===+=====+==============+
  | TBD2 |Big TLV Capability| N |  Y  | N |  N  |This document |
  +------+------------------+---+-----+---+-----+--------------+
  ]]></artwork>
        </figure></t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <reference anchor="ISO10589" derivedAnchor="ISO10589" quoteTitle="true">
        <front>
          <title>Information technology -- Telecommunications and information
          exchange between systems -- Intermediate System to Intermediate
          System intra-domain routing information exchange protocol for use in
          conjunction with the protocol for providing the connectionless-mode
          network service (ISO 8473)</title>

          <seriesInfo name="ISO/IEC" value="10589:2002, Second Edition"/>

          <author>
            <organization abbrev="ISO" showOnFrontPage="true">International
            Organization for Standardization</organization>
          </author>

          <date month="November" year="2002"/>
        </front>
      </reference>

      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.8174"?>

      <?rfc include="reference.RFC.7981"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.7356"?>
    </references>

    <!---->
  </back>
</rfc>
