<?xml version="1.0" encoding="utf-8"?>
<rfc category="std"
     docName="draft-horn-dmm-srh-3gpp-mobility-tlv-00"
     ipr="trust200902"
     submissionType="IETF"
     version="3"
     xml:lang="en">
  <front>
    <title abbrev="SRH TLVs for 3GPP Mobility">Segment Routing Header TLVs for 3GPP Mobility Metadata</title>
    <seriesInfo name="Internet-Draft" value="draft-horn-dmm-srh-3gpp-mobility-tlv-00"/>
    <author fullname="Jakub Horn" initials="J." surname="Horn">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>Milpitas, CA 95035</street>
          <country>United States of America</country>
        </postal>
        <email>jakuhorn@cisco.com</email>
      </address>
    </author>
    <date year="2026" month="November" day="15"/>
    <area>Internet</area>
    <keyword>SRv6</keyword>
    <keyword>SRH</keyword>
    <keyword>3GPP</keyword>
    <keyword>mobility</keyword>
    <abstract>
      <t>This document requests two Segment Routing Header (SRH) TLV codepoints. Both are containers for mobility metadata used by 3GPP user-plane functions. One does not change en route. The other may change en route. This document specifies the framing so that any Segment Routing node can skip either container. Sub-TLV types and their meaning are under 3GPP change control. Neither container changes IPv6 forwarding.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Note to Readers</name>
      <t>This document is an individual submission. Comments are invited from the SPRING and DMM working groups.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>The Segment Routing Header (SRH) <xref target="RFC8754"/> carries optional TLVs for the segment endpoint identified by the active Segment Identifier (SID). TLV types 0 through 127 do not change en route. Types 128 through 255 may change en route. The registry policy is IETF Review.</t>
      <t>A 3GPP user-plane function that uses SRv6 <xref target="RFC9433"/> can need per-packet session metadata at that endpoint. Some of that metadata is fixed by the SR source. Some of it is updated by a 3GPP function at a segment endpoint along the path. The metadata is not a forwarding instruction, and the set of information elements changes on the 3GPP release cycle. One SRH TLV type per information element would consume a registry shared by every SRv6 deployment and would require IETF Review for each addition.</t>
      <t>This document specifies two containers with one common framing. The 3GPP Mobility Container TLV does not change en route, and its codepoint is requested from the range 7 through 123. The 3GPP Mobility Mutable Container TLV may change en route inside a size the SR source pre-allocates, and its codepoint is requested from the range 128 through 251. That size does not change en route. Each value is a sequence of sub-TLVs. This document defines how those sub-TLVs are delimited. 3GPP specifications assign the Sub-Type values of each container and define each Value. A Sub-Type in one container has no meaning in the other unless a 3GPP specification says so. This document creates no IANA registry for Sub-Types. The IETF does not assign Sub-Type meanings.</t>
      <t>Both containers are used inside a limited domain <xref target="RFC8402"/> that includes the 3GPP functions which place them in an SRH and consume them. They are carried only in an IPv6 SRH, Routing Type 4. They do not change the Segment List, the SRH Flags, or the SRH Tag.</t>
    </section>
    <section anchor="requirements-language">
      <name>Requirements Language</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted 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 anchor="format">
      <name>Container Format</name>
      <t>Both TLVs use the format in this section. Alignment requirement: 4n, measured from the start of the SRH as specified in <xref target="RFC8754"/>. The SR source uses Pad1 and PadN for alignment and to keep the Routing Header a multiple of 8 octets.</t>
      <t>An SRH contains at most one TLV of each type. The SR source does not place a TLV of either type in the SRH when that TLV would contain no sub-TLV. The value contains only sub-TLVs, with no version field, flags field, or padding between them.</t>
      <artwork type="ascii-art"><![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    |         Sub-TLVs ...          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      <dl>
        <dt>Type:</dt>
        <dd>8 bits. One of the two values allocated under <xref target="iana"/>. The 3GPP Mobility Container TLV is allocated from the range 0 through 127. The 3GPP Mobility Mutable Container TLV is allocated from the range 128 through 255.</dd>
        <dt>Length:</dt>
        <dd>8 bits. Number of octets in Sub-TLVs, excluding Type and Length. The maximum is 255. Length equals the sum, over every sub-TLV, of (2 + Sub-Length), and is not 0.</dd>
      </dl>
      <t>Each sub-TLV has this format:</t>
      <artwork type="ascii-art"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Sub-Type   |   Sub-Length  |         Value ...             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      <dl>
        <dt>Sub-Type:</dt>
        <dd>8 bits. Assigned by a 3GPP specification for the container in which it appears. This document assigns no value. All 256 values of each container are available to 3GPP.</dd>
        <dt>Sub-Length:</dt>
        <dd>8 bits. Number of octets in Value, excluding Sub-Type and Sub-Length. Zero is syntactically valid.</dd>
        <dt>Value:</dt>
        <dd>Sub-Length octets, interpreted only under the 3GPP specification of this Sub-Type.</dd>
      </dl>
    </section>
    <section anchor="processing">
      <name>Processing</name>
      <t>Forwarding MUST NOT depend on the presence or contents of either container. A node MUST NOT add or remove either container in flight, and MUST NOT modify the 3GPP Mobility Container TLV in flight. The SR source pre-allocates the 3GPP Mobility Mutable Container TLV and sets its Length. A consumer MAY rewrite octets inside that pre-allocated value as specified by 3GPP. The rewrite MUST leave a valid sequence of sub-TLVs that occupies exactly that Length. The consumer MUST NOT change Length and MUST NOT add or remove octets. The size of the mutable container therefore does not grow or otherwise change en route. Every node that is not that consumer MUST NOT modify the mutable container.</t>
      <t>The SR source sets Type to the allocated codepoint of each container and places each container in the TLV area of the SRH, with Hdr Ext Len and Last Entry set as specified in <xref target="RFC8754"/>, Section 2.1. When either container is present, the SR source pushes an SRH even for a single SID, and includes that SID in the Segment List, so the start of the TLV area is unambiguous. Each endpoint that reads or modifies a container still has the SRH when its SID is the Destination Address.</t>
      <t>A segment endpoint processes a container only when local configuration identifies the active SID as a consumer, which is the same gate <xref target="RFC8754"/> defines for SRH TLVs. Every other node ignores the TLV.</t>
      <t>A consumer walks the sub-TLVs of each container it is configured to process. A container is malformed if it is not fully contained in the SRH, if more than one TLV of that type is present, if Length is 0, if the sub-TLV sequence does not fill Length exactly, or if a recognized Sub-Type has a Sub-Length that its 3GPP specification rejects. A consumer discards a packet that contains a malformed container. It SHOULD send an ICMP Parameter Problem, Code 0, rate-limited, as specified for an SRH TLV error in <xref target="RFC8754"/>, so the source can diagnose the discard. The packet is discarded whether or not the ICMP message is sent. The Pointer identifies Hdr Ext Len when the TLV exceeds the SRH, and otherwise the Type octet of the malformed container.</t>
      <t>The consumer MUST skip an unrecognized Sub-Type by Sub-Length and MUST continue. It MUST NOT discard the packet only because a Sub-Type is unknown. It applies each recognized sub-TLV as specified by 3GPP. It MUST NOT use a sub-TLV to change the Destination Address, the Segment List, or the endpoint behavior of the active SID. A sub-TLV MAY affect local handling of the payload at the consumer, including quality-of-service treatment, when the 3GPP specification of that Sub-Type says so.</t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>IANA is requested to allocate two values from the "Segment Routing Header TLVs" registry:</t>
      <table>
        <thead>
          <tr>
            <th>Value</th>
            <th>Description</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>TBA-1</td>
            <td>3GPP Mobility Container TLV</td>
            <td>This document</td>
          </tr>
          <tr>
            <td>TBA-2</td>
            <td>3GPP Mobility Mutable Container TLV</td>
            <td>This document</td>
          </tr>
        </tbody>
      </table>
      <t>TBA-1 is allocated from the unassigned values in 7 through 123. TBA-2 is allocated from the unassigned values in 128 through 251. No sub-TLV registry is requested. IANA is requested to note on each registration, if the registry allows a note: "Sub-TLV types inside this TLV are assigned by 3GPP specifications and are not registered by IANA."</t>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t>Both containers are for use inside a limited domain <xref target="RFC8402"/>. The security considerations of <xref target="RFC8754"/> and <xref target="RFC8402"/> apply. The HMAC TLV defined in <xref target="RFC8754"/> does not cover other SRH TLVs, so a successful HMAC check does not authenticate either container. A consumer may rewrite the contents of the mutable container. The size remains the size the SR source pre-allocated. This document defines no cryptographic algorithm, key, or certificate. A deployment that needs integrity or confidentiality of the metadata uses a mechanism that covers these octets, such as IPsec inside the limited domain.</t>
      <t>Neither container changes the IPv6 path, as specified in <xref target="processing"/>. Values are visible to nodes that can read the SRH. A 3GPP specification that places a session identifier in a Value needs to account for that visibility, and for the fact that a consumer may rewrite the mutable container.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/rfc/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/rfc/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
      <reference anchor="RFC8754" target="https://www.rfc-editor.org/rfc/rfc8754">
        <front>
          <title>IPv6 Segment Routing Header (SRH)</title>
          <author fullname="C. Filsfils" initials="C." surname="Filsfils" role="editor"/>
          <author fullname="D. Dukes" initials="D." surname="Dukes" role="editor"/>
          <author fullname="S. Previdi" initials="S." surname="Previdi"/>
          <author fullname="J. Leddy" initials="J." surname="Leddy"/>
          <author fullname="S. Matsushima" initials="S." surname="Matsushima"/>
          <author fullname="D. Voyer" initials="D." surname="Voyer"/>
          <date month="March" year="2020"/>
        </front>
        <seriesInfo name="RFC" value="8754"/>
        <seriesInfo name="DOI" value="10.17487/RFC8754"/>
      </reference>
    </references>
    <references>
      <name>Informative References</name>
      <reference anchor="RFC8402" target="https://www.rfc-editor.org/rfc/rfc8402">
        <front>
          <title>Segment Routing Architecture</title>
          <author fullname="C. Filsfils" initials="C." surname="Filsfils" role="editor"/>
          <author fullname="S. Previdi" initials="S." surname="Previdi" role="editor"/>
          <author fullname="L. Ginsberg" initials="L." surname="Ginsberg"/>
          <author fullname="B. Decraene" initials="B." surname="Decraene"/>
          <author fullname="S. Litkowski" initials="S." surname="Litkowski"/>
          <author fullname="R. Shakir" initials="R." surname="Shakir"/>
          <date month="July" year="2018"/>
        </front>
        <seriesInfo name="RFC" value="8402"/>
        <seriesInfo name="DOI" value="10.17487/RFC8402"/>
      </reference>
      <reference anchor="RFC9433" target="https://www.rfc-editor.org/rfc/rfc9433">
        <front>
          <title>Segment Routing over IPv6 for the Mobile User Plane</title>
          <author fullname="S. Matsushima" initials="S." surname="Matsushima" role="editor"/>
          <author fullname="C. Filsfils" initials="C." surname="Filsfils"/>
          <author fullname="M. Kohno" initials="M." surname="Kohno"/>
          <author fullname="P. Camarillo" initials="P." surname="Camarillo" role="editor"/>
          <author fullname="D. Voyer" initials="D." surname="Voyer"/>
          <date month="July" year="2023"/>
        </front>
        <seriesInfo name="RFC" value="9433"/>
        <seriesInfo name="DOI" value="10.17487/RFC9433"/>
      </reference>
    </references>
  </back>
</rfc>
