<?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-bashandy-isis-srv6-extensions-03.txt"
     ipr="trust200902" updates="">
  <front>
    <title abbrev="draft-bashandy-isis-srv6-extensions">IS-IS Extensions to
    Support Routing over IPv6 Dataplane</title>

    <author fullname="Les Ginsberg" initials="L" role="editor"
            surname="Ginsberg">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>821 Alder Drive</street>

          <city>Milpitas</city>

          <code>95035</code>

          <region>CA</region>

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

        <email>ginsberg@cisco.com</email>
      </address>
    </author>

    <author fullname="Peter Psenak" initials="P" role="editor"
            surname="Psenak">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>Pribinova Street 10</street>

          <city>Bratislava 81109</city>

          <region/>

          <code/>

          <country>Slovakia</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>ppsenak@cisco.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Clarence Filsfils" initials="C" surname="Filsfils">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street/>

          <city>Brussels</city>

          <code/>

          <region/>

          <country>Belgium</country>
        </postal>

        <email>cfilsfil@cisco.com</email>
      </address>
    </author>

    <author fullname="Ahmed Bashandy" initials="A" surname="Bashandy">
      <organization>Individual</organization>

      <address>
        <postal>
          <street/>
        </postal>

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

    <author fullname="Bruno Decraene" initials="B" surname="Decraene">
      <organization>Orange</organization>

      <address>
        <postal>
          <street/>

          <city>Issy-les-Moulineaux</city>

          <code/>

          <region/>

          <country>France</country>
        </postal>

        <email>bruno.decraene@orange.com</email>
      </address>
    </author>

    <author fullname="Zhibo Hu" initials="Z" surname="Hu">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <region/>

          <country/>
        </postal>

        <email>huzhibo@huawei.com</email>
      </address>
    </author>

    <date day="29" month="June" year="2018"/>

    <area>Routing Area</area>

    <workgroup>Networking Working Group</workgroup>

    <keyword/>

    <abstract>
      <t>Segment Routing (SR) allows for a flexible definition of end-to-end
      paths by encoding paths as sequences of topological sub-paths, called
      "segments". Segment routing architecture can be implemented over an MPLS
      data plane as well as an IPv6 data plane. This draft describes the IS-IS
      extensions required to support Segment Routing over an IPv6 data
      plane.</t>
    </abstract>

    <note title="Requirements Language">
      <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
      [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as
      shown here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>With Segment Routing (SR) <xref
      target="I-D.ietf-spring-segment-routing"/>, a node steers a packet
      through an ordered list of instructions, called segments.</t>

      <t>Segments are identified through Segment Identifiers (SIDs).</t>

      <t>Segment Routing can be directly instantiated on the IPv6 data plane
      through the use of the Segment Routing Header defined in <xref
      target="I-D.ietf-6man-segment-routing-header"/>. SRv6 refers to this SR
      instantiation on the IPv6 dataplane.</t>

      <t>The network programming paradigm <xref
      target="I-D.filsfils-spring-srv6-network-programming"/> is central to
      SRv6. It describes how any function can be bound to a SID and how any
      network program can be expressed as a combination of SID's.</t>

      <t>This document specifies IS-IS extensions that allow the IS-IS
      protocol to encode some of these functions.</t>

      <t>Familiarity with the network programming paradigm <xref
      target="I-D.filsfils-spring-srv6-network-programming"/> is necessary to
      understand the extensions specified in this document.</t>

      <t>This document defines one new top level IS-IS TLV and several new IS-
      IS sub-TLVs.</t>

      <t>The SRv6 Capabilities sub-TLV announces the ability to support SRv6
      and some Endpoint functions listed in Section 7 as well as advertising
      limitations when applying such Endpoint functions.</t>

      <t>The SRv6 Locator top level TLV announces SRv6 locators - a form of
      summary address for the set of topology/algorithm specific SIDs
      associated with a node.</t>

      <t>The SRv6 End SID sub-TLV, the SRv6 End.X SID sub-TLV, and the SRv6
      LAN End.X SID sub-TLV are used to advertise which SIDs are instantiated
      at a node and what Endpoint function is bound to each instantiated
      SID.</t>
    </section>

    <section title="SRv6 Capabilities sub-TLV">
      <t>A node indicates that it has support for SRv6 by advertising a new
      SRv6- capabilities sub-TLV of the router capabilities TLV [RFC7981].</t>

      <t>The SRv6 Capabilities sub-TLV may contain optional sub-sub-TLVs. No
      sub-sub-TLVs are currently defined.</t>

      <t>The SRv6 Capabilities sub-TLV has the following format:</t>

      <t><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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type        |     Length    |            Flags              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   optional sub-sub-TLVs...
 
     Type: Suggested value 25, to be assigned by IANA

     Length: 2 + length of sub-sub-TLVs

     Flags: 2 octets  The following flags are defined:

      0                   1
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | |O|                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      where:
 
        O-flag: If set, the router supports use of the O-bit 
        in the Segment Routing Header(SRH) as defined in 
        [I-D.ali-spring-srv6-oam].

]]></artwork>
        </figure></t>
    </section>

    <section title="Advertising Maximum SRv6 SID Depths">
      <t><xref target="I-D.ietf-isis-segment-routing-msd"/> defines the means
      to advertise node/link specific values for Maximum SID Depths (MSD) of
      various types. Node MSDs are advertised in a sub-TLV of the Router
      Capabilities TLV <xref target="RFC7981"/>. Link MSDs are advertised in a
      sub-TLV of TLVs 22, 23, 141, 222, and 223.</t>

      <t>This document defines the relevant SRv6 MSDs and requests MSD type
      assignments in the MSD Types registry created by <xref
      target="I-D.ietf-isis-segment-routing-msd"/>.</t>

      <section title="Maximum Segments Left MSD Type">
        <t>The Maximum Segments Left MSD Type specifies the maximum value of
        the "SL" field <xref target="I-D.ietf-6man-segment-routing-header"/>
        in the SRH of a received packet before applying the Endpoint function
        associated with a SID.</t>

        <t><figure>
            <artwork><![CDATA[   SRH Max SL Type: 41 (Suggested value - to be assigned by IANA)

   If no value is advertised the supported value is assumed to be 0.
   ]]></artwork>
          </figure></t>
      </section>

      <section title="Maximum End Pop MSD Type">
        <t>The Maximum End Pop MSD Type specifies the maximum number of SIDs
        in the top SRH in an SRH stack to which the router can apply "PSP" or
        USP" as defined in <xref
        target="I-D.filsfils-spring-srv6-network-programming"/> flavors.</t>

        <t><figure>
            <artwork><![CDATA[   SRH Max End Pop Type: 42 (Suggested value - to be assigned by IANA)

   If the advertised value is zero or no value is advertised 
   then it is assumed that the router cannot apply PSP or USP flavors.
   ]]></artwork>
          </figure></t>
      </section>

      <section title="Maximum T.Insert MSD Type">
        <t>The Maximum T.Insert MSD Type specifies the maximum number of SIDs
        that can be inserted as part of the "T.insert" behavior as defined in
        <xref target="I-D.filsfils-spring-srv6-network-programming"/>.</t>

        <t><figure>
            <artwork><![CDATA[   SRH Max T.insert Type: 43 (Suggested value - to be assigned by IANA)

   If the advertised value is zero or no value is advertised
   then the router is assumed not to support any variation
   of the "T.insert" behavior. 
   ]]></artwork>
          </figure></t>
      </section>

      <section title="Maximum T.Encaps MSD Type">
        <t>The Maximum T.Encaps MSD Type specifies the maximum number of SIDs
        that can be included as part of the "T.Encaps" behavior as defined in
        <xref target="I-D.filsfils-spring-srv6-network-programming"/> .</t>

        <t><figure>
            <artwork><![CDATA[   SRH Max T.encaps Type: 44 (Suggested value - to be assigned by IANA)

   If the advertised value is zero then the router can apply T.Encaps
   only by encapsulating the incoming packet in another
   IPv6 header without SRH the same way IPinIP encapsulation is
   performed.

   If the advertised value is non-zero then the router supports both
   IPinIP and SRH encapsulation subject to the SID limitation 
   specified by the advertised value.
   ]]></artwork>
          </figure></t>
      </section>

      <section title="Maximum End D MSD Type">
        <t>The Maximum End D MSD Type specifies the maximum number of SIDs in
        an SRH when performing decapsulation associated with "End.Dx"
        functions (e.g., "End.DX6" and "End.DT6") as defined in <xref
        target="I-D.filsfils-spring-srv6-network-programming"/>.</t>

        <t><figure>
            <artwork><![CDATA[   SRH Max End D Type: 45 (Suggested value - to be assigned by IANA)
   
   If the advertised value is zero or no value is advertised
   then it is assumed that the router cannot apply
   "End.DX6" or "End.DT6" functions if the extension
   header right underneath the outer IPv6 header is an SRH.
   ]]></artwork>
          </figure></t>
      </section>
    </section>

    <section title="SRv6 SIDs and Reachability">
      <t>As discussed in <xref
      target="I-D.filsfils-spring-srv6-network-programming"/>, an SRv6 Segment
      Identifier (SID) is 128 bits and represented as</t>

      <t>LOC:FUNCT</t>

      <t>where LOC (the locator portion) is the L most significant bits and
      FUNCT is the 128-L least significant bits. L is called the locator
      length and is flexible. Each operator is free to use the locator length
      it chooses.</t>

      <t>A node is provisioned with topology/algorithm specific locators for
      each of the topology/algorithm pairs supported by that node. Each
      locator is a covering prefix for all SIDs provisioned on that node which
      have the matching topology/algorithm.</t>

      <t>Locators MUST be advertised in the SRv6 Locator TLV (see Section
      6.1). Forwarding entries for the locators advertised in the SRv6 Locator
      TLV MUST be installed in the forwarding plane of receiving SRv6 capable
      routers when the associated topology/algorithm is supported by the
      receiving node.</t>

      <t>Locators are routable and MAY also be advertised in Prefix
      Reachability TLVs (236 or 237).</t>

      <t>Locators associated with algorithm 0 (for all supported topologies)
      SHOULD be advertised in a Prefix Reachability TLV (236 or 237) so that
      legacy routers (i.e., routers which do NOT support SRv6) will install a
      forwarding entry for algorithm 0 SRv6 traffic.</t>

      <t>In cases where a locator advertisement is received in both in a
      Prefix Reachability TLV and an SRv6 Locator TLV, the Prefix Reachability
      advertisement MUST be preferred when installing entries in the
      forwarding plane. This is to prevent inconsistent forwarding entries on
      SRv6 capable/SRv6 incapable routers.</t>

      <t>SRv6 SIDs are advertised as sub-TLVs in the SRv6 Locator TLV except
      for SRv6 End.X SIDs/LAN End.X SIDs which are associated with a specific
      Neighbor/Link and are therefore advertised as sub-TLVs in TLVs 22, 23,
      222, 223, and 141.</t>

      <t>SRv6 SIDs are not directly routable and MUST NOT be installed in the
      forwarding plane. Reachability to SRv6 SIDs depends upon the existence
      of a covering locator.</t>

      <t>Adherence to the rules defined in this section will assure that SRv6
      SIDs associated with a supported topology/algorithm pair will be
      forwarded correctly, while SRv6 SIDs associated with an unsupported
      topology/algorithm pair will be dropped. NOTE: The drop behavior depends
      on the absence of a default/summary route covering a given locator.</t>

      <t>In order for forwarding to work correctly, the locator associated
      with SRv6 SID advertisements MUST be the longest match prefix installed
      in the forwarding plane for those SIDs. There are a number of ways in
      which this requirement could be compromised</t>

      <t><list style="symbols">
          <t>Another locator associated with a different topology/algorithm is
          the longest match</t>

          <t>A prefix advertisement (i.e., from TLV 236 or 237) is the longest
          match</t>
        </list></t>
    </section>

    <section title="Advertising Locators and End SIDs">
      <t>The SRv6 Locator TLV is introduced to advertise SRv6 Locators and End
      SIDs associated with each locator.</t>

      <t>This new TLV shares the sub-TLV space defined for TLVs 135, 235, 236
      and 237.</t>

      <section title="SRv6 Locator TLV Format">
        <t>The SRv6 Locator TLV has the following format:</t>

        <t><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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type        |     Length    |R|R|R|R|    MTID               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Followed by one or more locator entries of the form:

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Metric                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Flags       |  Algorithm    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Loc Size     | Locator (variable)...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Sub-tlv-len  |         Sub-TLVs (variable) . . .             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


     Type: 27 (Suggested value to be assigned by IANA)

     Length: variable.

     MTID: Multitopology Identifier as defined in [RFC5120].
     Note that the value 0 is legal.

     Locator entry:

     Metric: 4 octets. As described in [RFC5305].

     Flags: 1 octet. The following flags are defined

       0
       0 1 2 3 4 5 6 7
      +-+-+-+-+-+-+-+-+
      |D|   Reserved  |
      +-+-+-+-+-+-+-+-+

      where:
        D bit: When the Locator is leaked from level-2 to level-1, the D
        bit MUST be set.  Otherwise, this bit MUST be clear.  Locators
        with the D bit set MUST NOT be leaked from level-1 to level-2.
        This is to prevent looping.

        The remaining bits are reserved for future use. They SHOULD be
        set to zero on transmission and MUST be ignored on receipt.

     Algorithm: 1 octet. Associated algorithm. Algorithm values
      are defined in the IGP Algorithm Type registry.

     Loc-Size: 1 octet. Number of bits in the Locator field.
     (1 - 128)

     Locator: 1-16 octets. This field encodes the advertised SRv6
     Locator. The Locator is encoded in the minimal number of
     octets for the given number of bits. 

     Sub-TLV-length: 1 octet. Number of octets used by sub-TLVs

     Optional sub-TLVs.

]]></artwork>
          </figure></t>
      </section>

      <section title="SRv6 End SID sub-TLV">
        <t>The SRv6 End SID sub-TLV is introduced to advertise SRv6 Segment
        Identifiers (SID) with Endpoint functions which do not require a
        particular neighbor in order to be correctly applied <xref
        target="I-D.filsfils-spring-srv6-network-programming"/>. SRv6 SIDs
        associated with a neighbor are advertised using the sub-TLVs defined
        in Section 6.</t>

        <t>This new sub-TLV is advertised in the SRv6 Locator TLV defined in
        the previous section. SRv6 End SIDs inherit the topology/algorithm
        from the parent locator.</t>

        <t>The SRv6 End SID sub-TLV has the following format:</t>

        <t><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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Type       |     Length    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Flags      | SRv6 Endpoint Function        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | SID (128 bits) . . .                                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | SID (cont . . .)                                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | SID (cont . . .)                                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | SID (cont . . .)                                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Sub-sub-tlv-len|         sub-sub-TLVs (variable) . . .         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 

   Type: 5 (Suggested value to be assigned by IANA)

   Length: variable.

   Flags: 1 octet. No flags are currently defined.

   SRv6 Endpoint Function: 2 octets. As defined in 
   [I-D.filsfils-spring-srv6-network-programming]
   Legal function values for this sub-TLV are defined in Section 7.

   SID: 16 octets. This field encodes the advertised SRv6 SID.

   Sub-sub-TLV-length: 1 octet. Number of octets used by sub-sub-TLVs
 
   Optional sub-sub-TLVs

]]></artwork>
          </figure>The SRv6 End SID MUST be a subnet of the associated
        Locator. SRv6 End SIDs which are NOT a subnet of the associated
        locator MUST be ignored.</t>

        <t>Multiple SRv6 End SIDs MAY be associated with the same locator. In
        cases where the number of SRv6 End SID sub-TLVs exceeds the capacity
        of a single TLV, multiple Locator TLVs for the same locator MAY be
        advertised. For a given MTID/Locator the algorithm MUST be the same in
        all TLVs. If this restriction is not met all TLVs for that
        MTID/Locator MUST be ignored.</t>
      </section>
    </section>

    <section title="Advertising SRv6 End.X SIDs">
      <t>Certain SRv6 Endpoint functions <xref
      target="I-D.filsfils-spring-srv6-network-programming"/> must be
      associated with a particular neighbor, and in case of multiple layer 3
      links to the same neighbor, with a particular link in order to be
      correctly applied.</t>

      <t>This document defines two new sub-TLVs of TLV 22, 23, 222, 223, and
      141 - namely "SRv6 End.X SID" and "SRv6 LAN End.X SID".</t>

      <t>IS-IS Neighbor advertisements are topology specific - but not
      algorithm specific. End.X SIDs therefore inherit the topology from the
      associated neighbor advertisement, but the algorithm is specified in the
      individual SID.</t>

      <t>All End.X SIDs MUST be a subnet of a Locator with matching topology
      and algorithm which is advertised by the same node in an SRv6 Locator
      TLV. End.X SIDs which do not meet this requirement MUST be ignored.</t>

      <section title="SRv6 End.X SID sub-TLV">
        <t>This sub-TLV is used to advertise an SRv6 SID associated with a
        point to point adjacency. Multiple SRv6 End.X SID sub-TLVs MAY be
        associated with the same adjacency.</t>

        <t>The SRv6 End.X SID sub-TLV has the following format:</t>

        <t><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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |   Type        |     Length    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |   Flags       |   Algorithm   |   Weight      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    SRv6 Endpoint Function     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | SID (128 bits) . . .                                          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | SID (cont . . .)                                              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | SID (cont . . .)                                              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | SID (cont . . .)                                              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |Sub-sub-tlv-len|         Sub-sub-TLVs (variable) . . .         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    Type: 43 (Suggested value to be assigned by IANA)

    Length: variable.

    Flags: 1 octet.

        0 1 2 3 4 5 6 7
       +-+-+-+-+-+-+-+-+
       |B|S|P|Reserved |
       +-+-+-+-+-+-+-+-+

    where:

     B-Flag: Backup flag.  If set, the End.X SID is eligible
     for protection (e.g., using IPFRR) as described in [RFC8355].

     S-Flag.  Set flag.  When set, the S-Flag indicates that the
     End.X SID refers to a set of adjacencies (and therefore 
     MAY be assigned to other adjacencies as well).

     P-Flag.  Persistent flag.  When set, the P-Flag indicates that
     the End.X SID is persistently allocated, i.e., the 
     End.X SID value remains consistent across router restart 
     and/or interface flap.

     Other bits: MUST be zero when originated and ignored when
     received.

    Algorithm: 1 octet. Associated algorithm. Algorithm values
    are defined in the IGP Algorithm Type registry.

    Weight: 1 octet.  The value represents the weight of the
    End.X SID for the purpose of load balancing.  The use 
    of the weight is defined in [I-D.ietf-spring-segment-routing].

    SRv6 Endpoint Function: 2 octets. As defined in
    [I-D.filsfils-spring-srv6-network-programming]
    Legal function values for this sub-TLV are defined in Section 7.

    SID: 16 octets. This field encodes the advertised SRv6 SID.

    Sub-sub-TLV-length: 1 octet. Number of octets used by sub-sub-
    TLVs

]]></artwork>
          </figure>Note that multiple TLVs for the same neighbor may be
        required in order to advertise all of the SRv6 End.X SIDs associated
        with that neighbor.</t>
      </section>

      <section title="SRv6 LAN End.X SID sub-TLV">
        <t>This sub-TLV is used to advertise an SRv6 SID associated with a LAN
        adjacency. Since the parent TLV is advertising an adjacency to the
        Designated Intermediate System(DIS) for the LAN, it is necessary to
        include the System ID of the physical neighbor on the LAN with which
        the SRv6 SID is associated. Given that a large number of neighbors may
        exist on a given LAN a large number of SRv6 LAN END.X SID sub-TLVs may
        be associated with the same LAN. Note that multiple TLVs for the same
        DIS neighbor may be required in order to advertise all of the SRv6
        End.X SIDs associated with that neighbor.</t>

        <t>The SRv6 LAN End.X SID sub-TLV has the following format:</t>

        <t><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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type        |     Length    |    System ID (6 octets)       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Flags       |   Algorithm   |   Weight      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    SRv6 Endpoint Function     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | SID (128 bits) . . .                                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | SID (cont . . .)                                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | SID (cont . . .)                                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | SID (cont . . .)                                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Sub-sub-tlv-len|      sub-sub-TLVs (variable) . . .            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    Type: 44 (Suggested value to be assigned by IANA)
    Length: variable.

    System-ID: 6 octets of IS-IS System-ID of length "ID Length" as
    defined in [ISO10589].

    Flags: 1 octet.

        0 1 2 3 4 5 6 7
       +-+-+-+-+-+-+-+-+
       |B|S|P|Reserved |
       +-+-+-+-+-+-+-+-+

    where B,S, and P flags are as described in Section 6.1.
    Other bits: MUST be zero when originated and ignored when
    received.

    Algorithm: 1 octet. Associated algorithm. Algorithm values
    are defined in the IGP Algorithm Type registry.

    Weight: 1 octet.  The value represents the weight of the
    End.X SID for the purpose of load balancing.  The use 
    of the weight is defined in [I-D.ietf-spring-segment-routing].

    SRv6 Endpoint Function: 2 octets. As defined in
    [I-D.filsfils-spring-srv6-network-programming]
    Legal function values for this sub-TLV are defined in Section 7.

    SID: 16 octets. This field encodes the advertised SRv6 SID. 

    Sub-sub-TLV-length: 1 octet. Number of octets used by sub-sub-
     TLVs.

]]></artwork>
          </figure></t>
      </section>
    </section>

    <section title="Advertising Endpoint Function Types">
      <t>Endpoint function types are defined in <xref
      target="I-D.filsfils-spring-srv6-network-programming"/>. The numerical
      values are defined in the "SRv6 Endpoint Types" registry defined in
      <xref target="I-D.filsfils-spring-srv6-network-programming"/>. This
      section lists the Endpoint function types which MAY be advertised by
      IS-IS and the SID sub-TLVs in which each type MAY appear.</t>

      <t><figure>
          <artwork><![CDATA[  Endpoint              |  End  | End.X | Lan End.X |
  Function Type         |  SID  | SID   |   SID     |
  ----------------------|-------|-------|-----------|
  End(no PSP, no USP)   |   Y   |   N   |    N      |
  ----------------------|-------|-------|-----------|
  End(with PSP)         |   Y   |   N   |    N      |
  ----------------------|-------|-------|-----------|
  End(with USP)         |   Y   |   N   |    N      |
  ----------------------|-------|-------|-----------|
  End(with PSP & USP)   |   Y   |   N   |    N      |
  ----------------------|-------|-------|-----------|
  End.T(no PSP, no USP) |   Y   |   N   |    N      |
  ----------------------|-------|-------|-----------|
  End.T(with PSP)       |   Y   |   N   |    N      |
  ----------------------|-------|-------|-----------|
  End.T(with USP)       |   Y   |   N   |    N      |
  ----------------------|-------|-------|-----------|
  End.T(with PSP & USP) |   Y   |   N   |    N      |
  ----------------------|-------|-------|-----------|
  End.X(no PSP, no USP) |   N   |   Y   |    Y      |
  ----------------------|-------|-------|-----------|
  End.X(with PSP)       |   N   |   Y   |    Y      |
  ----------------------|-------|-------|-----------|
  End.X(with USP)       |   N   |   Y   |    Y      |
  ----------------------|-------|-------|-----------|
  End.X(with PSP & USP) |   N   |   Y   |    Y      |
  ----------------------|-------|-------|-----------|
  End.DX6               |   N   |   Y   |    Y      |
  ----------------------|-------|-------|-----------|
  End.DT6               |   Y   |   N   |    N      |
  ----------------------|-------|-------|-----------|
  End.OTP               |   Y   |   N   |    N      |

]]></artwork>
        </figure></t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests allocation for the following TLVs, sub- TLVs,
      and sub-sub-TLVs as well updating the ISIS TLV registry and defining a
      new registry.</t>

      <section title="SRv6 Locator TLV">
        <t>This document adds one new TLV to the IS-IS TLV Codepoints
        registry.</t>

        <t>Value: 27 (suggested - to be assigned by IANA)</t>

        <t>Name: SRv6 Locator</t>

        <t>This TLV shares sub-TLV space with existing "Sub-TLVs for TLVs 135,
        235, 236 and 237 registry". The name of this registry needs to be
        changed to "Sub-TLVs for TLVs 27, 135, 235, 236 and 237 registry".</t>

        <section title="SRv6 End SID sub-TLV ">
          <t>This document adds the following new sub-TLV to the (renamed)
          "Sub-TLVs for TLVs 27, 135, 235, 236 and 237 registry".</t>

          <t>Value: 5 (suggested - to be assigned by IANA)</t>

          <t>Name: SRv6 End SID</t>

          <t>This document requests the creation of a new IANA managed
          registry for sub-sub-TLVs of the SRv6 End SID sub-TLV. The
          registration procedure is "Expert Review" as defined in [RFC7370].
          Suggested registry name is "sub-sub-TLVs for SRv6 End SID sub-TLV".
          No sub-sub-TLVs are defined by this document except for the reserved
          value.</t>

          <t>0: Reserved</t>

          <t>1-255: Unassigned</t>
        </section>

        <section title="Revised sub-TLV table">
          <t>The revised table of sub-TLVs for the (renamed) "Sub-TLVs for
          TLVs 27, 135, 235, 236 and 237 registry" is shown below:</t>

          <t><figure>
              <artwork><![CDATA[   Type  27 135 235 236 237

   1     n   y   y   y   y
   2     n   y   y   y   y
   3     n   y   y   y   y
   4     y   y   y   y   y
   5     y   n   n   n   n
   11    y   y   y   y   y
   12    y   y   y   y   y
]]></artwork>
            </figure></t>
        </section>
      </section>

      <section title="SRv6 Capabilities sub-TLV">
        <t>This document adds the definition of a new sub-TLV in the "Sub-
        TLVs for TLV 242 registry".</t>

        <t>Type: 25 (Suggested - to be assigned by IANA)</t>

        <t>Description: SRv6 Capabilities</t>

        <t>This document requests the creation of a new IANA managed registry
        for sub-sub-TLVs of the SRv6 Capability sub-TLV. The registration
        procedure is "Expert Review" as defined in [RFC7370]. Suggested
        registry name is "sub-sub-TLVs for SRv6 Capability sub-TLV". No
        sub-sub-TLVs are defined by this document except for the reserved
        value.</t>

        <t>0: Reserved</t>

        <t>1-255: Unassigned</t>
      </section>

      <section title="SRv6 End.X SID and SRv6 LAN End.X SID sub-TLVs">
        <t>This document adds the definition of two new sub-TLVs in the "sub-
        TLVs for TLV 22, 23, 25, 141, 222 and 223 registry".</t>

        <t>Type: 43 (suggested - to be assigned by IANA)</t>

        <t>Description: SRv6 End.X SID</t>

        <t>Type: 44 (suggested - to be assigned by IANA)</t>

        <t>Description: SRv6 LAN End.X SID</t>

        <t><figure>
            <artwork><![CDATA[   Type  22 23 25 141 222 223

   43     y  y  y  y   y   y
   44     y  y  y  y   y   y

]]></artwork>
          </figure></t>
      </section>

      <section title="MSD Types">
        <t>This document defines the following new MSD types. These types are
        to be defined in the IGP MSD Types registry defined in <xref
        target="I-D.ietf-isis-segment-routing-msd"/> .</t>

        <t>All values are suggested values to be assigned by IANA.</t>

        <t><figure>
            <artwork><![CDATA[Type  Description
------------------
 41    SRH Max SL
 42    SRH Max End Pop
 43    SRH Max T.insert
 44    SRH Max T.encaps
 45    SRH Max End D]]></artwork>
          </figure></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>Security concerns for IS-IS are addressed in [ISO10589], [RFC5304],
      and [RFC5310].</t>
    </section>

    <section anchor="Acknowledgements" title="Contributors">
      <t>The following people gave a substantial contribution to the content
      of this document and should be considered as co-authors:</t>

      <t><figure>
          <artwork><![CDATA[  Stefano Previdi
  Huawei Technologies
  Email: stefano@previdi.net

  Paul Wells
  Cisco Systems
  Saint Paul,
  Minnesota
  United States
  Email: pauwells@cisco.com

  Daniel Voyer
  Email:  daniel.voyer@bell.ca

  Satoru Matsushima
  Email: satoru.matsushima@g.softbank.co.jp

  Bart Peirens
  Email: bart.peirens@proximus.com

  Hani Elmalky
  Email: hani.elmalky@ericsson.com

  Prem Jonnalagadda
  Email: prem@barefootnetworks.com

  Milad Sharif
  Email: msharif@barefootnetworks.com>

  Robert Hanzl
  Cisco Systems
  Millenium Plaza Building, V Celnici 10, Prague 1,
  Prague, Czech Republic
  Email rhanzl@cisco.com

  Ketan Talaulikar
  Cisco Systems, Inc.
  Email: ketant@cisco.com

]]></artwork>
        </figure></t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.7981"?>

      <?rfc include='reference.RFC.5304'?>

      <?rfc include='reference.RFC.5305'?>

      <?rfc include='reference.RFC.5120'?>

      <?rfc include='reference.RFC.5310'?>

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

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

      <?rfc include="reference.I-D.ietf-6man-segment-routing-header.xml"?>

      <?rfc include="reference.I-D.ietf-isis-segment-routing-msd.xml"?>

      <?rfc include="reference.I-D.filsfils-spring-srv6-network-programming.xml"?>

      <?rfc include="reference.I-D.ali-spring-srv6-oam.xml"?>

      <?rfc include='reference.RFC.7370'?>

      <reference anchor="ISO10589">
        <front>
          <title>Intermediate system to Intermediate system intra-domain
          routeing information exchange protocol for use in conjunction with
          the protocol for providing the connectionless-mode Network Service
          (ISO 8473), ISO/IEC 10589:2002, Second Edition.</title>

          <author fullname="ISO &quot;International Organization for Standardization&quot;"/>

          <date month="Nov" year="2002"/>
        </front>
      </reference>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.8355'?>

      <?rfc include="reference.I-D.ietf-spring-segment-routing.xml"?>
    </references>
  </back>
</rfc>
