<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2460 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2460.xml">
<!ENTITY RFC4291 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4291.xml">
<!ENTITY RFC1918 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1918.xml">
<!ENTITY RFC3513 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3513.xml">
<!ENTITY RFC8754 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8754.xml">
<!ENTITY I-D.ietf-dmm-srv6-mobile-uplane SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-dmm-srv6-mobile-uplane.xml">
]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="info" docName="draft-murakami-dmm-user-plane-message-encoding-05"
     ipr="trust200902">
  <!-- ***** FRONT MATTER ***** -->

  <front>
    <title abbrev="user-plane-message-encoding">User Plane Message Encoding</title>

    <author fullname="Tetsuya Murakami" initials="T." surname="Murakami" role="editor">
      <organization>Arrcus, Inc</organization>
      <address>
        <postal>
          <street>2077 Gateway Place, Suite 400</street>
          <city>San Jose</city>
          <country>USA</country>
        </postal>
	<email>tetsuya@arrcus.com</email>
      </address>
    </author>

    <author fullname="Satoru Matsushima" initials="S." surname="Matsushima">
      <organization>SoftBank</organization>
      <address>
        <postal>
          <street>1-9-1 Higashi-Shinbashi, Munato-ku</street>
          <city>Tokyo</city>
          <country>Japan</country>
        </postal>
        <email>satoru.matsushima@g.softbank.co.jp</email>
      </address>
    </author>

    <author fullname="Kentaro Ebisawa" initials="K." surname="Ebisawa">
      <organization>Toyota Motor Corporation</organization>
      <address>
        <postal>
          <street></street>
          <city>Tokyo</city>
          <country>Japan</country>
        </postal>
        <email>ebisawa@toyota-tokyo.tech</email>
      </address>
    </author>

    <author fullname="Pablo Camarillo" initials="P." surname="Camarillo">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <country>Spain</country>
        </postal>
        <email>pcamaril@cisco.com</email>
      </address>
    </author>

    <author fullname="Ravi Shekhar" initials="R." surname="Shekhar">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <country>USA</country>
        </postal>
        <email>ravishek@cisco.com</email>
      </address>
    </author>

    <!--  -->
    <date month="March" year="2022" />

    <area>Internet</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword></keyword>

    <abstract>
      <t>This document defines the encoding of User Plane messages into Segment
      Routing Header (SRH). The SRH carries the User Plane messages over SRv6 Network.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>3GPP defines User Plane function (UPF) and the protocol messages that it supports.
      The User Plane messages support in-band signalling for path and tunnel management.
      Currently, User Plane messages are defined in
      <xref target="TS29281">TS 29.281</xref>.</t>

      <t>When applying SRv6 (Segment Routing IPv6) to the user plane of mobile networks, based on
      <xref target="I-D.ietf-dmm-srv6-mobile-uplane">draft-ietf-dmm-srv6-mobile-uplane</xref>.
      User Plane messages must be carried over SRv6 network. This document defines which User Plane
      message must be encoded to SRv6 and also defines how to encode the  User Plane messages
      into SRH.</t>

      <t>In addition, SRH is mandatory at the ultimate segment upon carrying the User Plane messages
      because User Plane message is encoded into SRH. Hence, this document considers how to deal with
      the encoding of User Plane messages into SRH when PSP is applied that SRH is popped out at the
      penultimate segment.</t>
    </section>


    <section title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref target="RFC2119">
      RFC 2119</xref>.</t>
    </section>

    <section title="Conventions and Terminology">
      <t><list hangIndent="22" style="hanging">
	<t hangText="SRv6:">Segment Routing IPv6.</t>
	<t hangText="GTP-U:">GPRS Tunneling Protocol User Plane.</t>
	<t hangText="UPF: ">User Plane Function.</t>
	<t hangText="SRH: ">IPv6 Segment Routing Header.</t>
	<t hangText="PSP: ">Penultimate Segment POP of the SRH.</t>
	<t hangText="USP: ">Ultimate Segment Pop of the SRH.</t>
      </list></t>
    </section>

    
    <section title="Motivation">
      <t>3GPP User Plane needs to support the user plane messages associated
      with a GTP-U tunnel defined in <xref target="TS29281"/>.
      In the case of SRv6 User Plane
      <xref target="I-D.ietf-dmm-srv6-mobile-uplane"/>, those messages are
      also required when the user plane interworks with GTP-U.</t>

      <t>IPv6 Segment Routing Header (SRH)
      <xref target="RFC8754"/>
      is used for SRv6 User Plane. SRH is able to associate additional
      information to the segments. The Tag field of SRH is capable to indicate
      different properties within a SID. SRH TLV is capable to provide
      meta-data to the endpoint node. </t>

      <t>The above capability of SRH motivates us to map the user plane
      messages into it because of the same encapsulation with the packets
      of carrying client packets. It introduces no additional headers or
      extension headers to be chained in the packet just for carrying
      the user plane messages. </t>
    </section>

    
    <section title="User Plane Message encoding into SRH">
      <t>This section defines how to encode the User Plane messages into SRH in
      order to carry the User Plane messages over SRv6 network.</t>
      
    <section title="GTP-U Header format">
      <t>3GPP defines GTP-U Header format as shown below.</t>

      <figure align="center" anchor="gtpu_header" title="GTP-U Header format">
        <preamble></preamble>

        <artwork align="center"><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Ver |P|R|E|S|N| Message Type  |           Length              |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                Tunnel Endpoint Identifier                     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |      Sequence Number          | N-PDU Number  |  Next-Ext-Hdr |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>
      </figure>

      <t>User Plane message type is encoded in Message Type field of GTP-U Header. The following
      User Plane messages must be carried over SRv6 network at least. The value of each User Plane
      message type is defined as shown below.</t>

      <t><list hangIndent="20" style="hanging">
        <t hangText="Echo Request: ">1</t>
        <t hangText="Echo Reply: ">2</t>
        <t hangText="Error Indication: ">26</t>
        <t hangText="End Marker: ">254</t>
      </list></t>
    </section>

    <section title="Args.Mob.Upmsg">
      <t><xref target="I-D.ietf-dmm-srv6-mobile-uplane">draft-ietf-dmm-srv6-mobile-uplane</xref> defines the
      format of Args.Mob.Session argument which is used in SRv6 SID Mobility Functions in order to carry the
      PDU Session identifier. The format of Args.Mobs.Session is defined as shown below.</t>

      <figure align="center" anchor="args-mob-session" title="Args.Mob.Session format">
        <preamble></preamble>

        <artwork align="center"><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |   QFI     |R|U|                PDU Session ID                 |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |PDU Sess(cont')|
     +-+-+-+-+-+-+-+-+
        ]]></artwork>
      </figure>

      <t>In case of Echo Request, Echo Reply and Error Indication, Sequence Number in GTP-U header needs to be
      carried. Similar to <xref target="I-D.ietf-dmm-srv6-mobile-uplane">draft-ietf-dmm-srv6-mobile-uplane</xref>,
      the new arguments to carry Sequqnce number for Echo Request, Echo Reply and Error Indication message needs
      to be defined. For this, the following Args.Mobs.Upmsg should be defined newly to carry Sequence number.</t>

      <figure align="center" anchor="args-mob-upmsg" title="Args.Mob.Upmsg format for Echo Request, Echo Reply and Error Indication">
        <preamble></preamble>

        <artwork align="center"><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |   QFI     |R|U|       Sequence Number         |      Pad      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |   Pad(cont')  |
     +-+-+-+-+-+-+-+-+
        ]]></artwork>
      </figure>

      <t>QFI bit, R bit, U bit and 16-bit Sequence Number is encoded in Args.Mobs.Upmsg. The remaining bits followed by Sequence Number
      must be padded in 0.</t>

      <t>In case of End Marker, TEID shall be used as PDU Session ID same as
      <xref target="I-D.ietf-dmm-srv6-mobile-uplane">draft-ietf-dmm-srv6-mobile-uplane</xref>. Hence, for End Marker, Args.Mobs.Session
      should be used to carry TEID as PDU Session ID.</t>
    </section>

    <section title="Encoding of Tags Field">
      <t>The Segment Routing Header is defined in <xref target="RFC8754">
      IPv6 Segment Routing Header (SRH)</xref>. This draft defines 16 bits Tag field but does not define
      the format or use of this Tag field in the Segment Routing Header.</t>

      <t>The User Plane message type encoding is defined in <xref target="TS29281">TS 29.281</xref>. Based
      on this definition, the User Plane message type must be encoded into the Tag field in the Segment
      Routing Header in order to indicate the type of the user plane messages for at least Echo Request,
      Echo Reply, Error Indication or End Marker.</t>

      <t>Only UPF must process the Tag field where the user plane message is encoded. In addition, 
      when the user plane message is encoded in the Tag field, the UPF should not encode any segments in
      the Segment Routing Header whose function modifies the Tag field value. Any other transport router
      implementing SRv6 must ignore the Tag field upon processing the Segment Routing Header.</t>

      <t>The user plane messages must be encoded into the Tag filed as shown below.</t>

      <figure align="center" anchor="tag_field" title="Tag Field Encoding">
        <preamble></preamble>

        <artwork align="center"><![CDATA[
     0                             1
     0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5  6     
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
     |         Reserved                  |B3|B2|B1|B0|
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        ]]></artwork>
      </figure>

      <t><list hangIndent="16" style="hanging">
        <t hangText="Bit 0 [B0]: ">End Marker</t>
        <t hangText="Bit 1 [B1]: ">Error Indication</t>
        <t hangText="Bit 2 [B2]: ">Echo Request</t>
        <t hangText="Bit 3 [B3]: ">Echo Reply</t>
      </list></t>

      <t>End Marker, Echo Request and Echo reply messages do not require any additional information
      elements. However, Error Indication message requires the additional information elements like
      Tunnel Endpoint Identifier Data IE, GSN Address, etc. These additional information elements can
      be encoded into the SRH TLV that is defined in the next section.</t>
    </section>


    <section title="User Plane message Information Element Support">
      <t>End Maker, Echo Request and Echo Reply messages do not require any additional information
      elements. However, Error Indication message requires additional 3GPP IEs (Information Element).
      These additional information elements must be carried over SRv6 network as well. However SRv6
      SID has limited space only. Hence it cannot carry a lot of information elements.</t>

      <t>In order to carry more information elements, SRH TLV shall be leveraged. SRH TLV is defined in
      <xref target="RFC8754">IPv6 Segment Routing Header (SRH)</xref>
      in order to carry the meta-data for the segment processing. In order to carry additional User Plane
      messages like 3GPP IEs, the new type named as "User Plane Container" must be defined as the new SRH 
      TLV. The "User Plane Container" can carry additional User Plane messages which includes multiple 3GPP IEs
      with 1 sub-TLV.</t>

      <figure align="center" title="User Plane Container TLV">
        <preamble></preamble>

        <artwork align="center"><![CDATA[
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |      Type     |     Length      |  User Plane message sub-TLV |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     //               User Plane message sub-TLV                    //
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>
      </figure>

      <t><list hangIndent="16" style="hanging">
        <t hangText="Type: ">to be assigned by IANA</t>
        <t hangText="Length: ">Length of User Plane message sub-TLV</t>
        <t hangText="User Plane message sub-TLV: ">User Plane message sub-TLV defined below</t>
      </list></t>

      <figure align="center" title="User Plane message sub-TLV">
        <preamble></preamble>

        <artwork align="center"><![CDATA[
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |      Type     |     Length      |            Value            //
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>
      </figure>

      <t><list hangIndent="16" style="hanging">
        <t hangText="Type: ">Type of User Plane message sub-TLV</t>
	  <t><list hangIndent="24" style="hanging">
	    <t hangText="3GPP IE sub-TLV: ">0x01</t>
	  </list></t>
        <t hangText="Length: ">Length of Value</t>
        <t hangText="Value: ">User Plane Message data</t>
	  <t><list hangIndent="24" style="hanging">
	    <t hangText="3GPP IE sub-TLV: ">multiple 3GG IEs</t>
	  </list></t>
      </list></t>
    </section>

    <section title="SID flavor consideration">
      <t>This section considers SID flavor of where the SRH is popped out at either the penultimate
      or the ultimate segment.</t>
  
      <t>In order to carry User Plane message over SRv6 network, SRH must be sustained over entire
      SRv6 network because User Plane message type and required information elements are encoded
      into SRH. If the penultimate segment is popping out SRH, i.e., PSP, User Plane message can
      not be carried in entire SRv6 network.</t>

      <t>In order to avoid this problem, USP is recommended in SRv6 Mobile network. In this case, 
      SRH is never popped out and User Plane message can be sustained over entire SRv6 network.</t>

      <t>However, if PSP needs to be enabled in SRv6 network, it is also a possible solution to encap
      another SRH which carries User Plane message along with the outer IPv6 or SRH.</t>
    </section>
    
    </section>

    <section anchor="security" title="Security Considerations">
      <t>This document does not raise any additional security issues. This document just define the mechanisms
      for mapping between user plane message (GTP-U message) and SRH in SRv6.
      Basically, since this document is using SRH defined in <xref target="RFC8754"/> to carry user plane
      message, same security consideration stated in <xref target="RFC8754"/> shall be applied.</t>
    </section>

    <section anchor="iana" title="IANA Consideration">
      <t>The type value of SRH TLV for User Plane Container must be assigned by IANA.</t>
    </section>

    <section anchor="acknowledgements" title="Acknowledgements">
    </section>

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <references title="Normative References">
      &RFC2119;
      &RFC2460;
      &RFC4291;
    </references>

    <references title="Informative References">
      &RFC1918;
      &RFC3513;
      &RFC8754;
      &I-D.ietf-dmm-srv6-mobile-uplane;

      <reference anchor="TS29281"
                 target="http://www.3gpp.org/ftp//Specs/archive/29_series/29.281/29281-f60.zip">
        <front>
	  <title>General Packet Radio System (GPRS) Tunnelling Protocol User Plane (GTPv1-U)</title>
          <author>
            <organization>3GPP</organization>
          </author>
          <date year="2019" />
        </front>
      </reference>
 
    </references>

<!-- Change Log

v00 2019-10-13  TM	Initial version

-->
  </back>
</rfc>
