<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" category="std" consensus="true" docName="draft-ietf-opsawg-ipfix-srv6-srh-14" number="9487" ipr="trust200902" obsoletes="" updates="" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3">

  <front>
    <title abbrev="IPFIX Segment Routing over IPv6">Export of Segment Routing over IPv6 Information in IP Flow Information Export (IPFIX)</title>
    <seriesInfo name="RFC" value="9487"/>
    <author fullname="Thomas Graf" initials="T" surname="Graf">
      <organization>Swisscom</organization>
      <address>
        <postal>
          <street>Binzring 17</street>
          <city>Zurich</city>
          <code>8045</code>
          <country>Switzerland</country>
        </postal>
        <email>thomas.graf@swisscom.com</email>
      </address>
    </author>
    <author fullname="Benoit Claise" initials="B" surname="Claise">
      <organization>Huawei</organization>
      <address>
        <email>benoit.claise@huawei.com</email>
      </address>
    </author>
    <author fullname="Pierre Francois" initials="P." surname="Francois">
      <organization>INSA-Lyon</organization>
      <address>
        <postal>
          <street/>
          <city>Lyon</city>
          <region/>
          <code/>
          <country>France</country>
        </postal>
        <phone/>
        <email>pierre.francois@insa-lyon.fr</email>
        <uri/>
      </address>
    </author>
    <date month="November" year="2023"/>
    <area>ops</area>
    <workgroup>opsawg</workgroup>

