<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE rfc [
  <!ENTITY RFC8200 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8200.xml">
  <!ENTITY RFC8402 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8402.xml">
  <!ENTITY RFC8754 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8754.xml">
  <!ENTITY RFC9800 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9800.xml">

  <!ENTITY I-D.ietf-spring-srv6-security SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-spring-srv6-security">
]>

<?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 xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-6man-sidlist-clarification-00" category="std" consensus="true" obsoletes="" updates="8754" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3">

  <front>

    <title abbrev="SID List Clarification">Clarifying SRv6 SID List Processing</title>

    <seriesInfo name="Internet-Draft" value="draft-ietf-6man-sidlist-clarification-00"/>

    <author initials="A." surname="Farrel" fullname="Adrian Farrel">
      <organization>Old Dog Consulting</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <country>United Kingdom</country>
        </postal>
        <email>adrian@olddog.co.uk</email>
      </address>
    </author>

    <author fullname="Suresh Krishnan" initials="S" surname="Krishnan">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <country>USA</country>
        </postal>
        <email>suresh.krishnan@gmail.com</email>
      </address>
    </author>

    <date year="2025"/>

    <keyword>Segment Routing</keyword>
    <keyword>SR</keyword>
    <keyword>Segment Identifier</keyword>
    <keyword>SID</keyword>
    <keyword>IPv6</keyword>
    <keyword>Segment Routing Header</keyword>
    <keyword>SRH</keyword>

    <abstract>

      <t>Segment Routing over IPv6 (SRv6) is the instantiation of Segment Routing (SR) on the IPv6 data
         plane. Segments are indicated by Segment Identifiers (SIDs). SRv6 utilizes the Segment Routing
         Header (SRH), an IPv6 extension header, that includes a SID list indicating the sequence of
         segments and any additional processing to be performed.</t>

      <t>This document updates RFC 8754 by clarifying the processing of SID list entries. It does not change
         any elements of the SRv6 architecture.</t>

    </abstract>

  </front>

  <middle>

    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>

      <t>The Segment Routing (SR) architecture is specified in <xref target="RFC8402" />.
         SR forwards packets along a series of segments, and may perform additional
         segment-specific processing on packets. Segments are indicated by Segment Identifiers
         (SIDs).</t>

      <t>The mechanisms to achieve Segment Routing for IPv6 (SRv6) include the use of the
         Segment Routing Header (SRH) <xref target="RFC8754" /> an IPv6 extension header that
         includes a SID list indicating the sequence of segments and any additional processing
         to be performed.</t>

      <t>This document updates <xref target="RFC8754" /> by clarifying the processing of SID list
         entries. It does not change any elements of the SRv6 architecture.</t>

    </section>

    <section anchor="details" numbered="true" toc="default">
      <name>Clarification</name>

      <t>The SRH is processed per Section 4 of <xref target="RFC8754" />. One objective is to determine the
         value to place in the Destination Address field of the IPv6 packet. To this end, the
         next entry in the SID list in the SRH is processed and mapped to the value to place
         in the Destination Address field.</t>

      <t>The value placed in the 128-bit Destination Address field of an IPv6 packet header needs to be a routable
         IPv6 address since that is required for forwarding the packet.</t>

      <t>Note that entries in the SID list do not need to be fully-formed IPv6 addresses that
         are copied direct to the Destination Address field of the IPv6 packet. The mapping
         from SID list entry could be a direct copy (the SID list contains a list of IPv6
         addresses), or could involve a more complex function.</t>

      <t>An example of such a function is shown in <xref target="RFC9800" /> where a REPLACE-CSID
         compressed SID is expanded to be placed in the Destination Address field.</t>

    </section>

    <section anchor="updates" numbered="true" toc="default">
      <name>Updates to RFC 8754</name>

      <section anchor="segLeft" numbered="true" toc="default">
        <name>Segments Left in Section 2 of RFC 8754</name>

        <t>The definition of the Segments Left field of the SRH is presented as:</t>

        <blockquote>
          <dl spacing="normal" newline="false">
            <dt>Segments Left:</dt>
            <dd>Defined in <xref target="RFC8200" sectionFormat="comma" section="4.4" format="default"/>.</dd>
          </dl>
        </blockquote>

        <t>This is clarified by <eref target="https://www.rfc-editor.org/errata_search.php?eid=7102">Erratum Report EID 7102</eref>.
           This clarification is included in this update for completeness. The new text reads:</t>

        <blockquote>
          <dl spacing="normal" newline="false">
            <dt>Segments Left:</dt>
            <dd>Defined in <xref target="RFC8200" sectionFormat="comma" section="4.4" format="default"/>.
                Specifically, for the SRH, the number of unprocessed 128-bit entries in the Segment List.</dd>
          </dl>
        </blockquote>

      </section>

      <section anchor="segList" numbered="true" toc="default">
        <name>Segment List in Section 2 of RFC 8754</name>

        <t>The figure in Section 2 of RFC 8754 reads:</t>

        <blockquote>
          <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Last Entry   |     Flags     |              Tag              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|            Segment List[0] (128-bit IPv6 address)             |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                                                               |
                              ...
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|            Segment List[n] (128-bit IPv6 address)             |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                                                             //
//         Optional Type Length Value objects (variable)       //
//                                                             //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]>
          </artwork>
        </blockquote>

        <t>This is updated as follows to clarify that the entries in the Segment List are
           128 bit entries, but not necessarily IPv6 addresses.</t>

        <blockquote>
          <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Last Entry   |     Flags     |              Tag              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|   Segment List[0] (128-bit entry mapped to IPv6 addresses)    |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                                                               |
                              ...
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|   Segment List[n] (128-bit entry mapped to IPv6 addresses)    |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                                                             //
//         Optional Type Length Value objects (variable)       //
//                                                             //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]>
          </artwork>
        </blockquote>

        <t>The text in RFC 8754 reads:</t>

        <blockquote>
          <dl spacing="normal" newline="false">
            <dt>Segment List[0..n]:</dt>
            <dd>128-bit IPv6 addresses representing the nth
                segment in the Segment List.  The Segment List is encoded starting
                from the last segment of the SR Policy.  That is, the first
                element of the Segment List (Segment List[0]) contains the last
                segment of the SR Policy, the second element contains the
                penultimate segment of the SR Policy, and so on.</dd>
          </dl>
        </blockquote>

        <t>This is updated as follows to clarify that the entries in the Segment List are
           128 bit entries, but not necessarily IPv6 addresses.</t>

        <blockquote>
          <dl spacing="normal" newline="false">
            <dt>Segment List[0..n]:</dt>
            <dd>128-bit entries representing the nth
                segment in the Segment List.  The Segment List is encoded starting
                from the last segment of the SR Policy.  That is, the first
                element of the Segment List (Segment List[0]) contains the last
                segment of the SR Policy, the second element contains the
                penultimate segment of the SR Policy, and so on.</dd>
          </dl>
        </blockquote>

      </section>

      <section anchor="hmac" numbered="true" toc="default">
        <name>HMAC Processing in Section 2.1.2.1 of RFC 8754</name>

        <t>In describing the HMAC processing, the text in RFC 8754 says that
           HMAC verification checks that the destination address of the packet
           matches that indicated  by the next entry in the Segment List.</t>

        <blockquote>
          <ul spacing="normal" bare="false" empty="false">
             <li>HMAC Segments Left is less than or equal to Last Entry, and the
               destination address is equal to Segment List[Segments Left].</li>
          </ul>
        </blockquote>

        <t>This is updated to allow a non-direct mapping from Segment List entry to
           destination address as follows:</t>

        <blockquote>
          <ul spacing="normal" bare="false" empty="false">
             <li>HMAC Segments Left is less than or equal to Last Entry, and the
               destination address is equal to the address created by mapping from Segment
               List[Segments Left].</li>
          </ul>
        </blockquote>

        <t>Further, in describing the concatenation of information to generate the
           text field input to the HMAC computation, this section says:</t>

        <blockquote>
          <ul spacing="normal" bare="false" empty="false">
             <li>SRH: All addresses in the Segment List (variable octets)</li>
          </ul>
        </blockquote>

        <t>This is updated as follows to indicate that Segment List entries are
           not necessarily IPv6 addresses.</t>

        <blockquote>
          <ul spacing="normal" bare="false" empty="false">
             <li>SRH: All entries in the Segment List (variable octets)</li>
          </ul>
        </blockquote>

      </section>

      <section anchor="srhProcess" numbered="true" toc="default">
        <name>SRH Processing in Section 4.3.1.1 of RFC 8754</name>

        <t>The processing steps for a locally instantiated SRv6 SID include the following step:</t>

        <blockquote>
          <artwork name="" type="" align="left" alt="">
