Internet DRAFT - draft-tgraf-opsawg-ipfix-srv6-srh

draft-tgraf-opsawg-ipfix-srv6-srh







Network Working Group                                            T. Graf
Internet-Draft                                                  Swisscom
Intended status: Standards Track                               B. Claise
Expires: 25 January 2023                                          Huawei
                                                             P. Francois
                                                               INSA-Lyon
                                                            24 July 2022


             Export of Segment Routing IPv6 Information in
                   IP Flow Information Export (IPFIX)
                  draft-tgraf-opsawg-ipfix-srv6-srh-05

Abstract

   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.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 25 January 2023.

Copyright Notice

   Copyright (c) 2022 IETF Trust and the persons identified as the
   document authors.  All rights reserved.










Graf, et al.             Expires 25 January 2023                [Page 1]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  IPFIX Information Elements  . . . . . . . . . . . . . . . . .   3
   3.  Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . .   4
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
     4.1.  srhFlagsIPv6  . . . . . . . . . . . . . . . . . . . . . .   6
     4.2.  srhTagIPv6  . . . . . . . . . . . . . . . . . . . . . . .   6
     4.3.  srhSegmentIPv6  . . . . . . . . . . . . . . . . . . . . .   6
     4.4.  srhActiveSegmentIPv6  . . . . . . . . . . . . . . . . . .   6
     4.5.  srhSegmentIPv6BasicList . . . . . . . . . . . . . . . . .   7
     4.6.  srhSegmentIPv6ListSection . . . . . . . . . . . . . . . .   7
     4.7.  srhSegmentIPv6sLeft . . . . . . . . . . . . . . . . . . .   7
     4.8.  srhSectionIPv6  . . . . . . . . . . . . . . . . . . . . .   7
     4.9.  srhActiveSegmentIPv6Type  . . . . . . . . . . . . . . . .   7
     4.10. srhSegmentLocatorLength . . . . . . . . . . . . . . . . .   8
     4.11. srhSegmentEndpointBehavior  . . . . . . . . . . . . . . .   8
   5.  Operational Considerations  . . . . . . . . . . . . . . . . .   9
     5.1.  SRv6 Segment List . . . . . . . . . . . . . . . . . . . .   9
     5.2.  Compressed SRv6 Segment List Decomposition  . . . . . . .  10
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  10
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  10
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  10
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .  10
     8.2.  Informative References  . . . . . . . . . . . . . . . . .  10
   Appendix A.  IPFIX Encoding Examples  . . . . . . . . . . . . . .  12
     A.1.  Template Record and Data Set with Segment Basic List  . .  12
     A.2.  Template Record and Data Set with Segment List Section  .  15
     A.3.  Template Record and Data Set with SRH Section . . . . . .  17
     A.4.  Options Template Record and Data Set for SRv6 end point
           behavior and Locator Length . . . . . . . . . . . . . . .  20
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  21

1.  Introduction

   A new type of Routing Extension Header called Segment Routing Header
   (SRH) is defined by [RFC8754] which is used for applying Segment
   Routing (SR) on the IPv6 data plane.




Graf, et al.             Expires 25 January 2023                [Page 2]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


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

   SRv6 segment endpoint behaviors have been defined in [RFC8986] and
   describe how packets should be processed.

   This document defines eleven new IPFIX Information Elements (IEs) and
   three new subregistries within the "IPFIX Information Elements"
   registry [RFC7012], respectively for the new SRH dimensions, SRv6
   endpoint behaviors and routing protocol and PCEP extensions.

2.  IPFIX Information Elements

   This section defines and describes the new IPFIX IEs.

   srhFlagsIPv6
      8-bit flags defined in the SRH.

   srhTagIPv6
      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.

   srhSegmentIPv6
      128-bit IPv6 address that represents an SRv6 segment.

   srhActiveSegmentIPv6
      128-bit IPv6 address that represents the active SRv6 segment.

   srhSegmentIPv6BasicList
      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.

   srhSegmentIPv6ListSection
      Exposes the SRH Segment List as defined in section 2 of [RFC8754]
      as series of n octets.

   srhSegmentIPv6sLeft
      8-bit unsigned integer defining the number of route segments
      remaining to reach the end of the segment list.