<abstract>
      <t>This document introduces new IP Flow Information Export (IPFIX)
      Information Elements (IEs) to identify a set of information related to Segment Routing over IPv6
      (SRv6) such as data contained in a Segment Routing
      Header (SRH), the SRv6 control plane, and the SRv6 Endpoint behavior
      that traffic is being forwarded with.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="Introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t>A dedicated Routing Extension Header, called "Segment Routing Header
      (SRH)", is defined in <xref target="RFC8754" format="default"/> for use
      of Segment Routing over IPv6 (SRv6) data plane.</t>
      <t>Also, three routing protocol extensions, <xref
      target="I-D.ietf-lsr-ospfv3-srv6-extensions"
      format="default">OSPFv3</xref>, <xref target="RFC9352"
      format="default">IS-IS</xref>, and <xref target="RFC8669"
      format="default">BGP Prefix Segment Identifiers (Prefix-SIDs)</xref>;
      the <xref target="I-D.ietf-pce-segment-routing-ipv6" format="default">Path
      Computation Element Communication Protocol (PCEP) Extension</xref>; and
      the <xref target="RFC9256" format="default">Segment Routing Policy</xref>
      are defined to propagate Segment Identifiers (SIDs).</t>
      <t>SRv6 Segment Endpoint behaviors describe how packets should be
      processed by SRv6 Segment Endpoint Nodes. Such behaviors are defined in
      <xref target="RFC8986" format="default"/>.</t>
      <t>This document specifies eleven new IPFIX Information Elements (IEs)
      and one new subregistry within the "IPFIX Information Elements" registry
      <xref target="RFC7012" format="default"/>, for SRv6 purposes.</t>
      <t>These IEs are used to export the SRv6 active segment and its control
      plane protocol, the SRv6 Segment List, the next SRv6 node and its type,
      and the numbers of SRv6 segments left.</t>
      <t>Some examples are provided in <xref target="Encoding-Example" format="default"/>.</t>
    </section>
    <section anchor="notation" numbered="true" toc="default">
      <name>Terminology</name>
        <t> The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
        "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
        NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
        "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
        "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document
        are to be interpreted as described in BCP&nbsp;14 <xref
        target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
        appear in all capitals, as shown here.
        </t>

      <t>This document makes use of the terms defined in <xref
      target="RFC7011" format="default"/>, <xref target="RFC8402"
      format="default"/>, and <xref target="RFC8754" format="default"/>.</t>
      <t>The following terms are used as defined in <xref target="RFC7011" format="default"/>:</t>
      <ul spacing="normal">
        <li>IPFIX</li>
        <li>IPFIX Information Elements</li>
        <li>Template</li>
        <li>Template Record</li>
        <li>Options Template</li>
        <li>Options Template Record</li>
        <li>Data Record</li>
        <li>Data Set</li>
      </ul>
      <t>The following terms are used as defined in <xref target="RFC8402" format="default"/>:</t>
      <ul spacing="normal">
        <li>Segment Routing (SR)</li>
        <li>Segment</li>
        <li>Segment List</li>
        <li>Active Segment</li>
        <li>Segment Identifier (SID)</li>
        <li>SRv6</li>
        <li>SRv6 SID</li>
      </ul>
      <t>The following terms are used as defined in <xref target="RFC8754" format="default"/>:</t>
      <ul spacing="normal">
        <li>Segment Routing Header (SRH)</li>
        <li>SR Source Node</li>
        <li>Transit Node</li>
        <li>SR Segment Endpoint Node</li>
        <li>Reduced SRH</li>
        <li>Segments Left</li>
        <li>Last Entry</li>
      </ul>
    </section>
    <section anchor="IE" numbered="true" toc="default">
      <name>New IPFIX IPv6 SRH Information Elements</name>
      <t>This section specifies the new IPFIX IPv6 SRH IEs.</t>
      <dl newline="true" spacing="normal">
        <dt>srhFlagsIPv6</dt>
        <dd>The 8-bit Flags field defined in the SRH (<xref target="RFC8754"
        sectionFormat="of" section="2"/>).</dd>
        <dt>srhTagIPv6</dt>
        <dd>The 16-bit Tag field defined in the SRH (<xref target="RFC8754"
        sectionFormat="of" section="2"/>). A tag is used to mark a packet as
        part of a class or group of packets sharing the same set of
        properties.</dd>
        <dt>srhSegmentIPv6</dt>
        <dd>The 128-bit IPv6
          address that represents an SRv6 segment.</dd>
        <dt>srhActiveSegmentIPv6</dt>
        <dd>The  128-bit
          IPv6 address that represents the active SRv6 segment.</dd>
        <dt>srhSegmentIPv6BasicList</dt>
        <dd>
          The ordered basicList <xref target="RFC6313" format="default"/> of zero
          or more 128-bit IPv6 addresses in the SRH that represents the SRv6
          Segment List. As specified in <xref target="RFC8754"
          sectionFormat="of" section="2"/>, 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>
        <dt>srhSegmentIPv6ListSection</dt>
        <dd> The SRH Segment List as defined in <xref target="RFC8754"
        sectionFormat="of" section="2"/> as a series of octets in IPFIX.</dd>
        <dt>srhSegmentsIPv6Left</dt>
        <dd>The 8-bit unsigned integer that defines the number of segments remaining
        to reach the end of the Segment List from the SRH, as specified by the
        "Segments Left" field in <xref target="RFC8200" sectionFormat="of"
        section="4.4"/> and as mentioned in the SRH part of <xref
        target="RFC8754" sectionFormat="of" section="2"/>.</dd>
        <dt>srhIPv6Section</dt>
        <dd> The SRH and its TLVs as specified in <xref
        target="RFC8754" sectionFormat="of" section="2"/> as a series of
        octets in IPFIX.</dd>
        <dt>srhIPv6ActiveSegmentType</dt>
        <dd>
          The designator of the routing protocol or PCEP extension where the
          active SRv6 segment has been learned from.</dd>
        <dt>srhSegmentIPv6LocatorLength</dt>
        <dd>
          The length of the SRH segment IPv6 locator specified as the number of
          significant bits. Together with srhSegmentIPv6, it enables the
          calculation of the SRv6 Locator.</dd>
        <dt>srhSegmentIPv6EndpointBehavior</dt>
        <dd>The 16-bit unsigned integer that represents an SRv6 Endpoint behavior
        as per <xref target="RFC8986" sectionFormat="of" section="4"/>.</dd>
      </dl>
      <t>Note that the srhSegmentIPv6, srhSegmentIPv6LocatorLength, and
      srhSegmentIPv6EndpointBehavior IPFIX IEs are generic fields to be used
      in the context of IPFIX Options Templates or IPFIX Structured Data <xref
      target="RFC6313" format="default"/>.</t>
    </section>
    <section anchor="Sample-Use-Cases" numbered="true" toc="default">
      <name>Sample Use Cases</name>

      <t>The IPFIX IEs srhSegmentIPv6BasicList (496) or alternatively  srhSegmentIPv6ListSection (497), srhActiveSegmentIPv6 (495),
      srhSegmentsIPv6Left (498), srhIPv6ActiveSegmentType (500), and 
      forwardingStatus (89) <xref target="RFC7270" format="default"/> <xref
      target="IANA-IPFIX" format="default"/> as well as some existing counter
      information <xref target="IANA-IPFIX" format="default"/> provide
      answers to the following questions (amongst others):</t>
      <ul spacing="normal">
        <li>How many packets steered with an SR policy are forwarded or
          dropped using SRv6 in a network?</li>
        <li>If dropped, for which reasons?</li>
        <li>What is the current active segment and its associated control
          plane protocol?</li>
        <li>What is the SRv6 Segment List?</li>
        <li>What is the next SRv6 node and its type?</li>
        <li>How many SRv6 segments are left?</li>
      </ul>
    </section>
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section anchor="sec-new-ies" numbered="true" toc="default">
        <name>IPFIX Information Elements Registry</name>
        <t>IANA has added the following new IEs to the "IPFIX Information Elements" registry
        <xref target="RFC7012" format="default"/> at <xref target="IANA-IPFIX" format="default"/>:</t>

<table anchor="table1" align="center">
  <name>IPFIX Information Elements Registry</name>
  <thead>
    <tr>
      <th>ElementID</th>
      <th>Name</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>492</td>
      <td>srhFlagsIPv6</td>
    </tr>
    <tr>
      <td>493</td>
      <td>srhTagIPv6</td>
    </tr>
    <tr>
      <td>494</td>
      <td>srhSegmentIPv6</td>
    </tr>
    <tr>
      <td>495</td>
      <td>srhActiveSegmentIPv6</td>
    </tr>
    <tr>
      <td>496</td>
      <td>srhSegmentIPv6BasicList</td>
    </tr>
    <tr>
      <td>497</td>
      <td>srhSegmentIPv6ListSection</td>
    </tr>
    <tr>
      <td>498</td>
      <td>srhSegmentsIPv6Left</td>
    </tr>
    <tr>
      <td>499</td>
      <td>srhIPv6Section</td>
    </tr>
    <tr>
      <td>500</td>
      <td>srhIPv6ActiveSegmentType</td>
    </tr>
    <tr>
      <td>501</td>
      <td>srhSegmentIPv6LocatorLength</td>
    </tr>
    <tr>
      <td>502</td>
      <td>srhSegmentIPv6EndpointBehavior</td>
    </tr>
  </tbody>
