<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="2"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-tgraf-opsawg-ipfix-srv6-srh-05"
     ipr="trust200902">
  <front>
    <title
    abbrev="IPFIX Segment Routing IPv6 Information">Export&nbsp;of&nbsp;Segment&nbsp;Routing&nbsp;IPv6&nbsp;Information&nbsp;in
    IP&nbsp;Flow&nbsp;Information&nbsp;Export&nbsp;(IPFIX)</title>

    <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/>

        <facsimile/>

        <email>pierre.francois@insa-lyon.fr</email>

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

    <date day="24" month="July" year="2022"/>

    <abstract>
      <t>This document introduces new IP Flow Information Export (IPFIX)
      information elements to identify the SRv6 Segment Routing Header
      dimensions, the SRv6 Control Plane Protocol and the SRv6 Endpoint
      Behavior that traffic is being forwarded with.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="Introduction" title="Introduction">
      <t>A new type of Routing Extension Header called Segment Routing Header
      (SRH) is defined by <xref target="RFC8754"/> which is used for applying
      Segment Routing (SR) on the IPv6 data plane.</t>

      <t>Three routing protocol extensions, <xref
      target="I-D.li-lsr-ospfv3-srv6-extensions">OSPFv3 Extensions</xref>,
      <xref target="I-D.ietf-lsr-isis-srv6-extensions">IS-IS
      Extensions</xref>, <xref target="I-D.ietf-bess-srv6-services">BGP Prefix
      Segment Identifiers (Prefix-SIDs)</xref> and one <xref
      target="I-D.ietf-pce-segment-routing-ipv6">Path Computation Element
      Communication Protocol (PCEP) Extension</xref> have been defined to
      propagate Segment Identifiers (SIDs) for the IPv6 data plane.</t>

      <t>SRv6 segment endpoint behaviors have been defined in <xref
      target="RFC8986"/> and describe how packets should be processed.</t>

      <t>This document defines eleven new IPFIX Information Elements (IEs) and
      three new subregistries within the "IPFIX Information Elements" registry
      <xref target="RFC7012"/>, respectively for the new SRH dimensions, SRv6
      endpoint behaviors and routing protocol and PCEP extensions.</t>
    </section>

    <section anchor="IE" title="IPFIX Information Elements">
      <t>This section defines and describes the new IPFIX IEs.<list
          style="hanging">
          <t hangText="srhFlagsIPv6"><vspace blankLines="0"/> 8-bit flags
          defined in the SRH.</t>

          <t hangText="srhTagIPv6"><vspace blankLines="0"/> 16-bit tag field
          defined in the SRH that marks a packet as part of a class or group
          of packets sharing the same set of properties.</t>

          <t hangText="srhSegmentIPv6"><vspace blankLines="0"/> 128-bit IPv6
          address that represents an SRv6 segment.</t>

          <t hangText="srhActiveSegmentIPv6"><vspace blankLines="0"/> 128-bit
          IPv6 address that represents the active SRv6 segment.</t>

          <t hangText="srhSegmentIPv6BasicList"><vspace blankLines="0"/>
          Ordered basicList <xref target="RFC6313"/> of zero or more 128-bit
          IPv6 addresses in the SRH that represents the SRv6 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.</t>

          <t hangText="srhSegmentIPv6ListSection"><vspace blankLines="0"/>
          Exposes the SRH Segment List as defined in section 2 of <xref
          target="RFC8754"/> as series of n octets.</t>

          <t hangText="srhSegmentIPv6sLeft"><vspace blankLines="0"/> 8-bit
          unsigned integer defining the number of route segments remaining to
          reach the end of the segment list.</t>

          <t hangText="srhSectionIPv6"><vspace blankLines="0"/> Exposes the
          SRH and its TLV's as defined in section 2 of <xref
          target="RFC8754"/> as series of n octets.</t>

          <t hangText="srhActiveSegmentIPv6Type"><vspace blankLines="0"/> Name
          of the routing protocol or PCEP extension from where the active SRv6
          segment has been learned from.</t>

          <t hangText="srhSegmentLocatorLength"><vspace blankLines="0"/> The
          number of significant bits. Together with srhSegmentIPv6 it enables
          the calculation of the SRv6 Locator.</t>

          <t hangText="srhSegmentEndpointBehavior"><vspace blankLines="0"/>
          16-bit unsigned integer that represents a SRv6 Endpoint
          behavior.</t>
        </list></t>

      <t>Note that the srhSegmentIPv6, srhSegmentLocatorLength, and
      srhSegmentEndpointBehavior IPFIX IEs are generic fields, to be used in
      the context of IPFIX Options Templates or IPFIX Structured Data <xref
      target="RFC6313"/>.</t>
    </section>

    <section anchor="Use-Cases" title="Use Cases">
      <t>By using srhSegmentIPv6BasicList(TBD5) or the
      srhSegmentIPv6ListSection (TBD6), srhActiveSegmentIPv6 (TBD4),
      srhSegmentIPv6sLeft (TBD7), srhActiveSegmentIPv6Type(TBD9), the
      forwardingStatus(89), and some counters information, it is possible to
      answer the following questions (amongst others):</t>

      <t><list style="symbols">
          <t>how many packets are forwarded or dropped</t>

          <t>if dropped, for which reasons,</t>

          <t>identify the active segment and its control plane protocol,</t>

          <t>the SRv6 segment list,</t>

          <t>the next SRv6 node and its type,</t>

          <t>and how many SRv6 segments are left.</t>
        </list></t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests IANA to create new IEs (see table 1) and three
      new subregistries called "IPFIX IPv6 SRH Flags" (table 2), "IPFIX IPv6
      SRH Segment type" (table 3) and "IPFIX SRV6 Endpoint Behavior" (table 4)
      under the "IPFIX Information Elements" registry <xref target="RFC7012"/>
      available at <xref target="IANA-IPFIX"/> and assign the following
      initial code points.</t>

      <t><figure>
          <artwork><![CDATA[

     +-------+----------------------------+
     |Element|           Name             |
     |   ID  |                            |
     +-------+----------------------------+
     | TBD1  | srhFlagsIPv6               |
     |       |                            |
     +-------+----------------------------+
     | TBD2  | srhTagIPv6                 |
     |       |                            |
     +-------+----------------------------+
     | TBD3  | srhSegmentIPv6             |
     |       |                            |
     +-------+----------------------------+
     | TBD4  | srhActiveSegmentIPv6       |
     |       |                            |
     +-------+----------------------------+
     | TBD5  | srhSegmentIPv6BasicList    |
     |       |                            |
     +-------+----------------------------+
     | TBD6  | srhSegmentIPv6ListSection  |
     |       |                            |
     +-------+----------------------------+
     | TBD7  | srhSegmentIPv6sLeft        |
     |       |                            |
     +-------+----------------------------+
     | TBD8  | srhSectionIPv6             |
     |       |                            |
     +-------+----------------------------+
     | TBD9  | srhActiveSegmentIPv6Type   |
     |       |                            |
     +-------+----------------------------+
     | TBD10 | srhSegmentLocatorLength    |
     |       |                            |
     +-------+----------------------------+
     | TBD11 | srhSegmentEndpointBehavior |
     |       |                            |
     +-------+----------------------------+

  Table 1: Creates IEs in the "IPFIX Information Elements" registry
       ]]></artwork>
        </figure></t>

      <t>Note to the RFC-Editor:</t>

      <t><list style="symbols">
          <t>Please replace TBD1 - TBD16 with the values allocated by IANA</t>

          <t>Please replace the [RFC-to-be] with the RFC number assigned to
          this document</t>
        </list></t>

      <section anchor="IANAsrhFlagsIPv6" title="srhFlagsIPv6">
        <t>Name: srhFlagsIPv6 <vspace blankLines="0"/> ElementID: TBD1 <vspace
        blankLines="0"/> Description: This Information Element identifies the
        8-bit flags defined in the SRH. Values for this Information Element
        are listed in the "IPFIX IPv6 SRH Flags" registry, see <xref
        target="IANA-IPFIX"/>. srhFlagsIPv6 values must not be directly added
        to this "IPFIX IPv6 SRH Flags" registry. They must instead be added to
        the "Segment Routing Header Flags" registry. Both the "IPFIX IPv6 SRH
        Flags" and the "Segment Routing Header Flags" registries must be kept
        in synch. Initial values in the registry are defined by the table
        below. <figure>
            <artwork><![CDATA[

+--------+-------------------+--------------------------------------+
| Value  |    Description    |              Reference               |
+--------+-------------------+--------------------------------------+
| 0-1    | Unassigned        |                                      |
+--------+-------------------+--------------------------------------+
| 2      | O-flag            |  [RFC-ietf-6man-spring-srv6-oam-13]  |
+--------+-------------------+--------------------------------------+
| 3-7    | Unassigned        |                                      |
+--------+-------------------+--------------------------------------+

      Table 2: "IPFIX IPv6 SRH Flags" registry

       ]]></artwork>
          </figure> <vspace blankLines="0"/> Abstract Data Type: unsigned8
        <vspace blankLines="0"/> Data Type Semantics: flags <vspace
        blankLines="0"/> Reference: [RFC-to-be], RFC8754</t>
      </section>

      <section anchor="IANAsrhTagIPv6" title="srhTagIPv6">
        <t>Name: srhTagIPv6 <vspace blankLines="0"/> ElementID: TBD2 <vspace
        blankLines="0"/> Description: This Information Element identifies the
        16-bit tag field defined in the SRH that marks a packet as part of a
        class or group of packets sharing the same set of properties. <vspace
        blankLines="0"/> Abstract Data Type: unsigned16 <vspace
        blankLines="0"/> Data Type Semantics: identifier <vspace
        blankLines="0"/> Reference: [RFC-to-be], RFC8754</t>
      </section>

      <section anchor="IANAsrhSegmentIPv6" title="srhSegmentIPv6">
        <t>Name: srhSegmentIPv6 <vspace blankLines="0"/> ElementID: TBD3
        <vspace blankLines="0"/> Description: This Information Element
        identifies the 128-bit IPv6 address that represents an SRv6 segment.
        <vspace blankLines="0"/> Abstract Data Type: ipv6address <vspace
        blankLines="0"/> Data Type Semantics: default <vspace blankLines="0"/>
        Reference: [RFC-to-be], RFC8754</t>
      </section>

      <section anchor="IANAsrhActiveSegmentIPv6" title="srhActiveSegmentIPv6">
        <t>Name: srhActiveSegmentIPv6 <vspace blankLines="0"/> ElementID: TBD4
        <vspace blankLines="0"/> Description: This Information Element
        identifies the 128-bit IPv6 address that represents the active SRv6
        segment. <vspace blankLines="0"/> Abstract Data Type: ipv6address
        <vspace blankLines="0"/> Data Type Semantics: default <vspace
        blankLines="0"/> Reference: [RFC-to-be], RFC8754</t>
      </section>

      <section anchor="IANAsrhSegmentIPv6BasicList"
               title="srhSegmentIPv6BasicList">
        <t>Name: srhSegmentIPv6BasicList <vspace blankLines="0"/> ElementID:
        TBD5 <vspace blankLines="0"/> Description: This Information Element
        identifies the Ordered basicList [RFC6313] of zero or more 128-bit
        IPv6 addresses in the SRH that represents the SRv6 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.
        <vspace blankLines="0"/> Abstract Data Type: basicList <vspace
        blankLines="0"/> Data Type Semantics: list <vspace blankLines="0"/>
        Reference: [RFC-to-be], RFC8754</t>
      </section>

      <section anchor="IANAsrhSegmentIPv6ListSection"
               title="srhSegmentIPv6ListSection">
        <t>Name: srhSegmentIPv6ListSection <vspace blankLines="0"/> ElementID:
        TBD6 <vspace blankLines="0"/> Description: Exposes the SRH Segment
        List as defined in section 2 of <xref target="RFC8754"/> as series of
        n octets. <vspace blankLines="0"/> Abstract Data Type: octetArray
        <vspace blankLines="0"/> Data Type Semantics: default <vspace
        blankLines="0"/> Reference: [RFC-to-be], RFC8754</t>
      </section>

      <section anchor="IANAsrhSegmentIPv6sLeft" title="srhSegmentIPv6sLeft">
        <t>Name: srhSegmentIPv6sLeft <vspace blankLines="0"/> ElementID: TBD7
        <vspace blankLines="0"/> Description: This Information Element
        identifies the 8-bit unsigned integer defining the number of route
        segments remaining to reach the end of the segment list. <vspace
        blankLines="0"/> Abstract Data Type: unsigned8 <vspace
        blankLines="0"/> Data Type Semantics: quantity <vspace
        blankLines="0"/> Reference: [RFC-to-be], RFC8754</t>
      </section>

      <section anchor="IANAsrhSectionIPv6" title="srhSectionIPv6">
        <t>Name: srhSectionIPv6 <vspace blankLines="0"/> ElementID: TBD8
        <vspace blankLines="0"/> Description: This Information Element exposes
        the SRH and its TLV's as defined in section 2 of <xref
        target="RFC8754"/> as series of n octets. <vspace blankLines="0"/>
        Abstract Data Type: octetArray <vspace blankLines="0"/> Data Type
        Semantics: default <vspace blankLines="0"/> Reference: [RFC-to-be],
        RFC8754</t>
      </section>

      <section anchor="IANAsrhActiveSegmentIPv6Type"
               title="srhActiveSegmentIPv6Type">
        <t>Name: srhActiveSegmentIPv6Type <vspace blankLines="0"/> ElementID:
        TBD9 <vspace blankLines="0"/> Description: This Information Element
        identifies the name of the routing protocol or PCEP extension from
        where the active SRv6 segment has been learned from. Values for this
        Information Element are listed in the "IPFIX IPv6 SRH Segment type"
        registry, see <xref target="IANA-IPFIX"/>. Initial values in the
        registry are defined by the table below. New assignments of values
        will be administered by IANA and are subject to Expert Review <xref
        target="RFC8126"/>. Experts need to check definitions of new values
        for completeness, accuracy, and redundancy. <figure>
            <artwork><![CDATA[

+-------+--------------------+--------------------------------------+
| Value |     Description    |              Reference               |
+-------+--------------------+--------------------------------------+
| TBD12 | Unknown            | [RFC-to-be]                          |
|       |                    |                                      |
+-------+--------------------+--------------------------------------+
| TBD13 | Path Computation   | [RFC-to-be],                         |
|       | Element            | draft-ietf-pce-segment-routing-ipv6  |
+-------+--------------------+--------------------------------------+
| TBD14 | OSPFv3             | [RFC-to-be],                         |
|       | Segment Routing    | draft-li-ospf-ospfv3-srv6-extensions |
+-------+--------------------+--------------------------------------+
| TBD15 | IS-IS              | [RFC-to-be]                          |
|       | Segment Routing    | draft-ietf-lsr-isis-srv6-extensions  |
+-------+--------------------+--------------------------------------+
| TBD16 | BGP Segment        | [RFC-to-be],                         |
|       | Routing Prefix-SID | draft-ietf-bess-srv6-services        |
+-------+--------------------+--------------------------------------+

  Table 3: "IPFIX IPv6 SRH Segment type" subregistry

       ]]></artwork>
          </figure> <vspace blankLines="0"/> Abstract Data Type: unsigned8
        <vspace blankLines="0"/> Data Type Semantics: identifier <vspace
        blankLines="0"/> Reference: [RFC-to-be]</t>
      </section>

      <section anchor="IANAsrhSegmentLocatorLength"
               title="srhSegmentLocatorLength">
        <t>Name: srhSegmentLocatorLength <vspace blankLines="0"/> ElementID:
        TBD10 <vspace blankLines="0"/> Description: This Information Element
        identifies the number of significant bits and together with
        srhSegmentIPv6 enables the calculation of the SRv6 Locator. <vspace
        blankLines="0"/> Abstract Data Type: unsigned8 <vspace
        blankLines="0"/> Data Type Semantics: default <vspace blankLines="0"/>
        Reference: [RFC-to-be], RFC8986 Section 3.1</t>
      </section>

      <section anchor="IANAsrhSegmentEndpointBehavior"
               title="srhSegmentEndpointBehavior">
        <t>Name: srhSegmentEndpointBehavior <vspace blankLines="0"/>
        ElementID: TBD11 <vspace blankLines="0"/> Description: This
        Information Element identifies the 16-bit SRv6 Endpoint behavior.
        Values for this Information Element are listed in the "IPFIX SRV6
        Endpoint Behavior" registry, see <xref target="IANA-IPFIX"/>.
        srhSegmentEndpointBehavior values must not be directly added to this
        "IPFIX SRV6 Endpoint Behavior" registry. They must instead be added to
        the "Segment Routing SRv6 Endpoint Behaviors" registry. Both the
        "IPFIX SRV6 Endpoint Behavior" and the "Segment Routing SRv6 Endpoint
        Behaviors" registries must be kept in synch.<figure>
            <artwork><![CDATA[

+--------+-------+-------------------------------+------------------+
| Value  | Hex   | Endpoint Behavior | Reference | Change Controller|
+--------+-------+-------------------------------+------------------+
|        |       |                   |           |                  |
+--------+-------+-------------------------------+------------------+
|        |       |                   |           |                  |
+--------+-------+-------------------------------+------------------+
|        |       |                   |           |                  |
+--------+-------+-------------------------------+------------------+

      Table 4: "IPFIX SRV6 Endpoint Behavior" registry

       ]]></artwork>
          </figure> <vspace blankLines="0"/> Abstract Data Type: unsigned16
        <vspace blankLines="0"/> Data Type Semantics: identifier <vspace
        blankLines="0"/> Reference: [RFC-to-be], RFC8986 Section 4</t>
      </section>
    </section>

    <section anchor="Operational" title="Operational Considerations">
      <section anchor="OpsSidList" title="SRv6 Segment List">
        <t>The zero or more 128-bit IPv6 addresses in the SRH [RFC8754] can be
        exported in two different ways, with two different IPFIX IEs:</t>

        <t><list style="symbols">
            <t>srhSegmentIPv6BasicList</t>

            <t>srhSegmentIPv6ListSection</t>
          </list></t>

        <t>The srhSegmentIPv6BasicList encodes the SID list of IPv6 addresses
        with a basicList, specified in the IPFIX Structured Data <xref
        target="RFC6313"/>. This encoding offers the advantage to the data
        collection that 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 must be able to decode the IPv6 addresses
        according 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"
               title="Compressed SRv6 Segment List Decomposition">
        <t>The SRv6 segment list in the IPFIX IEs srhSegmentIPv6BasicList and
        srhSegmentIPv6ListSection could contain compressed-SID containers as
        described in <xref target="I-D.ietf-spring-srv6-srh-compression"/>.
        The SID endpoint behaviors described in section 4 of <xref
        target="I-D.ietf-spring-srv6-srh-compression"/> determine wherever the
        segment list is compressed or not. The SID Locator as described in
        section 3.1 <xref target="RFC8986"/>, determines the common most
        significant bits.</t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>There exists no significant extra security considerations regarding
      the allocation of these new IPFIX IEs compared to <xref
      target="RFC7012"/>.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank Yao Liu, Paolo Lucente, Eduard
      Vasilenko, Alex Huang Feng and Bruno Decraene for their review and
      valuable comments.</t>
    </section>
  </middle>

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

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

      <?rfc include='reference.RFC.8126'?>
    </references>

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

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

      <?rfc include='reference.I-D.li-lsr-ospfv3-srv6-extensions'?>

      <?rfc include='reference.I-D.ietf-lsr-isis-srv6-extensions'?>

      <?rfc include='reference.I-D.ietf-bess-srv6-services'?>

      <?rfc include='reference.I-D.ietf-pce-segment-routing-ipv6'?>

      <?rfc include='reference.I-D.ietf-spring-srv6-srh-compression'?>

      <reference anchor="IANA-IPFIX"
                 target="https://www.iana.org/assignments/ipfix/ipfix.xhtml">
        <front>
          <title>IANA, "IP Flow Information Export (IPFIX) Entities"</title>

          <author/>

          <date/>
        </front>
      </reference>
    </references>

    <section anchor="Encoding-Example" title="IPFIX Encoding Examples">
      <t>This appendix represents three different encodings for the newly
      introduced IEs, for the example values in the table 5. The three
      different encodings uses the following IEs, respectively:
      srhSegmentIPv6BasicList, srhSegmentIPv6ListSection, and
      srhSectionIPv6.</t>

      <t><figure>
          <artwork><![CDATA[

   +-----+------+-----+------------------+--------------------------|
   | SRH | SRH  | SRH | Active Segment   |       Segment List       |
   | Nr  | Flags| Tag | Type             |                          |
   +-----+------+-----+------------------+--------------------------+
   | 1   | 0    | 123 |   IS-IS [TBD15]  | 2001:db8::1, 2001:db8::2,|
   |     |      |     |                  | 2001:db8::3              |
   +-----+------+-----+------------------+--------------------------+
   | 2   | 0    | 456 |   IS-IS [TBD15]  | 2001:db8::4, 2001:db8::5 |
   +-----+------+-----+------------------+--------------------------+
   | 3   | 0    | 789 |   IS-IS [TBD15]  | 2001:db8::6              |
   +-----+------+-----+------------------+--------------------------+

     Table 5: three observed SRH headers and their routing protocol
       ]]></artwork>
        </figure></t>

      <section anchor="Template-Record-and-Data-Set-with-BasicList"
               title="Template Record and Data Set with Segment Basic List">
        <t>With this encoding, the examples in Table 5 are represented with
        the following IEs:</t>

        <t><list style="symbols">
            <t>SR Flags =&gt; srhFlagsIPv6</t>

            <t>SR Tag =&gt; srhTagIPv6</t>

            <t>Active Segment Type =&gt; srhActiveSegmentIPv6Type</t>

            <t>Segment List =&gt; srhSegmentIPv6BasicList</t>
          </list></t>

        <t><figure>
            <artwork><![CDATA[

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          SET ID = 2           |       Length = 24             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Template ID = 256        |      Field Count = 4          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|     srhFlagsIPv6 = TBD1     |      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|      srhTagIPv6 = TBD2      |      Field Length = 2         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|srhActiveSegmentIPv... = TBD9|      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|srhSegmentIPv6BasicList= TBD5|      Field Length = 0xFFFF    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

        Table 6: Template Record with Basic List Encoding Format

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

        <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"/>.</t>

        <t>The data set is represented as follows:</t>

        <figure>
          <artwork><![CDATA[

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         SET ID = 256          |           Length = 136        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | srhFlagsIPv6  |        srhTagIPv6 = 123       | srhActiveSegme|
   | = 0           |                               | ntIPv...=TBD15|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      255      |        List Length = 53       |semantic=      |
   |               |                               |ordered        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     srhSegmentIPv6 = TBD3     |        Field Length = 16      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Segment List[0] = 2001:db8::1                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Segment List[1] = 2001:db8::2                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Segment List[2] = 2001:db8::3                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | srhFlagsIPv6  |        srhTagIPv6 = 456       | srhActiveSegme|
   | = 0           |                               | ntIPv...=TBD15|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      255      |        List Length = 37       |semantic=      |
   |               |                               |ordered        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     srhSegmentIPv6 = TBD3     |        Field Length = 16      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Segment List[0] = 2001:db8::4                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Segment List[1] = 2001:db8::5  (16 bytes)         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | srhFlagsIPv6  |        srhTagIPv6 = 789       | srhActiveSegme|
   | = 0           |                               | ntIPv...=TBD15|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      255      |        List Length = 21       |semantic=      |
   |               |                               |ordered        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     srhSegmentIPv6 = TBD3     |        Field Length = 16      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Segment List[0] = 2001:db8::6  ...                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           Table 7: Data Set Encoding Format for Basic List

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

      <section anchor="Template-Record-and-Data-Set-with-Segment-List-Section"
               title="Template Record and Data Set with Segment List Section">
        <t>With this encoding, the examples in Table 5 are represented with
        the following IEs:</t>

        <t><list style="symbols">
            <t>SR Flags =&gt; srhFlagsIPv6</t>

            <t>SR Tag =&gt; srhTagIPv6</t>

            <t>Active Segment Type =&gt; srhActiveSegmentIPv6Type</t>

            <t>Segment List =&gt; srhSegmentIPv6List</t>
          </list></t>

        <t><figure>
            <artwork><![CDATA[

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          SET ID = 2           |       Length = 24             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Template ID = 257        |      Field Count = 4          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|     srhFlagsIPv6 = TBD1     |      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|      srhTagIPv6 = TBD2      |      Field Length = 2         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|srhActiveSegmentIPv... = TBD9|      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|     srhSegmentIPv6List      |      Field Length = 0xFFFF    |
   | |     Section=TBD6            |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Table 8: Template Record with Segment List Section Encoding Format

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

        <t>In this example, the Template ID is 257, which will be used in the
        Data Record. The field length for srhSegmentIPv6ListSection is 0xFFFF,
        which means the length of this IE is variable.</t>

        <t>The data set is represented as follows:</t>

        <figure>
          <artwork><![CDATA[

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         SET ID = 257          |           Length = 116        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | srhFlagsIPv6  |        srhTagIPv6 = 123       | srhActiveSegme|
   | = 0           |                               | ntIPv...=TBD15|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    0xFFFF     |   2001:db8::1                                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      ...      |   2001:db8::2                                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      ...      |   2001:db8::3                                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      ...      | srhFlagsIPv6  |        srhTagIPv6 = 456       |
   |               | = 0           |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | srhActiveSegme|    0xFFFF     |   2001:db8::4                 |
   | ntIPv...=TBD15|               |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      ...                      |   2001:db8::5                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      ...                      |srhFlagsIPv6=0 | srhTagIPv6... |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | = 789         |         srhActiveSegment      |     0xFFFF    |
   |               |         IPv6Type=TBD15        |               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        2001:db8::6 ...                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


       Table 9: Data Set Encoding Format for Segment List Section

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

      <section anchor="Template-Record-and-Data-Set-with-SRH-Section"
               title="Template Record and Data Set with SRH Section">
        <t>With this encoding, the examples in Table 5 are represented with
        the following IEs:</t>

        <t><list style="symbols">
            <t>SR Flags + SR Tag + Segment List =&gt; srhSectionIPv6</t>

            <t>Active Segment Type =&gt; srhActiveSegmentIPv6Type</t>
          </list></t>

        <t><figure>
            <artwork><![CDATA[

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          SET ID = 2           |       Length = 16             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Template ID = 258        |      Field Count = 2          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0| srhActiveSegmentIP... = TBD9|      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|    srhSectionIPv6 = TBD8    |      Field Length = 0xFFFF    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

       Table 10: Template Record with SRH Section Encoding Format

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

        <t>In this example, the Template ID is 258, which will be used in the
        Data Record. The field length for srhSectionIPv6 is 0xFFFF, which
        means the length of this IE is variable.</t>

        <t>The data set is represented as follows:</t>

        <figure>
          <artwork><![CDATA[

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         SET ID = 258          |           Length = (*)        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        srhActiveSegmentIPv6Type = TBD15       |    0xFFFF     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Last Entry   |     Flags     |              Tag              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Segment List[0] 2001:db8::1                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Segment List[1] 2001:db8::2                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Segment List[2] 2001:db8::3                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~          Optional Type Length Value objects (variable)        ~
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        srhActiveSegmentIPv6Type = TBD15       |    0xFFFF     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Last Entry   |     Flags     |              Tag              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Segment List[0] 2001:db8::4                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Segment List[1] 2001:db8::5                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~          Optional Type Length Value objects (variable)        ~
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        srhActiveSegmentIPv6Type = TBD15       |    0xFFFF     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Last Entry   |     Flags     |              Tag              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Segment List[0] 2001:db8::6                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              ...                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~          Optional Type Length Value objects (variable)        ~
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           Table 11: Data Set Encoding Format for SRH Section

            ]]></artwork>
        </figure>

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

      <section anchor="Options-Template-Record-and-Data-Set-for-SRv6-Endpoint-Behavior"
               title="Options Template Record and Data Set for SRv6 end point behavior and Locator Length">
        <t>This appendix provides an SRv6 EndPoint Bevahior Options Template
        example, for the values presented in Table 12. In the Options Template
        case, the srhEndPointIPv6 Information Element is a Scope field</t>

        <t><figure>
            <artwork><![CDATA[

   +-------+-------------+-------------------------+----------------+
   | Entry | SRH End     | SRH End                 | SRH Segment    |
   | Nr    | Point IPv6  | Point Behavior          | Locator Length |
   +-------+-------------+-------------------------+----------------+
   | 1     | 2001:db8::1 | End [1]                 | 48             |
   +-------+-------------+-------------------------+----------------+
   | 2     | 2001:db8::4 | End with NEXT-CSID [43] | 48             |
   +-------+-------------+-------------------------+----------------+
   | 3     | 2001:db8::6 | End.DX6 [16]            | 48             |
   +-------+-------------+-------------------------+----------------+

          Table 12: three observed SRv6 End Point Behaviors
       ]]></artwork>
          </figure></t>

        <t><figure>
            <artwork><![CDATA[
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Set ID = 3            |          Length = 24          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Template ID 259         |        Field Count = 3        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Scope Field Count = 1     |0|   srhSegmentIPv6 = TBD3     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Scope 1 Field Length = 4    |0|srhSegmentEndpointBeh..=TBD11|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Field Length = 1        |0|srhSegmentLocatorLength=TBD10|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Field Length = 4        |           Padding             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


       Table 13: Template Record with SRH Section Encoding Format

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

        <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>
          <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         SET ID = 259          |           Length = 28         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         2001:db8::1                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             End [1]           |               48              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        2001:db8::4                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    End with NEXT-CSID [43]    |               48              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         2001:db8::6                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             End.DX6 [16]      |               48              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 
           Table 14: Data Set Encoding Format for SRH Section

            ]]></artwork>
        </figure>

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