Graf, et al.             Expires 25 January 2023                [Page 3]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


   srhSectionIPv6
      Exposes the SRH and its TLV's as defined in section 2 of [RFC8754]
      as series of n octets.

   srhActiveSegmentIPv6Type
      Name of the routing protocol or PCEP extension from where the
      active SRv6 segment has been learned from.

   srhSegmentLocatorLength
      The number of significant bits.  Together with srhSegmentIPv6 it
      enables the calculation of the SRv6 Locator.

   srhSegmentEndpointBehavior
      16-bit unsigned integer that represents a SRv6 Endpoint behavior.

   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
   [RFC6313].

3.  Use Cases

   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):

   *  how many packets are forwarded or dropped

   *  if dropped, for which reasons,

   *  identify the active segment and its control plane protocol,

   *  the SRv6 segment list,

   *  the next SRv6 node and its type,

   *  and how many SRv6 segments are left.

4.  IANA Considerations

   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 [RFC7012]
   available at [IANA-IPFIX] and assign the following initial code
   points.



Graf, et al.             Expires 25 January 2023                [Page 4]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


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

   Note to the RFC-Editor:

   *  Please replace TBD1 - TBD16 with the values allocated by IANA

   *  Please replace the [RFC-to-be] with the RFC number assigned to
      this document





Graf, et al.             Expires 25 January 2023                [Page 5]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