</table>
        <section anchor="IANAsrhFlagsIPv6" numbered="true" toc="default">
          <name>srhFlagsIPv6</name>
          <dl spacing="compact" newline="false">
	     <dt>ElementID:</dt>
            <dd>492</dd>
            <dt>Name:</dt>
            <dd>srhFlagsIPv6</dd>
            <dt>Abstract Data Type:</dt>
            <dd>unsigned8</dd>
            <dt>Data Type Semantics:</dt>
            <dd>flags</dd>
	       <dt>Description:</dt>
            <dd>The 8-bit Flags field defined in the SRH (<xref target="RFC8754"
            sectionFormat="of" section="2"/>). Assigned flags and their
            meanings are provided in the "Segment Routing Header Flags" IANA
            registry.</dd>
            <dt>Additional Information:</dt>
            <dd>See the assignments in the "Segment Routing Header Flags"
            registry at <eref
            target="https://www.iana.org/assignments/ipv6-parameters"
            brackets="angle"/>.  See also <xref target="RFC8754"
            format="default"/> for the SRH specification.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhTagIPv6" numbered="true" toc="default">
          <name>srhTagIPv6</name>
          <dl spacing="compact" newline="false">
	     <dt>ElementID:</dt>
            <dd>493</dd>
            <dt>Name:</dt>
            <dd>srhTagIPv6</dd>
            <dt>Abstract Data Type:</dt>
            <dd>unsigned16</dd>
            <dt>Data Type Semantics:</dt>
            <dd>identifier</dd>
	    <dt>Description:</dt>
            <dd>The 16-bit Tag field defined in the SRH (<xref
            target="RFC8754" sectionFormat="of" section="2"/>). A tag is used
            to mark a packet as part of a class or group of packets sharing
            the same set of properties.</dd>
            <dt>Additional Information:</dt>
            <dd>See <xref target="RFC8754" sectionFormat="of" section="2"/>
            for more details about the Tag.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhSegmentIPv6" numbered="true" toc="default">
          <name>srhSegmentIPv6</name>
          <dl spacing="compact" newline="false">
	     <dt>ElementID:</dt>
            <dd>494</dd>
            <dt>Name:</dt>
            <dd>srhSegmentIPv6</dd>
            <dt>Abstract Data Type:</dt>
            <dd>ipv6Address</dd>
            <dt>Data Type Semantics:</dt>
            <dd>default</dd>
            <dt>Description:</dt>
            <dd>The 128-bit IPv6 address that represents an SRv6 segment.</dd>
            <dt>Additional Information:</dt>
            <dd>Specified in <xref target="RFC8402" sectionFormat="of"
            section="1"/> and mentioned in "Segment List" in <xref
            target="RFC8754" sectionFormat="of" section="2"/>.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhActiveSegmentIPv6" numbered="true" toc="default">
          <name>srhActiveSegmentIPv6</name>
          <dl spacing="compact" newline="false">
	     <dt>ElementID:</dt>
            <dd>495</dd>
            <dt>Name:</dt>
            <dd>srhActiveSegmentIPv6</dd>
            <dt>Abstract Data Type:</dt>
            <dd>ipv6Address</dd>
            <dt>Data Type Semantics:</dt>
            <dd>default</dd>
	    <dt>Description:</dt>
            <dd>The 128-bit IPv6 address that represents the active SRv6
            segment.</dd>
            <dt>Additional Information:</dt>
            <dd>See <xref target="RFC8402" sectionFormat="of" section="2"/> for the definition
            of "active segment".</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhSegmentIPv6BasicList" numbered="true" toc="default">
          <name>srhSegmentIPv6BasicList</name>
          <dl newline="false" spacing="compact">
	    <dt>ElementID:</dt>
            <dd>496</dd>
            <dt>Name:</dt>
            <dd>srhSegmentIPv6BasicList</dd>
            <dt>Abstract Data Type:</dt>
            <dd>basicList</dd>
            <dt>Data Type Semantics:</dt>
            <dd>list</dd>
	    <dt>Description:</dt>
            <dd>The ordered basicList <xref target="RFC6313"
            format="default"/> of zero or more 128-bit IPv6 addresses in the
            SRH that represents the SRv6 Segment List. As specified in <xref
            target="RFC8754" sectionFormat="of" section="2"/>, 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>
            <dt>Additional Information:</dt>
            <dd>See <xref target="RFC8754" sectionFormat="of" section="2"/> for more details
            about the SRv6 Segment List.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhSegmentIPv6ListSection" numbered="true" toc="default">
          <name>srhSegmentIPv6ListSection</name>
          <dl spacing="compact" newline="false">
	    <dt>ElementID:</dt>
            <dd>497</dd>
            <dt>Name:</dt>
            <dd>srhSegmentIPv6ListSection</dd>
            <dt>Abstract Data Type:</dt>
            <dd>octetArray</dd>
            <dt>Data Type Semantics:</dt>
            <dd>default</dd>
	    <dt>Description:</dt>
            <dd>The SRv6 Segment List as defined in <xref target="RFC8754"
            sectionFormat="of" section="2"/> as a series of octets in
            IPFIX.</dd>
            <dt>Additional Information:</dt>
            <dd>See <xref target="RFC8754" sectionFormat="of" section="2"/>
            for more details about the SRv6 Segment List.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhSegmentsIPv6Left" numbered="true" toc="default">
          <name>srhSegmentsIPv6Left</name>
          <dl spacing="compact" newline="false">
	    <dt>ElementID:</dt>
            <dd>498</dd>
            <dt>Name:</dt>
            <dd>srhSegmentsIPv6Left</dd>
            <dt>Abstract Data Type:</dt>
            <dd>unsigned8</dd>
            <dt>Data Type Semantics:</dt>
            <dd>quantity</dd>
	    <dt>Description:</dt>
            <dd>The 8-bit unsigned integer defining the number of segments
            remaining to reach the end of the Segment List from the SRH.</dd>
            <dt>Additional Information:</dt>
            <dd>Specified by the "Segments Left" field in <xref
            target="RFC8200" sectionFormat="of" section="4.4"/> and mentioned
            in <xref target="RFC8754" sectionFormat="of" section="2"/>.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhIPv6Section" numbered="true" toc="default">
          <name>srhIPv6Section</name>
          <dl spacing="compact" newline="false">
	    <dt>ElementID:</dt>
            <dd>499</dd>
            <dt>Name:</dt>
            <dd>srhIPv6Section</dd>
            <dt>Abstract Data Type:</dt>
            <dd>octetArray</dd>
            <dt>Data Type Semantics:</dt>
            <dd>default</dd>
	    <dt>Description:</dt>
            <dd>The SRH and its TLVs as defined in <xref target="RFC8754"
            sectionFormat="of" section="2"/> as a series of octets in
            IPFIX.</dd>
            <dt>Additional Information:</dt>
            <dd>See <xref target="RFC8754" sectionFormat="of" section="2"/>
            for more details about the structure of an SRH.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhIPv6ActiveSegmentType" numbered="true" toc="default">
          <name>srhIPv6ActiveSegmentType</name>
          <dl spacing="compact" newline="false">
	    <dt>ElementID:</dt>
            <dd>500</dd>
            <dt>Name:</dt>
            <dd>srhIPv6ActiveSegmentType</dd>          
            <dt>Abstract Data Type:</dt>
            <dd>unsigned8</dd>
            <dt>Data Type Semantics:</dt>
            <dd>identifier</dd>
	    <dt>Description:</dt>
            <dd>The designator of the routing protocol or PCEP extension
            where the active SRv6 segment has been learned from. Values for
            this Information Element are listed in the "IPFIX IPv6 SRH Segment
            Type (Value 500)" subregistry.</dd>
            <dt>Additional Information:</dt>
            <dd>See the assigned types in the "IPFIX IPv6 SRH Segment (Value 500)" registry at <eref target="https://www.iana.org/assignments/ipfix" brackets="angle"/>.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhSegmentIPv6LocatorLength" numbered="true" toc="default">
          <name>srhSegmentIPv6LocatorLength</name>
          <dl spacing="compact" newline="false">
	    <dt>ElementID:</dt>
            <dd>501</dd>
            <dt>Name:</dt>
            <dd>srhSegmentIPv6LocatorLength</dd> 
            <dt>Data Type Semantics:</dt>
            <dd>default</dd>
	    <dt>Description:</dt>
            <dd>The length of the SRH segment IPv6 locator specified as the number of
            significant bits. Together with srhSegmentIPv6, it enables the
            calculation of the SRv6 Locator.</dd>
            <dt>Additional Information:</dt>
            <dd>See <xref target="RFC8986" sectionFormat="of" section="3.1"/>
            for more details about the SID format.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
        <section anchor="IANAsrhSegmentIPv6EndpointBehavior" numbered="true" toc="default">
          <name>srhSegmentIPv6EndpointBehavior</name>
          <dl spacing="compact" newline="false">
	    <dt>ElementID:</dt>
            <dd>502</dd>
            <dt>Name:</dt>
            <dd>srhSegmentIPv6EndpointBehavior</dd>
            <dt>Abstract Data Type:</dt>
            <dd>unsigned16</dd>
            <dt>Data Type Semantics:</dt>
            <dd>identifier</dd>
	    <dt>Description:</dt>
            <dd>The 16-bit unsigned integer that represents an SRv6 Endpoint
            behavior as per <xref target="RFC8986" sectionFormat="of"
            section="4"/>. Assigned values and their meanings are provided in
            the "SRv6 Endpoint Behaviors" registry.</dd>
            <dt>Additional Information:</dt>
            <dd>See the assigned behaviors in the "SRv6 Endpoint Behaviors"
            registry at <eref
            target="https://www.iana.org/assignments/segment-routing"
            brackets="angle"/>. See <xref target="RFC8986" sectionFormat="of"
            section="4"/> for more details about the processing of endpoint behaviors.</dd>
            <dt>Reference:</dt>
            <dd>RFC 9487</dd>
          </dl>
        </section>
      </section>
      <section anchor="IPFIXIPv6SRHSegmentTypeSubregistry" numbered="true" toc="default">
        <name>New IPFIX IPv6 SRH Segment Type (Value 500) Subregistry</name>
        <t>IANA has created a new subregistry called
        "IPFIX IPv6 SRH Segment Type (Value 500)" under the "IPFIX Information Elements"
        registry <xref target="RFC7012" format="default"/> at <xref target="IANA-IPFIX" format="default"/>.</t>
        <t>The allocation policy of this new subregistry is Expert Review
        (<xref target="RFC8126" sectionFormat="of" section="4.5"/>).</t>
        <t>The designated experts for this registry should be familiar with
        SRH. The guidelines that are being followed by the designated experts
        for the "IPFIX Information Elements" registry should be followed for this subregistry. In
        particular, criteria that should be applied by the designated experts
        include determining whether the proposed registration duplicates
        existing entries and whether the registration description is clear and
        fits the purpose of this registry. Within the review period, the
        designated experts will either approve or deny the registration
        request, communicating this decision to IANA. Denials should include
        an explanation and, if applicable, suggestions as to how to make the
        request successful.</t>
        <t>Initial values in the registry are defined in <xref target="table2"/>.</t>
	

