<?xml version="1.0" encoding="US-ASCII"?>
<!-- This is built from a template for a generic Internet Draft. Suggestions for
     improvement welcome - write to Brian Carpenter, brian.e.carpenter @ gmail.com -->
<!-- This can be converted using the Web service at http://xml.resource.org/experimental.html
     (which supports the latest, sometimes undocumented and under-tested, features.) -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<!-- You want a table of contents -->
<?rfc symrefs="yes"?>
<!-- Use symbolic labels for references -->
<?rfc sortrefs="yes"?>
<!-- This sorts the references -->
<?rfc iprnotified="no" ?>
<!-- Change to "yes" if someone has disclosed IPR for the draft -->
<?rfc compact="yes"?>
<!-- This defines the specific filename and version number of your draft (and inserts the appropriate IETF boilerplate -->
<rfc category="std"
     docName="draft-dong-spring-srv6-inter-layer-programming-02"
     ipr="trust200902">
  <front>
    <title abbrev="SRv6 Inter-Layer Network Programming">SRv6 for Inter-Layer
    Network Programming</title>

    <author fullname="Jie Dong" initials="J." surname="Dong">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No.156 Beiqing Road</street>

          <city>Beijing, 100095</city>

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

        <email>jie.dong@huawei.com</email>
      </address>
    </author>

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

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

          <city>Beijing, 100053</city>

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

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

    <date day="24" month="October" year="2021"/>

    <area>Routing</area>

    <workgroup>SPRING Working Group</workgroup>

    <keyword>SRv6, Inter-layer, Network Programming</keyword>

    <abstract>
      <t>This document defines a new SRv6 network function which can be used
      for SRv6 inter-layer network programming. It is a variant of the End.X
      function. Instead of pointing to an L3 adjacency, this function points
      to an underlay interface. Such a interface can stand for a underlay link
      or path/connection between two routers, which may be invisible in the L3
      topology.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>In many scenarios, operator owns a multi-layered network. In that
      case, cross-layer design and optimization mechanisms are more efficient
      in resource utilization and SLA assurance, but normally are also
      considered more complicated. As an IP/MPLS based technology, Segment
      Routing (SR) normally does not need to care about the network layers
      beneath the IP layer. One exception is as described in <xref
      target="RFC8668"/>, IS-IS is extended to advertise the link attributes
      and Segment Identifiers (SIDs) of Layer 2 (L2) bundle members, so that
      operator can control traffic flows to traverse a particular individual
      L2 link which comprises the L2 bundle interface</t>

      <t>In <xref target="RFC8986"/>, it is described that for an outgoing
      interface bundle made of 10 member links, up to 11 End.X local SIDs for
      that bundle need to be allocated. One END.X for the bundle itself and
      then up to one END.X for each member link. However, there are some
      differences between the normal END.X function for the bundle and the
      END.X function for the member link, as they are not at the same network
      layer. Moreover, besides the L2 bundle use case, there are other types
      of underlay interfaces or connections, which can be integrated and
      programmed using SRv6. This document aims to define a unified SRv6
      function to support those inter-layer network programming in SRv6.</t>

      <t>As another example, the underlay of the IP network can be an optical
      network. In many today's IP and optical transport networks, IP network
      and optical network are maintained separately, and in most cases, the
      optical network works as an underlay which is invisible to the IP
      network. However, the optical path resource and the IP path resource may
      not be one-to-one mapped so that some resource in optical network can
      not be fully used. In some cases, there may be some optical paths that
      is not visible in the L3 IP topology, and thus they can not be used to
      carry IP traffic.</t>

      <t>Following the SRv6 network programming concept in <xref
      target="RFC8986"> </xref>, we can use a new SRv6 function to identify a
      specific optical path, and put the corresponding SRv6 SID into an
      integrated SRv6 SID list. The optical path can be either OTN based or
      DWDM based. Besides the optical paths, it is also possible to use the
      SRv6 function to identify other underlay paths/connenctions, such as a
      back-to-back Ethernet connection, or some pre-configured tunnels.</t>

      <t>The SRv6 function mentioned above can be considered as a variant of
      the END.X function defined in <xref target="RFC8986"/>, so that it is
      suggested to define a new SRv6 function for it. This document defines
      the operation of this new SRv6 function, and describes some use cases of
      this SRv6 underlay interface function.</t>
    </section>

    <!-- intro -->

    <section title="Requirements Language and Terminology">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in <xref
      target="RFC2119"/> when they appear in ALL CAPS. When these words are
      not in ALL CAPS (such as "should" or "Should"), they have their usual
      English meanings, and are not to be interpreted as <xref
      target="RFC2119"/> key words.</t>

      <t/>
    </section>

    <section title="END.XU Function">
      <t>This section defines the new SRv6 underlay interface function.</t>

      <t>The "Endpoint with cross-connect to an underlay interface" function
      (End.XU for short) is a variant of the End.X function defined in <xref
      target="RFC8986"/>.</t>

      <t>When N receives a packet destined to S and S is a local End.XU SID, N
      does:</t>

      <figure>
        <artwork><![CDATA[   1.  IF NH=SRH and SL > 0
   2.     decrement SL
   3.     update the IPv6 DA with SRH[SL]
   4.     forward to underlay interface bound to the SID S
   5.  ELSE IF NH!=SRH
   6.     Send an ICMP parameter problem message; drop the packet
   7.  ELSE
   8.     drop the packet
]]></artwork>
      </figure>

      <t/>

      <t>Note that the underlay interface or connection in step 4 SHOULD be
      established before this function and the associated SID is announced
      into the network.</t>

      <t>This End.XU function can be announced using IGP or BGP-LS in a
      similar way to the announcement of END.X function. The detailed protocol
      extension will be described in a separate document.</t>
    </section>

    <section anchor="uif"
             title="Use Case for SRv6 Underlay Interface Function">
      <t>Assuming that an operator owns both the IP and optical network, and
      the operator needs to deploy E2E service across IP and optical network,
      with traditional approaches the planning and service provisioning would
      be complex and time consuming due of the manual synergy needed between
      the operator's IP team and optical team. With the popularity of SR and
      SRv6, one straightforward way is to use a SID list that integrates the
      path in both the IP layer and the optical layer.</t>

      <t>As the optical layer is not packet based, normally source routing
      mechanism can not be directly used in the optical network. However, we
      can expose the abstracted optical path and its associated attribute and
      resource information into the network control system of the IP network,
      by using the SRv6 End.XU function defined in this document, so that E2E
      inter-layer paths can be programmed to meet some specific traffic's SLA,
      such as low latency.</t>

      <figure>
        <artwork><![CDATA[             -----          -----          -----
            |  P1 |--------|  P2 |--------|  P3 |
             -----          -----          -----
            /  |.             |.             |.  \
    -----  /   | .            | .            | .  \ -----
   |  P7 |     |  .           |  .           |  .  |  P8 |
    ----- \    |   .          |   .          |   ./ -----
           \   |    .         |    .         |  / .
             -----   .      -----   .      -----   .
            |  P4 |-------|  P5 |--------|  P6 |   .
             -----    .     -----     .    -----     .
               .      .       .       .      .       .
               .    =====      .     =====    .     =====
                .  |  O1 |----------|  O2 |--------|  O3 |
                 .  =====        .   =====      .   =====
                  .    |          .    |         .    |
                   .   |           .   |          .   |
                    .  |            .  |           .  |
                     . |             . |            . |
                      .|              .|             .|
                    =====            =====          =====
                   |  O4 |----------|  O5 |--------|  O6 |
                    =====            =====          =====
          Figure 1. IP and Optical Layered Network Topology
]]></artwork>
      </figure>

      <t/>

      <t>In Figure 1, P1 to P8 are IP nodes, and O1 to O6 are optical nodes.
      Assume we need to deploy a low latency path between P7 and P8. According
      to traditional segment routing in IP layer, perhaps we can choose the
      path along {P7, P1, P2, P3, P8}. But if an optical path from O1 to O3
      exists, and the End.XU function defined in this document is used to
      announce this path into the IP domain with specific attributes, the
      headend node or controller in IP domain can choose the path along {P7,
      P1, END.XU, P3, P8} which provides lower latency than the normal
      paths.</t>

      <t>The creation of the optical path from O1 to O3 may be requested
      either by the headend IP node P7 or the IP network controller (not shown
      in the Figure). The creation should be done by the optical network
      controller (not shown in the Figure), so that P7 or IP network
      controller needs to inform the path requirements to the optical network
      controller. The details of the process are out of scope of this
      document, and may refer to <xref
      target="I-D.ietf-teas-actn-poi-applicability"/>.</t>

      <t>We can also use the topology in Figure 1 to show another use case.
      Assume there are two optical paths between P1 and P2. One is {O1, O2} ,
      and the other is {O1, O4, O5, O2}. We can assign two End.XU functions
      for these two underlay paths separately. One is P1::C2 for the path {O1,
      O2}, and the other is P1::C45 for the path {O1, O4, O5, O2}. The headend
      P7 or the IP network controller will be informed about the two SRv6
      functions and the associated path attributes, so that the headend or the
      controller can program different end-to-end inter-layer paths using
      integrated SID lists for services with different SLA requirement.</t>

      <t>Assume the path {O1, O2} is owned by the operator with a higher
      reliability, and the path {O1, O4, O5, O2} is not totally owned by the
      operator, i.e., they are partly rented. In this use case, for the
      traffic with high reliability requirement, the integrated SID list
      implemented in P7 would be &lt;P1::C2, ... , P8&gt;. The ellipsis means
      some other possible SRv6 functions can be added along the path. For
      traffic with normal reliability requirement, the integrated SID list
      programmed in P7 can be &lt;P1::C45, ... , P8&gt;. Before the
      announcement of the two functions, the node P1 needs to map the P1::C12
      function to the optical path {O1, O2}, and map P1::C45 to the optical
      path {O1, O4, O5, O2}.</t>
    </section>

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

    <!-- security -->

    <section anchor="iana" title="IANA Considerations">
      <t>This document defines a new SRv6 function called END.XU.</t>

      <t>IANA is requested to allocate four new code points from the "SRv6
      Endpoint Behaviors" sub-registry in the "Segment-routing with IPv6 data
      plane (SRv6) Parameters" registry:</t>

      <t><figure>
          <artwork><![CDATA[        +-------+--------+---------------------------+-----------+
        | Value |  Hex   |     Endpoint function     | Reference |
        +-------+--------+---------------------------+-----------+
        |  TBA  |  TBA   |  End.XU (no PSP, no USP)  | [This.ID] |
        |  TBA  |  TBA   |      End.XU with PSP      | [This.ID] |
        |  TBA  |  TBA   |      End.XU with USP      | [This.ID] |
        |  TBA  |  TBA   |    End.XU with PSP&USP    | [This.ID] |
        +-------+--------+---------------------------+-----------+

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

    <section anchor="ack" title="Acknowledgements">
      <t>The authors would like to thank Xiaodong Chang for his review and
      comments.</t>
    </section>
  </middle>

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

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

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

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

      <?rfc include='reference.I-D.ietf-teas-actn-poi-applicability'?>
    </references>
  </back>
</rfc>