S16.       Copy Segment List[Segments Left] from the SRH to the
           destination address of the IPv6 header.
          </artwork>
        </blockquote>

        <t>As explained earlier in this document, the function used to generate the destination address may be a copy, but may be
           some other function. Thus, this text is updated as follows:</t>

        <blockquote>
          <artwork name="" type="" align="left" alt="">
S16.       Derive the destination address of the IPv6 header
           from Segment List[Segments Left] in the SRH.
          </artwork>
        </blockquote>

      </section>

      <section anchor="icmpProcess" numbered="true" toc="default">
        <name>ICMP Processing in Section 5.4 of RFC 8754</name>

        <t>The method for deriving the destination address of the invoking packet in RFC 8574 reads as:</t>

        <blockquote>
          <ul spacing="normal" bare="false" empty="false">
            <li>The SID at Segment List[0] may be used as the
              destination address of the invoking packet.</li>
          </ul>
        </blockquote>

        <t>To allow for the 0th entry in the Segment List to be mapped rather than copied to a destination address, this
           is updated to:</t>

        <blockquote>
          <ul spacing="normal" bare="false" empty="false">
            <li>The SID at Segment List[0] may be mapped to derive the
              destination address of the invoking packet.</li>
          </ul>
        </blockquote>

      </section>

    </section>

    <section anchor="operational-considerations" numbered="true" toc="default">
      <name>Operational Considerations</name>

      <t>This document does not change any elements of the SR architecture and, as such,
         it makes no change to the operational procedures or management tools of SR.</t>

      <t>In clarifying the nature of SID list processing, this document also clarifies the
         nature of SID list entries. Operational and management tools that examine the SID
         list in a packet need to be aware of the nature of those entries in order to
         offer maximal clarity to the users of those tools.</t>

    </section>

    <section anchor="security-considerations" numbered="true" toc="default">
      <name>Security Considerations</name>

      <t>This document makes no changes to the security properties of SRv6. See <xref target="I-D.ietf-spring-srv6-security" />
         for more discussion of SRv6 security.</t>

      <t>Note that describing the SID list entries as being mapped to the destination address of a packet enables potential
         additional security features.</t>

    </section>

    <section anchor="iana-considerations" numbered="true" toc="default">
      <name>IANA Considerations</name>

      <t>This document makes no requests for IANA action.</t>

    </section>

    <section anchor="acknowledgments" numbered="false" toc="default">
      <name>Acknowledgments</name>

      <t>Thanks to Eric Vyncke and Erik Kline for inspiring the authors to write this document. Thanks to Bob Hinden,
         Mohamed Boucadair, Joel Halpern, Yao Liu, Bruno Decraene, and Brian Carpenter for their reviews and comments
         that improved this document.</t>

    </section>

  </middle>

  <back>
    <references>
      <name>Normative References</name>

      &RFC8402;
      &RFC8754;

    </references>

    <references>
      <name>Informative References</name>

      &RFC8200;
      &RFC9800;
      &I-D.ietf-spring-srv6-security;

    </references>

  </back>

</rfc>