<table anchor="table2" align="center">
  <name>IPFIX IPv6 SRH Segment Type (Value 500) Subregistry</name>
  <thead>
    <tr>
      <th>Value</th>
      <th>Description</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0</td>
      <td>Unknown</td>
      <td>RFC 9487</td>
    </tr>
    <tr>
      <td>1</td>
      <td>Segment Routing Policy</td>
      <td>RFC 9487, <xref target="RFC9256"/></td>
    </tr>
    <tr>
      <td>2</td>
      <td>Path Computation Element</td>
      <td>RFC 9487, <xref target="I-D.ietf-pce-segment-routing-ipv6"/></td>
    </tr>
    <tr>
      <td>3</td>
      <td>OSPFv3 Segment Routing</td>
      <td>RFC 9487, <xref target="I-D.ietf-lsr-ospfv3-srv6-extensions"/></td>
    </tr>
    <tr>
      <td>4</td>
      <td>IS-IS Segment Routing</td>
      <td>RFC 9487, <xref target="RFC9352"/></td>
    </tr>
    <tr>
      <td>5</td>
      <td>BGP Segment Routing Prefix-SID</td>
      <td>RFC 9487, <xref target="RFC8669"/></td>
    </tr>
  </tbody>
</table>
      </section>
    </section>
    <section anchor="Operational" numbered="true" toc="default">
      <name>Operational Considerations</name>
      <section anchor="OpsSidList" numbered="true" toc="default">
        <name>SRv6 Segment List</name>
        <t>The zero or more 128-bit IPv6 addresses in the SRH <xref
        target="RFC8754" format="default"/> can be exported in two different
        ways, with two different IPFIX IEs:</t>
        <ul spacing="normal">
          <li>srhSegmentIPv6BasicList</li>
          <li>srhSegmentIPv6ListSection</li>
        </ul>
        <t>The srhSegmentIPv6BasicList encodes the SRv6 Segment List with a
        basicList, specified in the IPFIX Structured Data <xref
        target="RFC6313" format="default"/>.	
        This encoding is an advantage for data collection since the different IPv6
        addresses are already structured as a list, without the need of
        post-processing. However, this method requires some extra processing
        on the exporter to realize the basicList data mapping.</t>
        <t>The srhSegmentIPv6ListSection, on the other hand, encodes the list
        of IPv6 addresses as an octetArray. This doesn't impose any data flow
        manipulation on the exporter, facilitating the immediate export.
        However, the data collection <bcp14>MUST</bcp14> be able to decode the
        IPv6 addresses according to the SR specifications. Compared to the
        srhSegmentIPv6BasicList, the srhSegmentIPv6ListSection flow records
        length is slightly reduced.</t>
        <t>It is not expected that an exporter would support both
        srhSegmentIPv6BasicList and srhSegmentIPv6ListSection at the same
        time.</t>
      </section>
      <section anchor="OpsSidListDecompose" numbered="true" toc="default">
        <name>Compressed SRv6 Segment List Decomposition</name>
        <t>The SRv6 Segment List in the IPFIX IEs srhSegmentIPv6BasicList,
        srhSegmentIPv6ListSection, and destinationIPv6Address could contain
        compressed-SID containers as described in <xref
        target="I-D.ietf-spring-srv6-srh-compression" format="default"/>. The
        SR Endpoint Flavors, as described in Section 4 of <xref
        target="I-D.ietf-spring-srv6-srh-compression" format="default"/>,
        define new flavors for SID Endpoint behaviors and determine wherever
        the Segment List encoding is compressed, along with the flavor. The
        SID Locator, as described in <xref target="RFC8986" sectionFormat="of"
        section="3.1"/>, determines the common most significant bits. By using
        described information from srhSegmentIPv6EndpointBehavior and
        srhSegmentIPv6LocatorLength, the compressed-SID containers can be
        decoded at the data collection.</t>
      </section>
    </section>

    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>There are no additional security considerations regarding allocation of
      these new IPFIX IEs compared to <xref target="RFC7012" format="default"/>.</t>
      <t>The IEs described in this document export provider plane data metrics
      on how packets are being forwarded within an SRv6 network. Applications
      and operators using the IEs described in this document must evaluate the
      sensitivity of this information in their implementation context and
      apply the data-at-rest storage guidance in <xref target="RFC7011"
      sectionFormat="of" section="11.8"/> as appropriate.</t>
    </section>
  </middle>
  <back>