4.1.  srhFlagsIPv6

   Name: srhFlagsIPv6 ElementID: TBD1 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 Abstract Data Type: unsigned8 Data Type Semantics:
   flags Reference: [RFC-to-be], RFC8754[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.

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


4.2.  srhTagIPv6

   Name: srhTagIPv6 ElementID: TBD2 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.  Abstract Data Type: unsigned16 Data Type Semantics:
   identifier Reference: [RFC-to-be], RFC8754

4.3.  srhSegmentIPv6

   Name: srhSegmentIPv6 ElementID: TBD3 Description: This Information
   Element identifies the 128-bit IPv6 address that represents an SRv6
   segment.  Abstract Data Type: ipv6address Data Type Semantics:
   default Reference: [RFC-to-be], RFC8754

4.4.  srhActiveSegmentIPv6

   Name: srhActiveSegmentIPv6 ElementID: TBD4 Description: This
   Information Element identifies the 128-bit IPv6 address that
   represents the active SRv6 segment.  Abstract Data Type: ipv6address
   Data Type Semantics: default Reference: [RFC-to-be], RFC8754




Graf, et al.             Expires 25 January 2023                [Page 6]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


4.5.  srhSegmentIPv6BasicList

   Name: srhSegmentIPv6BasicList ElementID: TBD5 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.  Abstract Data Type: basicList Data Type
   Semantics: list Reference: [RFC-to-be], RFC8754

4.6.  srhSegmentIPv6ListSection

   Name: srhSegmentIPv6ListSection ElementID: TBD6 Description: Exposes
   the SRH Segment List as defined in section 2 of Abstract Data Type:
   octetArray Data Type Semantics: default Reference: [RFC-to-be],
   RFC8754[RFC8754] as series of n octets.

4.7.  srhSegmentIPv6sLeft

   Name: srhSegmentIPv6sLeft ElementID: TBD7 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.  Abstract Data Type: unsigned8 Data Type Semantics:
   quantity Reference: [RFC-to-be], RFC8754

4.8.  srhSectionIPv6

   Name: srhSectionIPv6 ElementID: TBD8 Description: This Information
   Element exposes the SRH and its TLV's as defined in section 2 of
   Abstract Data Type: octetArray Data Type Semantics: default
   Reference: [RFC-to-be], RFC8754[RFC8754] as series of n octets.

4.9.  srhActiveSegmentIPv6Type

   Name: srhActiveSegmentIPv6Type ElementID: TBD9 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 Abstract Data Type: unsigned8
   Data Type Semantics: identifier Reference: [RFC-to-be][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 [RFC8126].  Experts need to check definitions of new
   values for completeness, accuracy, and redundancy.





Graf, et al.             Expires 25 January 2023                [Page 7]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


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


4.10.  srhSegmentLocatorLength

   Name: srhSegmentLocatorLength ElementID: TBD10 Description: This
   Information Element identifies the number of significant bits and
   together with srhSegmentIPv6 enables the calculation of the SRv6
   Locator.  Abstract Data Type: unsigned8 Data Type Semantics: default
   Reference: [RFC-to-be], RFC8986 Section 3.1

4.11.  srhSegmentEndpointBehavior

   Name: srhSegmentEndpointBehavior ElementID: TBD11 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 Abstract Data Type: unsigned16 Data
   Type Semantics: identifier Reference: [RFC-to-be], RFC8986
   Section 4[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.








Graf, et al.             Expires 25 January 2023                [Page 8]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


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

         Table 4: "IPFIX SRV6 Endpoint Behavior" registry


5.  Operational Considerations

5.1.  SRv6 Segment List

   The zero or more 128-bit IPv6 addresses in the SRH [RFC8754] can be
   exported in two different ways, with two different IPFIX IEs:

   *  srhSegmentIPv6BasicList

   *  srhSegmentIPv6ListSection

   The srhSegmentIPv6BasicList encodes the SID list of IPv6 addresses
   with a basicList, specified in the IPFIX Structured Data [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.

   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.

   It is not expected that an exporter would support both
   srhSegmentIPv6BasicList and srhSegmentIPv6ListSection at the same
   time.








Graf, et al.             Expires 25 January 2023                [Page 9]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


5.2.  Compressed SRv6 Segment List Decomposition

   The SRv6 segment list in the IPFIX IEs srhSegmentIPv6BasicList and
   srhSegmentIPv6ListSection could contain compressed-SID containers as
   described in [I-D.ietf-spring-srv6-srh-compression].  The SID
   endpoint behaviors described in section 4 of
   [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 [RFC8986], determines the common most significant bits.

6.  Security Considerations

   There exists no significant extra security considerations regarding
   the allocation of these new IPFIX IEs compared to [RFC7012].

7.  Acknowledgements

   The authors would like to thank Yao Liu, Paolo Lucente, Eduard
   Vasilenko, Alex Huang Feng and Bruno Decraene for their review and
   valuable comments.

8.  References

8.1.  Normative References

   [RFC6313]  Claise, B., Dhandapani, G., Aitken, P., and S. Yates,
              "Export of Structured Data in IP Flow Information Export
              (IPFIX)", DOI 10.17487/RFC6313, RFC 6313, July 2011,
              <https://www.rfc-editor.org/info/rfc6313>.

   [RFC7012]  Claise, B., Ed. and B. Trammell, Ed., "Information Model
              for IP Flow Information Export (IPFIX)", RFC 7012,
              DOI 10.17487/RFC7012, September 2013,
              <https://www.rfc-editor.org/info/rfc7012>.

   [RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines for
              Writing an IANA Considerations Section in RFCs", RFC 8126,
              DOI 10.17487/RFC8126, BCP 26, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

8.2.  Informative References










Graf, et al.             Expires 25 January 2023               [Page 10]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


   [I-D.ietf-bess-srv6-services]
              Dawra, G., Talaulikar, K., Raszuk, R., Decraene, B.,
              Zhuang, S., and J. Rabadan, "SRv6 BGP based Overlay
              Services", Work in Progress, Internet-Draft, draft-ietf-
              bess-srv6-services-15, 22 March 2022,
              <https://www.ietf.org/archive/id/draft-ietf-bess-srv6-
              services-15.txt>.

   [I-D.ietf-lsr-isis-srv6-extensions]
              Psenak, P., Filsfils, C., Bashandy, A., Decraene, B., and
              Z. Hu, "IS-IS Extensions to Support Segment Routing over
              IPv6 Dataplane", Work in Progress, Internet-Draft, draft-
              ietf-lsr-isis-srv6-extensions-18, 20 October 2021,
              <https://www.ietf.org/archive/id/draft-ietf-lsr-isis-srv6-
              extensions-18.txt>.

   [I-D.ietf-pce-segment-routing-ipv6]
              Li(Editor), C., Negi, M. S., Sivabalan, S., Koldychev, M.,
              Kaladharan, P., and Y. Zhu, "Path Computation Element
              Communication Protocol (PCEP) Extensions for Segment
              Routing leveraging the IPv6 dataplane", Work in Progress,
              Internet-Draft, draft-ietf-pce-segment-routing-ipv6-14, 10
              July 2022, <https://www.ietf.org/archive/id/draft-ietf-
              pce-segment-routing-ipv6-14.txt>.

   [I-D.ietf-spring-srv6-srh-compression]
              Cheng, W., Filsfils, C., Li, Z., Decraene, B., Cai, D.,
              Voyer, D., Clad, F., Zadok, S., Guichard, J. N., Aihua,
              L., Raszuk, R., and C. Li, "Compressed SRv6 Segment List
              Encoding in SRH", Work in Progress, Internet-Draft, draft-
              ietf-spring-srv6-srh-compression-02, 11 July 2022,
              <https://www.ietf.org/archive/id/draft-ietf-spring-srv6-
              srh-compression-02.txt>.

   [I-D.li-lsr-ospfv3-srv6-extensions]
              Li, Z., Hu, Z., Cheng, D., Talaulikar, K., and P. Psenak,
              "OSPFv3 Extensions for SRv6", Work in Progress, Internet-
              Draft, draft-li-lsr-ospfv3-srv6-extensions-00, 15 January
              2020, <https://www.ietf.org/archive/id/draft-li-lsr-
              ospfv3-srv6-extensions-00.txt>.

   [IANA-IPFIX]
              "IANA, "IP Flow Information Export (IPFIX) Entities"",
              <https://www.iana.org/assignments/ipfix/ipfix.xhtml>.







Graf, et al.             Expires 25 January 2023               [Page 11]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


   [RFC8754]  Filsfils, C., Ed., Dukes, D., Ed., Previdi, S., Leddy, J.,
              Matsushima, S., and D. Voyer, "IPv6 Segment Routing Header
              (SRH)", DOI 10.17487/RFC8754, RFC 8754, March 2020,
              <https://www.rfc-editor.org/info/rfc8754>.

   [RFC8986]  Filsfils, C., Ed., Camarillo, P., Ed., Leddy, J., Voyer,
              D., Matsushima, S., and Z. Li, "Segment Routing over IPv6
              (SRv6) Network Programming", RFC 8986,
              DOI 10.17487/RFC8986, February 2021,
              <https://www.rfc-editor.org/info/rfc8986>.

Appendix A.  IPFIX Encoding Examples

   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.

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

A.1.  Template Record and Data Set with Segment Basic List

   With this encoding, the examples in Table 5 are represented with the
   following IEs:

   *  SR Flags => srhFlagsIPv6

   *  SR Tag => srhTagIPv6

   *  Active Segment Type => srhActiveSegmentIPv6Type

   *  Segment List => srhSegmentIPv6BasicList






Graf, et al.             Expires 25 January 2023               [Page 12]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


       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


   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 [RFC6313].

   The data set is represented as follows:

       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                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Graf, et al.             Expires 25 January 2023               [Page 13]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


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



Graf, et al.             Expires 25 January 2023               [Page 14]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


      |             Segment List[0] = 2001:db8::6  ...                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Table 7: Data Set Encoding Format for Basic List


A.2.  Template Record and Data Set with Segment List Section

   With this encoding, the examples in Table 5 are represented with the
   following IEs:

   *  SR Flags => srhFlagsIPv6

   *  SR Tag => srhTagIPv6

   *  Active Segment Type => srhActiveSegmentIPv6Type

   *  Segment List => srhSegmentIPv6List

       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


   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.



Graf, et al.             Expires 25 January 2023               [Page 15]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


   The data set is represented as follows:

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



Graf, et al.             Expires 25 January 2023               [Page 16]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      ...                      |srhFlagsIPv6=0 | srhTagIPv6... |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | = 789         |         srhActiveSegment      |     0xFFFF    |
      |               |         IPv6Type=TBD15        |               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        2001:db8::6 ...                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


          Table 9: Data Set Encoding Format for Segment List Section


A.3.  Template Record and Data Set with SRH Section

   With this encoding, the examples in Table 5 are represented with the
   following IEs:

   *  SR Flags + SR Tag + Segment List => srhSectionIPv6

   *  Active Segment Type => srhActiveSegmentIPv6Type

       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





Graf, et al.             Expires 25 January 2023               [Page 17]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


   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.

   The data set is represented as follows:

       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              |



Graf, et al.             Expires 25 January 2023               [Page 18]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


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


   (*) The Length must be calculated to include the optional Type Length
   Value objects.










Graf, et al.             Expires 25 January 2023               [Page 19]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


A.4.  Options Template Record and Data Set for SRv6 end point behavior
      and Locator Length

   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

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

         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


   In this example, the Template ID is 259, which will be used in the
   Data Record.

   The data set is represented as follows:






Graf, et al.             Expires 25 January 2023               [Page 20]

Internet-Draft   IPFIX Segment Routing IPv6 Information        July 2022


       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


   (*) The Length must be calculated to include the optional Type Length
   Value objects.

Authors' Addresses

   Thomas Graf
   Swisscom
   Binzring 17
   CH-8045 Zurich
   Switzerland
   Email: thomas.graf@swisscom.com


   Benoit Claise
   Huawei
   Email: benoit.claise@huawei.com


   Pierre Francois
   INSA-Lyon
   Lyon
   France
   Email: pierre.francois@insa-lyon.fr






Graf, et al.             Expires 25 January 2023               [Page 21]