<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?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-du-spring-connection-oriented-srv6-01"
     ipr="trust200902">
  <front>
    <title abbrev="Connection-oriented Path in SRv6  ">Connection-oriented
    Path in SRv6 Network</title>

    <author fullname="Zongpeng Du" initials="Z." surname="Du">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>No.32 XuanWuMen West Street</street>

          <city>Beijing</city>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>duzongpeng@foxmail.com</email>
      </address>
    </author>

    <author fullname="Peng Liu" initials="P." surname="Liu">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>No.32 XuanWuMen West Street</street>

          <city>Beijing</city>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>liupengyjy@chinamobile.com</email>
      </address>
    </author>

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

    <area>Routing Area</area>

    <workgroup>Network Working Group</workgroup>

    <keyword>SRv6</keyword>

    <keyword>Connection-oriented</keyword>

    <abstract>
      <t>This document proposes a method to support connection-oriented path
      in the SRv6 network.</t>
    </abstract>

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

  <middle>
    <section title="Introduction">
      <t>SRv6 Network Programming concept is introduced in <xref
      target="RFC8986"/> and <xref
      target="I-D.filsfils-spring-srv6-net-pgm-illustration"/>, which enables
      a data plane based network programming mechanism that goes beyond mere
      packet routing.</t>

      <t>According to <xref target="RFC8986"/>, an SRv6 SID is defined as the
      format of LOC:FUNCT:ARG, where the LOC stands for a locator, the FUNCT
      stands for a function, and the ARG is optional and stands for the
      arguments of the function. The locator is usually used to route the
      packet to the node who generates the SID. The basic functions of SRv6
      are End (related to a node) and End.X (related to a link/adjacency), and
      many other functions are also defined, including some VPN related ones
      and some binding SIDs. In addition, it is said that even a local VM or
      container which can apply any complex processing on the packet can be
      defined as a function. The functions may or may not include
      arguments.</t>

      <t>Based on SRv6, a node in the network can initiate a SID list
      &lt;SID1, SID2, SID3&gt; for a flow, so that a packet of the flow would
      be routed to the first node where the function1 related to SID1 would be
      implemented, then be routed to the second node where function2 related
      to SID2 would be implemented, and trigger similar operations according
      to SID3.</t>

      <t>In fact, both MPLS and SRv6 are some kind of languages that support
      network programming. By using a label to represent a VPN instance, MPLS
      provides a good support to the VPN services in the network. SRv6 now
      shows a more powerful capability in network programming. Perhaps in
      future, a lot of new network characteristics would be developed based on
      SRv6; meanwhile, some old network characteristics may also be realized
      by using SRv6 to integrate network protocols, and simplify the network.
      This document gives an example of the later.</t>

      <t>Traditional MPLS transport is not source routing based, but is label
      switching based. In MPLS networks, we can establish a label switching
      path for a specific flow. It looks like a connection-oriented path. If
      using the current SRv6 mechanism, we need to initiate a SID list
      &lt;SID1, SID2, SID3, ...&gt; that includes every node along the path,
      which is inconvenience. This document proposes a new SRv6 mechanism to
      support the connection-oriented path by defining some new functions on
      the node.</t>

      <t>The motivation to support connection-oriented path in SRv6 is that
      sometimes a strict hop-by-hop TE path is needed in the network, such as
      a DetNet path defined in <xref target="RFC8655">RFC 8655</xref>. In one
      realization of DetNet, each node along the path need allocate specific
      resources to the critical traffic, and a fixed path must be used. In
      future, the network may evolve to a pure SRv6 network without MPLS. In
      this situation, SRv6 should support some old network characteristics,
      such as the connection-oriented characteristic mentioned in this
      document.</t>
    </section>

    <section title="Data Plane for Connection-oriented Path">
      <t>Data plane for connection-oriented path in SRv6 is easy to design. We
      just need to define a new End.XCopd function, which is similar to END.X
      (binding to a cross-connected adjacency in Layer-3), but includes a
      label argument.</t>

      <t>When receiving a packet with an End.XCopd SID S as the DA, the node
      will match the SID in "My SID Table" to ensure that S is generated by
      itself, and also check whether the label is valid. If all checks are ok,
      the node should be able to obtain the outgoing SID S2. The node should
      replace the DA with the outgoing SID S2, and forward the packet to the
      layer-3 adjacency bound to the SID S.</t>

      <t>The penultimate node along the path will find that the
      connection-oriented path is about to terminate, so that it will do
      normal End.X operations, i.e., decrement SL, update the IPv6 DA with
      SRH[SL], and forward the packet to the layer-3 adjacency bound to the
      SID.</t>

      <figure>
        <artwork><![CDATA[
    _______      _______      _______      _______      _______  
   | Node1 |----| Node2 |----| Node3 |----| Node4 |----| Node5 |    
    -------      -------      -------      -------      -------  
 Node1: <A1::, A2::End.XCopd:ARG2>         
 Node2:            <A1::, A3::End.XCopd:ARG3>               
 Node3:                        <A1::, A4::End.XCopd:ARG4>         
 Node4:                                    <A1::, A5::End.DT4>

   Figure 1: <SA, DA> changes along the Connection-oriented Path
                         in the data plane

]]></artwork>
      </figure>

      <t/>

      <t>Figure 1 shows an example of label switching in SRv6. It is assumed
      that each NodeX has a locator as AX. Node 1 sends a packet to Node 5
      with an SRH header: &lt;A1::End.XCopd:ARG1, A5::End.DT4&gt; and an
      &lt;SA, DA&gt; pair: &lt;A1::, A1::End.XCopd:ARG1&gt;. And it is assumed
      that A1::End.XCopd:ARG1 can match a switching table entry: incoming SID
      A1::End.XCopd:ARG1, outgoing SID A2::End.XCopd:ARG2, and an interface
      binding to this End.XCopd:ARG1 function. Hence, after the process of
      "label switching", the Node 1 sends out a packet with an SRH header:
      &lt;A1::End.XCopd:ARG1, A5::End.DT4&gt; and an &lt;SA, DA&gt; pair:
      &lt;A1::, A2::End.XCopd:ARG2&gt;.</t>

      <t>We assume that the Node 2 has a switching table entry: incoming SID
      A2::End.XCopd:ARG2, outgoing SID A3::End.XCopd:ARG3, and an interface
      binding to that End.XCopd:ARG2 function, so that the packet will be sent
      to Node 3, and then Node 4.</t>

      <t>We also assume that the Node 4 has a switching table entry: incoming
      SID A4::End.XCopd:ARG4, outgoing SID A5::End.XCopd:0003, and an
      interface binding to that End.XCopd function. When the label "0003"
      appears, it means the node is the penultimate node. The Node 4 will do
      normal End.X operations, and sends out a packet without an SRH header,
      but with an &lt;SA, DA&gt; pair: &lt;A1::, A5::End.DT4&gt;.</t>

      <t/>

      <t>The way by which the label switching table is established on each
      node is described in the following section.</t>
    </section>

    <section title="Control Plane for Connection-oriented Path">
      <t>A PCE-based/controller-based method can surely configure each node
      along the path with a proper label switching table. However, this
      document also provides another optional mechanism for the distributed
      control plane. In fact, this method looks like what the RSVP-TE does in
      the MPLS network defined in <xref target="RFC3209">RFC 3209</xref>. In
      other words, we can simulate some basic functions of RSVP-TE by using
      SRv6 network programming.</t>

      <t>We need to define a new End.Copc function, which can establish and
      maintain the connection-oriented path. The End.Copc function also
      includes a label argument. Some of the label space should be reserved.
      In this document, we suppose that the label "0000" stands for the path
      establishment procedure. If a node receives a packet with an End.Copc
      function as the DA with a label value "0000", the node will trigger the
      path establishment procedure just as what the Path message does in
      RSVP-TE. If a node receives a packet with an End.Copc function as the DA
      with a normal label value, the node will use the downstream label to
      establish a label switching table entry just as what the Resv message
      does in RSVP-TE.</t>

      <t>However, in this way, the Head-End needs to notify each node along
      the path by some means, and we do not have a notification mechanism
      between different nodes in the data-plane network programming now. This
      document suggests to enable a simple notification method for the
      data-plane network programming if the information is not that
      complicated. For example, we can send a "ping" message with a specific
      TLV containing the necessary information. The advantage is easy to inter
      operate.</t>

      <figure>
        <artwork><![CDATA[
    _______      _______      _______      _______      _______  
   | Node1 |----| Node2 |----| Node3 |----| Node4 |----| Node5 |    
    -------      -------      -------      -------      -------  
 Node1: <A1::, A2::End.Copc:0000> --->>         
 Node2:            <A1::, A3::End.Copc:0000> --->>              
 Node3:                        <A1::, A4::End.Copc:0000> --->>        
 Node4:                              --->> <A1::, A5::Copc:0000>
 Node5:                              <<--- <A1::, A4::Copc:0003>      
 Node4:                 <<---  <A1::, A3::End.Copc:0117>
 Node3:      <<--- <A1::, A2::End.Copc:0445>         
 Node2: <A1::, A1::End.Copc:0998> <<---    

   Figure 2: <SA, DA> changes along the Connection-oriented Path
                        in the control plane

]]></artwork>
      </figure>

      <t/>

      <t>Figure 2 shows an example of label switching path establishment in
      SRv6. Node 1 sends a "ping" packet with an &lt;SA, DA&gt; pair:
      &lt;A1::, A1::End.Copc:0000&gt;. A new TLV defined for "ping" would
      include each End.Copc functions along the path. And it is assumed that
      A1::End.Copc:0000 can match the "My SID Table", and the DA is replaced
      by A2::End.Copc:0000 after the Node 1 has read the new TLV in the
      payload. Similar operation takes place in Node2-4.</t>

      <t>Node 5 will find it is the last SID after reading the new TLV in the
      payload. It generates a label "0003", and sends back the packet. In this
      time, the "ping" packet has an &lt;SA, DA&gt; pair: &lt;A1::,
      A4::Copc:0003&gt;. Node 4 can generate a label "0117", and establish a
      swapping table entry: incoming SID A4::End.XCopd:0117, outgoing SID
      A5::End.XCopd:0003, and an interface binding to the A4's End.XCopd
      function.</t>

      <t>Similarly, the Node 3 can generate a label "0445", and establish a
      swapping table entry: incoming SID A3::End.XCopd:0445, outgoing SID
      A4::End.XCopd:0117, and an interface binding to the A3's End.XCopd
      function.</t>

      <t>The Node 1 will find it is the first SID after reading the new TLV in
      the payload, and optionally, it can also generate a label "1111", and
      establish a swapping table entry: incoming SID A1::End.XCopd:1111,
      outgoing SID A2::End.XCopd:0998, and an interface binding to the A1's
      End.XCopd function.</t>

      <t>The swapping table is used in this document for description
      convenience. In fact, it should be several entries in the "My SID
      Table".</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>TBD.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>TBD.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>TBD.</t>
    </section>
  </middle>

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

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

    <references title="Informative References">
      <?rfc include='reference.I-D.filsfils-spring-srv6-net-pgm-illustration'?>

      <?rfc include="reference.RFC.8655"?>

      <?rfc include="reference.RFC.3209"?>
    </references>
  </back>
</rfc>