<displayreference target="I-D.ietf-lsr-ospfv3-srv6-extensions" to="OSPFV3-SRV6-EXT"/>
<displayreference target="I-D.ietf-pce-segment-routing-ipv6" to="PCEP-SRV6-EXT"/>
<displayreference target="I-D.ietf-spring-srv6-srh-compression" to="SRV6-SRH-COM"/>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6313.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7011.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7012.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8200.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8754.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7270.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8402.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8669.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8986.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9256.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9352.xml"/>

<!-- [I-D.ietf-lsr-ospfv3-srv6-extensions] In AUTH48 state as of 11/6/23. Updated to long version because missing editor role.-->
<reference anchor="I-D.ietf-lsr-ospfv3-srv6-extensions">
<front>
<title>OSPFv3 Extensions for SRv6</title>
<author initials="Z." surname="Li" fullname="Zhenbin Li">
<organization>Huawei Technologies</organization>
</author>
<author initials="Z." surname="Hu" fullname="Zhibo Hu">
<organization>Huawei Technologies</organization>
</author>
<author initials="K." surname="Talaulikar" fullname="Ketan Talaulikar" role="editor">
<organization>Cisco Systems</organization>
</author>
<author initials="P." surname="Psenak" fullname="Peter Psenak">
<organization>Cisco Systems</organization>
</author>
<date month="June" day="21" year="2023"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-lsr-ospfv3-srv6-extensions-15"/>
</reference>


