<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc comments="yes"?>
<?rfc compact="yes"?>
<?rfc inline="yes"?>
<?rfc sortrefs="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc tocompact="yes"?>
<rfc category="exp" docName="draft-ietf-idr-bgp-sr-segtypes-ext-03"
     ipr="trust200902">
  <front>
    <title abbrev="SR Segment Type Ext for BGP SR Policy">Segment Routing
    Segment Types Extensions for BGP SR Policy</title>

    <author fullname="Ketan Talaulikar" initials="K." role="editor"
            surname="Talaulikar">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>India</country>
        </postal>

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

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

      <address>
        <postal>
          <street/>

          <city>Brussels</city>

          <region/>

          <code/>

          <country>BE</country>
        </postal>

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

    <author fullname="Stefano Previdi" initials="S." surname="Previdi">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country>IT</country>
        </postal>

        <email>stefano@previdi.net</email>
      </address>
    </author>

    <author fullname="Paul Mattes" initials="P." surname="Mattes">
      <organization>Microsoft</organization>

      <address>
        <postal>
          <street>One Microsoft Way</street>

          <city>Redmond</city>

          <region>WA</region>

          <code>98052</code>

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

        <email>pamattes@microsoft.com</email>
      </address>
    </author>

    <author fullname="Dhanendra Jain" initials="D." surname="Jain">
      <organization>Google</organization>

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

    <date/>

    <abstract>
      <t>This document specifies the signaling of additional Segment Routing
      Segment Types for BGP SR Policy SAFI.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="INTRO" title="Introduction">
      <t>BGP SR Policy SAFI was introduced by <xref
      target="I-D.ietf-idr-sr-policy-safi"/> for the advertisement of Segment
      Routing (SR) Policy <xref target="RFC8402"/>. <xref
      target="I-D.ietf-idr-sr-policy-safi"/> introduced the base SR Segment
      Types A and B as specified by the SR Policy Architecture <xref
      target="RFC9256"/>.</t>

      <t>This document specifies the extensions for the advertisement of the
      remaining SR Segment Types defined in <xref target="RFC9256"/> in the SR
      Policy SAFI for both SR-MPLS <xref target="RFC8660"/> and SRv6 <xref
      target="RFC8754"/> <xref target="RFC8986"/>.</t>

      <t>The extensions in this document do not impact the SR Policy
      operations or fault management as specified in <xref
      target="I-D.ietf-idr-sr-policy-safi"/>.</t>

      <section 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 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
        when, they appear in all capitals, as shown here.</t>
      </section>
    </section>

    <section anchor="SEGMENTTLV" title="Segment Type Sub-TLVs">
      <t>The Segment List sub-TLV <xref target="I-D.ietf-idr-sr-policy-safi"/>
      encodes a single explicit path towards the endpoint as described in
      section 5.1 of <xref target="RFC9256"/>. The Segment List sub-TLV
      includes the elements of the paths (i.e., segments).</t>

      <t>A Segment sub-TLV describes a single segment in a segment list (i.e.,
      a single element of the explicit path).</t>

      <t>Section 4 of <xref target="RFC9256"/> defines several Segment
      Types:<figure align="center">
          <artwork align="left"><![CDATA[Type  A: SR-MPLS Label
Type  B: SRv6 SID
Type  C: IPv4 Prefix with optional SR Algorithm
Type  D: IPv6 Global Prefix with optional SR Algorithm for SR-MPLS
Type  E: IPv4 Prefix with Local Interface ID
Type  F: IPv4 Addresses for link endpoints as Local, Remote pair
Type  G: IPv6 Prefix and Interface ID for link endpoints as Local, 
         Remote pair for SR-MPLS
Type  H: IPv6 Addresses for link endpoints as Local, Remote pair 
         for SR-MPLS
Type  I: IPv6 Global Prefix with optional SR Algorithm for SRv6 
Type  J: IPv6 Prefix and Interface ID for link endpoints as Local,
         Remote pair for SRv6
Type  K: IPv6 Addresses for link endpoints as Local, Remote pair 
         for SRv6

Figure 1: SR Segment Types

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

      <t><xref target="I-D.ietf-idr-sr-policy-safi"/> specifies Segment Type
      Sub-TLVs for the segment types A and B. The following sub-sections
      specify the sub-TLVs used for encoding each of the other Segment Types
      above.</t>

      <t>As specified in section 2.4.4.2 of <xref
      target="I-D.ietf-idr-sr-policy-safi"/>, the Segment Type Sub-TLVs
      specified in this document are also used only by the Segment Routing
      Policy Module (SRPM) <xref target="I-D.ietf-idr-sr-policy-safi"/> as
      described in section 4 of <xref target="RFC9256"/> along the same lines
      as segment types A and B. Their validation is, therefore, beyond the
      scope of BGP.</t>

      <section anchor="TYPEC" title="Segment Type C">
        <t>The Type C Segment Sub-TLV encodes an IPv4 node address, SR
        Algorithm, and an optional SR-MPLS SID. The format is as follows:
        <figure align="center">
            <artwork align="left"><![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     |  SR Algorithm |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 IPv4 Node Address (4 octets)                  |      
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                SR-MPLS SID (optional, 4 octets)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 2: Type C Segment sub-TLV

where:]]></artwork>
          </figure><list style="symbols">
            <t>Type: 3.</t>

            <t>Length: Specifies the length of the value field (i.e., not
            including Type and Length fields) in terms of octets. The value
            MUST be 10 when the SR-MPLS SID is present else it MUST be 6.</t>

            <t>Flags: 1 octet of flags as defined in <xref
            target="SEGMENTFLAGS"/>.</t>

            <t>SR Algorithm: 1 octet specifying SR Algorithm as described in
            section 3.1.1 in <xref target="RFC8402"/> when A-Flag as defined
            in <xref target="SEGMENTFLAGS"/> is present. SR Algorithm is used
            by SRPM <xref target="I-D.ietf-idr-sr-policy-safi"/> as described
            in section 4 in <xref target="RFC9256"/>. When A-Flag is not
            encoded, this field MUST be set to zero on transmission and MUST
            be ignored on receipt.</t>

            <t>IPv4 Node Address: a 4-octet IPv4 address representing a
            node.</t>

            <t>SR-MPLS SID: optional, 4-octet field containing label, TC, S
            and TTL as defined for Segment Type A <xref
            target="I-D.ietf-idr-sr-policy-safi"/>.</t>
          </list></t>
      </section>

      <section anchor="TYPED" title="Segment Type D">
        <t>The Type D Segment Sub-TLV encodes an IPv6 node address, SR
        Algorithm, and an optional SR-MPLS SID. The format is as follows:
        <figure align="center">
            <artwork align="left"><![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     |  SR Algorithm |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                IPv6 Node Address (16 octets)                //      
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                SR-MPLS SID (optional, 4 octets)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 3: Type D Segment sub-TLV

where:]]></artwork>
          </figure><list style="symbols">
            <t>Type: 4</t>

            <t>Length: Specifies the length of the value field (i.e., not
            including Type and Length fields) in terms of octets. The value
            MUST be 22 when the SR-MPLS SID is present else it MUST be 18.</t>

            <t>Flags: 1 octet of flags as defined in <xref
            target="SEGMENTFLAGS"/>.</t>

            <t>SR Algorithm: 1 octet specifying SR Algorithm as described in
            section 3.1.1 in <xref target="RFC8402"/> when A-Flag as defined
            in <xref target="SEGMENTFLAGS"/> is present. SR Algorithm is used
            by SRPM <xref target="I-D.ietf-idr-sr-policy-safi"/> as described
            in section 4 in <xref target="RFC9256"/>. When A-Flag is not
            encoded, this field MUST be set to zero on transmission and MUST
            be ignored on receipt.</t>

            <t>IPv6 Node Address: a 16-octet IPv6 address representing a
            node.</t>

            <t>SR-MPLS SID: optional, 4-octet field containing label, TC, S
            and TTL as defined for Segment Type A <xref
            target="I-D.ietf-idr-sr-policy-safi"/>.</t>
          </list></t>
      </section>

      <section anchor="TYPEE" title="Segment Type E">
        <t>The Type E Segment Sub-TLV encodes an IPv4 node address, a local
        interface Identifier (Local Interface ID), and an optional SR-MPLS
        SID. The format is as follows: <figure align="center">
            <artwork align="left"><![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     |   RESERVED    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Local Interface ID (4 octets)                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 IPv4 Node Address (4 octets)                  |     
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                SR-MPLS SID (optional, 4 octets)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 4: Type E Segment sub-TLV

where:]]></artwork>
          </figure><list style="symbols">
            <t>Type: 5.</t>

            <t>Length: Specifies the length of the value field (i.e., not
            including Type and Length fields) in terms of octets. The value
            MUST be 14 when the SR-MPLS SID is present else it MUST be 10.</t>

            <t>Flags: 1 octet of flags as defined in <xref
            target="SEGMENTFLAGS"/>.</t>

            <t>RESERVED: 1 octet of reserved bits. This field MUST be set to
            zero on transmission and MUST be ignored on receipt.</t>

            <t>Local Interface ID: 4 octets of interface index of local
            interface (refer TLV 258 of <xref target="RFC9552"/>).</t>

            <t>IPv4 Node Address: a 4-octet IPv4 address representing a
            node.</t>

            <t>SR-MPLS SID: optional, 4-octet field containing label, TC, S
            and TTL as defined for Segment Type A <xref
            target="I-D.ietf-idr-sr-policy-safi"/>.</t>
          </list></t>
      </section>

      <section anchor="TYPEF" title="Segment Type F">
        <t>The Type F Segment Sub-TLV encodes an adjacency local address, an
        adjacency remote address, and an optional SR-MPLS SID. The format is
        as follows: <figure align="center">
            <artwork align="left"><![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     |   RESERVED    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Local IPv4 Address (4 octets)                  | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Remote IPv4 Address  (4 octets)                |  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                SR-MPLS SID (optional, 4 octets)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 5: Type F Segment sub-TLV

where:]]></artwork>
          </figure><list style="symbols">
            <t>Type: 6.</t>

            <t>Length: Specifies the length of the value field (i.e., not
            including Type and Length fields) in terms of octets. The value
            MUST be 14 when the SR-MPLS SID is present else it MUST be 10.</t>

            <t>Flags: 1 octet of flags as defined in <xref
            target="SEGMENTFLAGS"/>.</t>

            <t>RESERVED: 1 octet of reserved bits. This field MUST be set to
            zero on transmission and MUST be ignored on receipt.</t>

            <t>Local IPv4 Address: a 4-octet IPv4 address representing the
            local link address of the node.</t>

            <t>Remote IPv4 Address: a 4-octet IPv4 address representing the
            link address of the neighbor node.</t>

            <t>SR-MPLS SID: optional, 4-octet field containing label, TC, S
            and TTL as defined for Segment Type A <xref
            target="I-D.ietf-idr-sr-policy-safi"/>.</t>
          </list></t>
      </section>

      <section anchor="TYPEG" title="Segment Type G">
        <t>The Type G Segment Sub-TLV encodes an IPv6 link-local adjacency
        with IPv6 local node address, a local interface identifier (Local
        Interface ID), IPv6 remote node address, a remote interface identifier
        (Remote Interface ID), and an optional SR-MPLS SID. The format is as
        follows: <figure align="center">
            <artwork align="left"><![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     |   RESERVED    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Local Interface ID (4 octets)                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                IPv6 Local Node Address (16 octets)          //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Remote Interface ID (4 octets)                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                IPv6 Remote Node Address (16 octets)         //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                SR-MPLS SID (optional, 4 octets)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 6: Type G Segment sub-TLV

where:]]></artwork>
          </figure><list style="symbols">
            <t>Type: 7</t>

            <t>Length: Specifies the length of the value field (i.e., not
            including Type and Length fields) in terms of octets. The value
            MUST be 46 when the SR-MPLS SID is present else it MUST be 42.</t>

            <t>Flags: 1 octet of flags as defined in <xref
            target="SEGMENTFLAGS"/>.</t>

            <t>RESERVED: 1 octet of reserved bits. This field MUST be set to
            zero on transmission and MUST be ignored on receipt.</t>

            <t>Local Interface ID: 4 octets of interface index of local
            interface (refer TLV 258 of <xref target="RFC9552"/>).</t>

            <t>IPv6 Local Node Address: a 16-octet IPv6 address representing
            the node.</t>

            <t>Remote Interface ID: 4 octets of interface index of remote
            interface (refer TLV 258 of <xref target="RFC9552"/>). The value
            MAY be set to zero when the local node address and interface
            identifiers are sufficient to describe the link.</t>

            <t>IPv6 Remote Node Address: a 16-octet IPv6 address. The value
            MAY be set to zero when the local node address and interface
            identifiers are sufficient to describe the link.</t>

            <t>SR-MPLS SID: optional, 4-octet field containing label, TC, S
            and TTL as defined for Segment Type A <xref
            target="I-D.ietf-idr-sr-policy-safi"/>.</t>
          </list></t>
      </section>

      <section anchor="TYPEH" title="Segment Type H">
        <t>The Type H Segment Sub-TLV encodes an adjacency local address, an
        adjacency remote address, and an optional SR-MPLS SID. The format is
        as follows: <figure align="center">
            <artwork align="left"><![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     |   RESERVED    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//               Local IPv6 Address (16 octets)                //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//               Remote IPv6 Address  (16 octets)              // 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                SR-MPLS SID (optional, 4 octets)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 7: Type H Segment sub-TLV

where:]]></artwork>
          </figure><list style="symbols">
            <t>Type: 8</t>

            <t>Length: Specifies the length of the value field (i.e., not
            including Type and Length fields) in terms of octets. The value
            MUST be 38 when the SR-MPLS SID is present else it MUST be 34.</t>

            <t>Flags: 1 octet of flags as defined in <xref
            target="SEGMENTFLAGS"/>.</t>

            <t>RESERVED: 1 octet of reserved bits. This field MUST be set to
            zero on transmission and MUST be ignored on receipt.</t>

            <t>Local IPv6 Address: a 16-octet IPv6 address representing the
            local link address of the node.</t>

            <t>Remote IPv6 Address: a 16-octet IPv6 address representing the
            link address of the neighbor node.</t>

            <t>SR-MPLS SID: optional, 4-octet field containing label, TC, S
            and TTL as defined for Segment Type A <xref
            target="I-D.ietf-idr-sr-policy-safi"/>.</t>
          </list></t>
      </section>

      <section anchor="TYPEI" title="Segment Type I">
        <t>The Type I Segment Sub-TLV encodes an IPv6 node address, SR
        Algorithm, and an optional SRv6 SID. The format is as follows: <figure
            align="center">
            <artwork align="left"><![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     | SR Algorithm  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                 IPv6 Node Address (16 octets)               //      
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                    SRv6 SID (optional, 16 octets)           //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//     SRv6 Endpoint Behavior and SID Structure (optional)     //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 8: Type I Segment sub-TLV

where:]]></artwork>
          </figure><list style="symbols">
            <t>Type: 14</t>

            <t>Length: Specifies the length of the value field (i.e., not
            including Type and Length fields) in terms of octets. The value
            MUST be one of: 42 when both SRv6 SID and SRv6 Endpoint Behavior
            &amp; SID Structure are present, 34 when only SRv6 SID is present,
            or 18 when the SRv6 SID is not present.</t>

            <t>Flags: 1 octet of flags as defined in <xref
            target="SEGMENTFLAGS"/>.</t>

            <t>SR Algorithm: 1 octet specifying SR Algorithm as described in
            section 3.1.1 in <xref target="RFC8402"/> when A-Flag as defined
            in <xref target="SEGMENTFLAGS"/> is present. SR Algorithm is used
            by SRPM <xref target="I-D.ietf-idr-sr-policy-safi"/> as described
            in section 4 in <xref target="RFC9256"/>. When A-Flag is not
            encoded, this field MUST be set to zero on transmission and MUST
            be ignored on receipt.</t>

            <t>IPv6 Node Address: a 16-octet IPv6 address representing the
            node.</t>

            <t>SRv6 SID: optional, a 16-octet IPv6 address.</t>

            <t>SRv6 Endpoint Behavior and SID Structure: Optional, as defined
            in <xref target="I-D.ietf-idr-sr-policy-safi"/> for Segment Type
            B.</t>
          </list></t>

        <t>The TLV 10 defined for the advertisement of Segment Type I in the
        early draft versions of <xref target="I-D.ietf-idr-sr-policy-safi"/>
        has been deprecated to avoid backward compatibility issues.</t>
      </section>

      <section anchor="TYPEJ" title="Segment Type J">
        <t>The Type J Segment Sub-TLV encodes an IPv6 link-local adjacency
        with local node address, a local interface identifier (Local Interface
        ID), remote IPv6 node address, a remote interface identifier (Remote
        Interface ID), and an optional SRv6 SID. The format is as follows:
        <figure align="center">
            <artwork align="left"><![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     | SR Algorithm  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Local Interface ID (4 octets)                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                IPv6 Local Node Address (16 octets)          //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Remote Interface ID (4 octets)                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                IPv6 Remote Node Address (16 octets)         //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                SRv6 SID (optional, 16 octets)               //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//     SRv6 Endpoint Behavior and SID Structure (optional)     //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 9: Type J Segment sub-TLV

where:]]></artwork>
          </figure><list style="symbols">
            <t>Type: 15</t>

            <t>Length: Specifies the length of the value field (i.e., not
            including Type and Length fields) in terms of octets. The value
            MUST be one of: 66 when both SRv6 SID and SRv6 Endpoint Behavior
            &amp; SID Structure are present, 58 when only SRv6 SID is present,
            or 42 when the SRv6 SID is not present.</t>

            <t>Flags: 1 octet of flags as defined in <xref
            target="SEGMENTFLAGS"/>.</t>

            <t>SR Algorithm: 1 octet specifying SR Algorithm as described in
            section 3.1.1 in <xref target="RFC8402"/> when A-Flag as defined
            in <xref target="SEGMENTFLAGS"/> is present. SR Algorithm is used
            by SRPM <xref target="I-D.ietf-idr-sr-policy-safi"/> as described
            in section 4 in <xref target="RFC9256"/>. When A-Flag is not
            encoded, this field MUST be set to zero on transmission and MUST
            be ignored on receipt.</t>

            <t>Local Interface ID: 4 octets of interface index of local
            interface (refer TLV 258 of <xref target="RFC9552"/>).</t>

            <t>IPv6 Local Node Address: a 16-octet IPv6 address representing
            the node.</t>

            <t>Remote Interface ID: 4 octets of interface index of remote
            interface (refer TLV 258 of <xref target="RFC9552"/>). The value
            MAY be set to zero when the local node address and interface
            identifiers are sufficient to describe the link.</t>

            <t>IPv6 Remote Node Address: a 16-octet IPv6 address. The value
            MAY be set to zero when the local node address and interface
            identifiers are sufficient to describe the link.</t>

            <t>SRv6 SID: optional, a 16-octet IPv6 address.</t>

            <t>SRv6 Endpoint Behavior and SID Structure: Optional, as defined
            in <xref target="I-D.ietf-idr-sr-policy-safi"/> for Segment Type
            B.</t>
          </list></t>

        <t>The TLV 11 defined for the advertisement of Segment Type J in the
        early draft versions of <xref target="I-D.ietf-idr-sr-policy-safi"/>
        has been deprecated to avoid backward compatibility issues.</t>
      </section>

      <section anchor="TYPEK" title="Segment Type K">
        <t>The Type K Segment Sub-TLV encodes an adjacency local address, an
        adjacency remote address, and an optional SRv6 SID. The format is as
        follows: <figure align="center">
            <artwork align="left"><![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     | SR Algorithm  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//               Local IPv6 Address (16 octets)                //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//               Remote IPv6 Address  (16 octets)              // 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                SRv6 SID (optional, 16 octets)               //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//     SRv6 Endpoint Behavior and SID Structure (optional)     //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 10: Type K Segment sub-TLV

where:]]></artwork>
          </figure><list style="symbols">
            <t>Type: 16</t>

            <t>Length: Specifies the length of the value field (i.e., not
            including Type and Length fields) in terms of octets. The value
            MUST be one of: 58 when both SRv6 SID and SRv6 Endpoint Behavior
            &amp; SID Structure are present, 50 when only SRv6 SID is present,
            or 34 when the SRv6 SID is not present.</t>

            <t>Flags: 1 octet of flags as defined in <xref
            target="SEGMENTFLAGS"/>.</t>

            <t>SR Algorithm: 1 octet specifying SR Algorithm as described in
            section 3.1.1 in <xref target="RFC8402"/> when A-Flag as defined
            in <xref target="SEGMENTFLAGS"/> is present. SR Algorithm is used
            by SRPM <xref target="I-D.ietf-idr-sr-policy-safi"/> as described
            in section 4 in <xref target="RFC9256"/>. When A-Flag is not
            encoded, this field MUST be set to zero on transmission and MUST
            be ignored on receipt.</t>

            <t>Local IPv6 Address: a 16-octet IPv6 address representing the
            local link address of the node.</t>

            <t>Remote IPv6 Address: a 16-octet IPv6 address representing the
            link address of the neighbor node.</t>

            <t>SRv6 SID: optional, a 16-octet IPv6 address.</t>

            <t>SRv6 Endpoint Behavior and SID Structure: Optional, as defined
            in <xref target="I-D.ietf-idr-sr-policy-safi"/> for Segment Type
            B.</t>
          </list></t>

        <t>The TLV 12 defined for the advertisement of Segment Type K in the
        early draft versions of <xref target="I-D.ietf-idr-sr-policy-safi"/>
        has been deprecated to avoid backward compatibility issues.</t>
      </section>

      <section anchor="SEGMENTFLAGS" title="Segment Flags">
        <t>The Segment Types sub-TLVs described above may contain the
        following flags in the "Segment Flags" field defined in <xref
        target="I-D.ietf-idr-sr-policy-safi"/>. This document introduces
        additional flags as below:<figure align="center">
            <artwork align="left"><![CDATA[
 0 1 2 3 4 5 6 7 
+-+-+-+-+-+-+-+-+
|V|A|S|B|       | 
+-+-+-+-+-+-+-+-+

Figure 11: Segment Flags

]]></artwork>
          </figure> where:<list>
            <t>V-Flag: existing flag as defined in <xref
            target="I-D.ietf-idr-sr-policy-safi"/>.</t>

            <t>A-Flag: This flag, when set, indicates the presence of SR
            Algorithm id in the "SR Algorithm" field applicable to various
            Segment Types. SR Algorithm is used by SRPM <xref
            target="I-D.ietf-idr-sr-policy-safi"/> as described in section 4
            of <xref target="RFC9256"/>.</t>

            <t>S-Flag: This flag, when set, indicates the presence of the
            SR-MPLS or SRv6 SID depending on the segment type.</t>

            <t>B-Flag: existing flag as defined in <xref
            target="I-D.ietf-idr-sr-policy-safi"/>.</t>
          </list></t>

        <t>The following applies to the Segment Flags:<list style="symbols">
            <t>V-Flag applies to all Segment Types including the ones
            introduced by this document.</t>

            <t>A-Flag applies to Segment Types C, D, I, J, and K. If A-Flag
            appears with Segment Types A, B, E, F, G, and H, it MUST be
            ignored.</t>

            <t>S-Flag applies to Segment Types C, D, E, F, G, H, I, J, and K.
            If S-Flag appears with Segment Types A or B, it MUST be
            ignored.</t>

            <t>B-Flag applies to Segment Types B, I, J, and K. If B-Flag
            appears with Segment Types A, C, D, E, F, G, and H, it MUST be
            ignored.</t>
          </list></t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This section covers the IANA considerations for this document.</t>

      <section anchor="IANASIDLIST" title="SR Policy Segment List Sub-TLVs">
        <t>This document requests the allocation of the following code points
        from the "SR Policy Segment List Sub-TLVs" registry under the "BGP
        Tunnel Encapsulation" registry group.</t>

        <t><figure align="center">
            <artwork align="center"><![CDATA[Value   Description                     Reference 
-----------------------------------------------------
  3    Segment Type C sub-TLV           This document
  4    Segment Type D sub-TLV           This document
  5    Segment Type E sub-TLV           This document
  6    Segment Type F sub-TLV           This document
  7    Segment Type G sub-TLV           This document
  8    Segment Type H sub-TLV           This document
 14    Segment Type I sub-TLV           This document
 15    Segment Type J sub-TLV           This document
 16    Segment Type K sub-TLV           This document

     Table 1: SR Policy Segment List Code Points

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

      <section anchor="IANASIDFLAGS" title="SR Policy Segment Flags">
        <t>This document requests the allocation of code points from the "SR
        Policy Segment Flags" registry under the "BGP Tunnel Encapsulation"
        registry group.</t>

        <t><figure align="center">
            <artwork align="center"><![CDATA[ Bit     Description                                Reference 
------------------------------------------------------------------
   1     SR Algorithm Flag (A-Flag)                 This document
   2     SID Specified Flag (S-Flag)                This document

     Table 2: SR Policy Segment Flags
                                ]]></artwork>
          </figure></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not introduce any security considerations over
      <xref target="I-D.ietf-idr-sr-policy-safi"/>.</t>
    </section>

    <section anchor="Manageability" title="Manageability Considerations">
      <t>This document does not introduce any operations and manageability
      considerations over <xref target="I-D.ietf-idr-sr-policy-safi"/>.</t>
    </section>

    <section title="Acknowledgments">
      <t>The authors of this document would like to Dan Romascanu and Stig
      Venaas for their comments and review of this document. The authors would
      like to thank Susan Hares for her detailed shepherd review that helped
      in improving the document.</t>
    </section>
  </middle>

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

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

      <?rfc include="reference.I-D.ietf-idr-sr-policy-safi"?>

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

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

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

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

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

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

    <references title="Informational References"/>
  </back>
</rfc>