<!-- [I-D.ietf-pce-segment-routing-ipv6] IESG state: publication requested as of 11/6/23 -->
<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-pce-segment-routing-ipv6"/>


<!-- [I-D.ietf-spring-srv6-srh-compression] IESG state: I-D Exists as of 11/6/23. Updated to long version because missing editor role-->
<reference anchor="I-D.ietf-spring-srv6-srh-compression">
<front>
<title>Compressed SRv6 Segment List Encoding</title>
<author initials="W." surname="Cheng" fullname="Weiqiang Cheng" role="editor">
<organization>China Mobile</organization>
</author>
<author initials="C." surname="Filsfils" fullname="Clarence Filsfils">
<organization>Cisco Systems, Inc.</organization>
</author>
<author initials="Z." surname="Li" fullname="Zhenbin Li">
<organization>Huawei Technologies</organization>
</author>
<author initials="B." surname="Decraene" fullname="Bruno Decraene">
<organization>Orange</organization>
</author>
<author initials="F." surname="Clad" fullname="Francois Clad" role="editor">
<organization>Cisco Systems, Inc.</organization>
</author>
<date month="October" day="23" year="2023"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-spring-srv6-srh-compression-09"/>
</reference>


        <reference anchor="IANA-IPFIX" target="https://www.iana.org/assignments/ipfix">
          <front>
            <title>IP Flow Information Export (IPFIX) Entities</title>
            <author>
	      <organization>IANA</organization>
	      </author>
            <date/>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="Encoding-Example" numbered="true" toc="default">
      <name>IPFIX Encoding Examples</name>
      <t>This appendix represents three different encodings for the newly
      introduced IEs, for the example values in <xref target="table3"/>. The
      three different encodings use the following IEs, respectively:
      srhSegmentIPv6BasicList, srhSegmentIPv6ListSection, and
      srhIPv6Section.</t>

<table anchor="table3" align="center">
  <name>Three Observed SRH Headers and Their Associated Routing Protocols</name>
  <thead>
    <tr>
      <th>SRH Nr</th>
      <th>SRH Flags</th>
      <th>SRH Tag</th>
      <th>Active Segment Type</th>
      <th>Segment List</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>0</td>
      <td>123</td>
      <td>IS-IS [4]</td>
      <td>2001:db8::1, 2001:db8::2, 2001:db8::3</td>
    </tr>
    <tr>
      <td>2</td>
      <td>0</td>
      <td>456</td>
      <td>IS-IS [4]</td>
      <td>2001:db8::4, 2001:db8::5</td>
    </tr>
    <tr>
      <td>3</td>
      <td>0</td>
      <td>789</td>
      <td>IS-IS [4]</td>
      <td>2001:db8::6</td>
    </tr>
  </tbody>
</table>

<section anchor="Three-Observed-SRH-Headers-and-their-routing-protocol" numbered="true" toc="default">
        <name>Three Observed SRH Headers and Their Routing Protocols</name>
        <section anchor="Template-Record-and-Data-Set-with-BasicList" numbered="true" toc="default">
          <name>Template Record and Data Set with Segment Basic List</name>
          <t>With encoding in <xref target="fig1"/>, the examples in <xref
          target="table3"/> are represented with the following IEs, where
          "=&gt;" is used to indicate which IE is mapped to given
          information:</t>	  
          <ul spacing="normal">
            <li>SRH Flags =&gt; srhFlagsIPv6 (492)</li>
            <li>SRH Tag =&gt; srhTagIPv6 (493)</li>
            <li>Active Segment Type =&gt; srhIPv6ActiveSegmentType (500)</li>
            <li>Segment List =&gt; srhSegmentIPv6BasicList (496)</li>
          </ul>
<figure anchor="fig1" align="center">
  <name>Template Record with Basic List Encoding Format</name>

          <artwork name="" type="" align="center" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          SET ID = 2           |       Length = 24             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Template ID = 256        |      Field Count = 4          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|     srhFlagsIPv6 = 492      |      Field Length = 1         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|      srhTagIPv6 = 493       |      Field Length = 2         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|srhIPv6ActiveSegmentType= 500|      Field Length = 1         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|srhSegmentIPv6BasicList = 496|      Field Length = 0xFFFF    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
          <t>In this example, the Template ID is 256, which will be used in
          the Data Record. The field length for srhSegmentIPv6BasicList is
          0xFFFF, which means the length of this IE is variable, and the
          actual length of this IE is indicated by the List Length field in
          the basicList format as per <xref target="RFC6313" format="default"/>.</t>
          <t>The data set is represented as follows:</t>

<figure anchor="fig2" align="center">
  <name>Data Set Encoding Format for Basic List</name>
          <artwork name="" type="" align="center" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         SET ID = 256          |           Length = 136        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| srhFlagsIPv6  |        srhTagIPv6 = 123        |srhIPv6Active |
| = 0           |                                |SegmentType= 4|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      255      |        List Length = 53       |semantic=      |
|               |                               |ordered        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     srhSegmentIPv6 = 494      |        Field Length = 16      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Segment List[0] = 2001:db8::1                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Segment List[1] = 2001:db8::2                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Segment List[2] = 2001:db8::3                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| srhFlagsIPv6  |        srhTagIPv6 = 456       | srhIPv6Active |
| = 0           |                               | SegmentType= 4|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      255      |        List Length = 37       |semantic=      |
|               |                               |ordered        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     srhSegmentIPv6 = 494      |        Field Length = 16      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Segment List[0] = 2001:db8::4                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Segment List[1] = 2001:db8::5  (16 bytes)         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| srhFlagsIPv6  |        srhTagIPv6 = 789       | srhIPv6Active |
| = 0           |                               | SegmentType= 4|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      255      |        List Length = 21       |semantic=      |
|               |                               |ordered        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     srhSegmentIPv6 = 494      |        Field Length = 16      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Segment List[0] = 2001:db8::6  ...                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>
        </section>
        <section anchor="Template-Record-and-Data-Set-with-Segment-List-Section" numbered="true" toc="default">
          <name>Template Record and Data Set with Segment List Section</name>
          <t>With encoding in <xref target="fig3"/>, the examples in <xref
          target="table3"/> are represented with the following IEs, where
          "=&gt;" is used to indicate which IE is mapped to given
          information:</t>
          <ul spacing="normal">
            <li>SRH Flags =&gt; srhFlagsIPv6 (492)</li>
            <li>SRH Tag =&gt; srhTagIPv6 (493)</li>
            <li>Active Segment Type =&gt; srhIPv6ActiveSegmentType (500)</li>
            <li>Segment List =&gt; srhSegmentIPv6ListSection (497)</li>
          </ul>

<figure align="center" anchor="fig3">
  <name>Template Record with Segment List Section Encoding Format</name>
          <artwork name="" type="" align="center" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          SET ID = 2           |       Length = 24             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Template ID = 257        |      Field Count = 4          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|     srhFlagsIPv6 = 492      |      Field Length = 1         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|      srhTagIPv6 = 493       |      Field Length = 2         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|srhIPv6ActiveSegmentType= 500|      Field Length = 1         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|srhSegmentIPv6ListSection=497|      Field Length = 0xFFFF    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>

          <t>In this example, the Template ID is 257, which will be used in
          the Data Record. The field length for srhSegmentIPv6ListSection in
          the Template Record is 0xFFFF, which means that the length of this
          IE is variable: its actual length is encoded in the Data Set. Note
          that, with an actual length inferior to 255 in the Data Record
          example, the length field is encoded in 8 bits (<xref
          target="RFC7011" sectionFormat="of" section="7"/>).</t>
          <t>The data can be represented as follows:</t>

<figure align="center" anchor="fig4">
  <name>Data Set Encoding Format for Segment List Section</name>
          <artwork name="" type="" align="center" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         SET ID = 257          |           Length = 116        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| srhFlagsIPv6  |        srhTagIPv6 = 123       | srhIPv6Active |
| = 0           |                               | SegmentType= 4|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length = 48   |   2001:db8::1                                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      ...      |   2001:db8::2                                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      ...      |   2001:db8::3                                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      ...      | srhFlagsIPv6  |        srhTagIPv6 = 456       |
|               | = 0           |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| srhIPv6Active | Length = 32   |   2001:db8::4                 |
| SegmentType= 4|               |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      ...                      |   2001:db8::5                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      ...                      |srhFlagsIPv6=0 | srhTagIPv6 =  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   789         | srhIPv6ActiveSegmentType = 4  | Length = 16   |
|               |                               |               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        2001:db8::6 ...                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>
        </section>
        <section anchor="Template-Record-and-Data-Set-with-SRH-Section" numbered="true" toc="default">
          <name>Template Record and Data Set with SRH Section</name>
          <t>With encoding in <xref target="fig5"/>, the examples in <xref
          target="table3"/> are represented with the following IEs, where
          "=&gt;" is used to indicate which IE is mapped to given
          information:</t>
          <ul spacing="normal">
            <li>SRH Flags + SRH Tag + Segment List =&gt; srhIPv6Section
              (499)</li>
            <li>Active Segment Type =&gt; srhIPv6ActiveSegmentType (500)</li>
          </ul>

<figure anchor="fig5" align="center">
  <name>Template Record with SRH Section Encoding Format</name>
  <artwork name="" type="" align="center" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          SET ID = 2           |       Length = 16             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Template ID = 258        |      Field Count = 2          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|srhIPv6ActiveSegmentType= 500|      Field Length = 1         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|    srhIPv6Section = 499     |      Field Length = 0xFFFF    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
          <t>In this example, the Template ID is 258, which will be used in
          the Data Record. The field length for srhIPv6Section in the Template
          Record is 0xFFFF, which means that the length of this IE is
          variable: its actual length is encoded in the Data Set. Note that,
          with an actual length inferior to 255 in the Data Record example,
          the length field is encoded in 8 bits (<xref target="RFC7011"
          sectionFormat="of" section="7"/>).</t>
          <t>The data can be represented as follows:</t>

<figure anchor="fig6" align="center">
  <name>Data Set Encoding Format for SRH Section</name>
          <artwork name="" type="" align="center" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         SET ID = 258          |           Length = (*)        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        srhIPv6ActiveSegmentType = 4           |  Length = (*) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Last Entry   |     Flags     |              Tag              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           2001:db8::1                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           2001:db8::2                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           2001:db8::3                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~          Optional Type Length Value objects (variable)        ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        srhIPv6ActiveSegmentType = 4           |    0xFFFF     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Last Entry   |     Flags     |              Tag              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           2001:db8::4                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           2001:db8::5                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~          Optional Type Length Value objects (variable)        ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        srhIPv6ActiveSegmentType = 4           |    0xFFFF     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Last Entry   |     Flags     |              Tag              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           2001:db8::6                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~          Optional Type Length Value objects (variable)        ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
	</figure>
        
	    <t>(*) The Length must be calculated to include the optional Type
	    Length Value objects.</t>
        </section>
      </section>
      <section anchor="Options-Template-Record-and-Data-Set-for-SRv6-Segment-Endpoint-Behavior" numbered="true" toc="default">
        <name>Options Template Record and Data Set for SRv6 Segment Endpoint
        Behavior and Locator Length</name>
        <t>This appendix provides an SRv6 Endpoint Behavior Options Template
        example, for the values presented in <xref target="table4"/>. In the
        Options Template case, the srhActiveSegmentIPv6 IE is
        a Scope field.</t>

<table anchor="table4" align="center">
  <name>Three Observed SRv6 Segment Endpoint Behaviors</name>
  <thead>
    <tr>
      <th>Entry Nr</th>
      <th>SRH Endpoint IPv6</th>
      <th>SRH Endpoint Behavior</th>
      <th>SRH Segment Locator Length</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>2001:db8::1</td>
      <td>End [1]</td>
      <td>48</td>
    </tr>
    <tr>
      <td>2</td>
      <td>2001:db8::4</td>
      <td>End with NEXT-CSID [43]</td>
      <td>48</td>
    </tr>
    <tr>
      <td>3</td>
      <td>2001:db8::6</td>
      <td>End.DX6 [16]</td>
      <td>48</td>
    </tr>
  </tbody>
</table>

<figure anchor="fig7" align="center">
  <name>Segment Endpoint Behavior Options Template Record</name>
        <artwork name="" type="" align="center" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Set ID = 3            |          Length = 24          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Template ID 259         |        Field Count = 3        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Scope Field Count = 1     |0| srhActiveSegmentIPv6 = 495  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Scope 1 Field Length = 4    |0|srhSegmentIPv6End.Behav = 502|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Field Length = 1        |0|srhSegmentIPv6Lo.Length = 501|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Field Length = 4        |           Padding             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
        <t>In this example, the Template ID is 259, which will be used in the
        Data Record.</t>
        <t>The data set is represented as follows:</t>

<figure anchor="fig8" align="center">
  <name>Data Set Encoding Format for Segment Endpoint Behaviors</name>
        <artwork name="" type="" align="center" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         SET ID = 259          |           Length = 28         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               srhActiveSegmentIPv6 = 2001:db8::1              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|srhSegmentIPv6EndpointBehavior |srhSegmentIPv6LocatorLength= 48|
|= End [1]                      |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               srhActiveSegmentIPv6 = 2001:db8::4              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|srhSegmentIPv6EndpointBehavior |srhSegmentIPv6LocatorLength= 48|
|= End with NEXT-CSID [43]      |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               srhActiveSegmentIPv6 = 2001:db8::6              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|srhSegmentIPv6EndpointBehavior |srhSegmentIPv6LocatorLength= 48|      
|= End.DX6 [16]                 |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>

	  <t>(*) The Length must be calculated to include the optional Type
	  Length Value objects.</t>
      </section>
    </section>

    <section anchor="Acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors would like to thank <contact fullname="Yao Liu"/>,
      <contact fullname="Eduard Vasilenko"/>, <contact fullname="Bruno
      Decraene"/>, <contact fullname="Mohamed Boucadair"/>, <contact
      fullname="Kamran Raza"/>, <contact fullname="Qin Wu"/>, <contact
      fullname="Jim Guichard"/>, <contact fullname="Tero Kivinen"/>, <contact
      fullname="Paul Aitken"/>, <contact fullname="Roman Danyliw"/>, <contact
      fullname="John Scudder"/>, <contact fullname="Éric Vyncke"/>, <contact
      fullname="Erik Kline"/>, <contact fullname="Lars Eggert"/>, and <contact
      fullname="Andrew Alston"/> for their reviews and valuable comments. And
      thank you to <contact fullname="Paolo Lucente"/> and <contact fullname="Alex Huang
      Feng"/> for the implementation and validation.</t>
    </section>
  </back>
</rfc>
