<?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-yang-spring-ach6-oam-sr-00"
     ipr="trust200902">
  <front>
    <title abbrev="ACH6 for OAM in SR">ACH6 for OAM in Segment Routing</title>

    <author fullname="Fan Yang" initials="F." surname="Yang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

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

        <email>shirley.yangfan@huawei.com</email>
      </address>
    </author>

    <author fullname="Tianran Zhou" initials="T" surname="Zhou">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

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

        <email>zhoutianran@huawei.com</email>
      </address>
    </author>

    <author fullname="Yali Wang" initials="Y." surname="Wang">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code/>

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

        <email>wangyali11@huawei.com</email>
      </address>
    </author>

    <date day="12" month="July" year="2021"/>

    <workgroup>SPRING Working Group</workgroup>

    <abstract>
      <t>This document defines an OAM toolset encapsulated in ACH6 to provide
      the functions of performance measurement, continuity check and
      verification to an SRv6 path.</t>
    </abstract>

    <note title="Requirements Language">
      <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 BCP 14
      <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when,
      they appear in all capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>ACH6 <xref target="I-D.yang-spring-ach6-sr"/> provides a method of
      supporting an OAM toolset with a unified TLV format in Segment Routing
      over IPv6 network. There are several advantages:</t>

      <t><list style="symbols">
          <t>An Associated Channel ID in ACH6 provides a unified identifier to
          OAM sessions for a specific SRv6 path.</t>

          <t>In Segment Routing networks, ACH6 TLV is proposed to be
          encapsulated in IPv6 Destination Options Header. Together with IPv6
          Segment Routing Header, OAM functions like continuity check and
          performance management can be monitored either hop-by-hop on every
          SR endpoint or end-to-end from the first endpoint to the last.</t>

          <t>By leveraging native semantics of IPv6 extension headers, ACH6
          OAM messages target to be processed in fast path to improve OAM
          accuracy and efficiency.</t>

          <t>By leveraging native semantics of IPv6 extension headers, ACH6
          OAM can help network nodes reduce OAM configurations and session
          management.</t>
        </list></t>

      <t>In this method, ACH6 OAM categorizes OAM functionalities into three
      types of messages, including On-demand Echo Request/Reply, Proactive
      Continuity Check and Performance Measurement.</t>
    </section>

    <section title="Terminology">
      <t>This document uses the following terms:</t>

      <t>OAM: Operations, Administration, and Maintenance</t>

      <t>ACH6: Associated CHannel over IPv6</t>
    </section>

    <section title="ACH6 OAM for SRv6">
      <t/>

      <section title="ACH6 OAM Message">
        <t>Figure 1 defines the format of ACH6 OAM message.</t>

        <t/>

        <t><figure align="center">
            <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 
                                +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   
                                |       Channel Type = TBA      |    
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
~                      Associated Channel ID                    ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                                                               ~
~                   OAM Message Body (Variable)                 ~
~                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ]]></artwork>

            <postamble>Figure 1 ACH6 OAM Message Format</postamble>
          </figure></t>

        <t>ACH6 Channel Type indicates which type of OAM message is
        encapsulated in the following OAM message body, and OAM message body
        contains the OAM messages. Three types of OAM messages are
        defined:</t>

        <t><list style="symbols">
            <t>TBA 1 = On-demand Echo Request/Reply</t>

            <t>TBA 2 = Proactive Continuity Check</t>

            <t>TBA 3 = Performance Measurement</t>
          </list></t>
      </section>

      <section title="ACH6 On-Demand Echo Request/Reply">
        <t>On-demand Echo Request/Reply provides a method of on-demand
        continuity check and connectivity verification. Figure 2 defines ACH6
        OAM format of On-demand Echo Request/Reply message.</t>

        <t><figure align="center">
            <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 
                                +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
                                |      Channel Type = TBA1      |    
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
~                     Associated Channel ID                     ~ 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    
| Echo Req/Rep  |   Reply Mode  |  Return Code  |   Reserved    |    
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    
|                       Sequence Number                         |   
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                      sub-TLVs (optional)                      ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ]]></artwork>

            <postamble>Figure 2 ACH6 OAM On Demand Echo Request/Reply
            Message</postamble>
          </figure></t>

        <t>Associated Channel ID: indicates the identifier of OAM session.
        </t>

        <t>Message Type:</t>

        <t><list style="symbols">
            <t>1 = Echo Request</t>

            <t>2 = Echo Reply</t>
          </list>Reply Mode:</t>

        <t><list style="symbols">
            <t>1 = Do not reply</t>

            <t>2 = Reply via an IPv6 UDP packet</t>

            <t>3 = Reply via an IPv6 packet without payload</t>

            <t>4 = Reply via application-level control channel</t>
          </list></t>

        <t>Return code:</t>

        <t><list style="symbols">
            <t>0 = No return code</t>

            <t>1 = Malformed echo request received</t>

            <t>2 = One or more of the TLVs was not understood</t>

            <t>3 = Packet-rorward-success</t>

            <t>4 = No route to destination</t>

            <t>5 = Communication with destination administratively
            prohibited</t>

            <t>6 = Beyond scope of source address</t>

            <t>7 = Address unreachable</t>

            <t>8 = Port unreachable</t>

            <t>9 = Source address failed ingress/egress policy</t>

            <t>10 = Reject route to destination</t>

            <t>11 = Exceeding the minimum IPv6 MTU</t>

            <t>12 = Hop limit exceeded in transit</t>

            <t>13 = Fragment reassembly time exceeded</t>

            <t>14 = Erroneous header field encountered</t>

            <t>15 = Unrecognized Next Header type encountered</t>

            <t>16 = Unrecognized IPv6 option encountered</t>
          </list></t>

        <t>Sequence number: is allocated by the sender of echo request to
        detect whether the reply packet is lost.</t>
      </section>

      <section title="ACH6 Proactive Continuity Check">
        <t>Proactive Continuity Check provides a method of proactive
        continuity check to continuously detect the path status and fault.
        Figure 3 defines ACH6 OAM format of Proactive Continuity Check
        message.</t>

        <t><figure align="center">
            <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 
                                +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
                                |       Channel Type = TBA2     | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
~                  Associated Channel ID                        ~ 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|   Diag  |Sta|  Flag |      Reserved           |  Detect Multi | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                   Desired Min TX Interval                     | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                  Required Min TX Interval                     | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                Required Min Echo RX Interval                  | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ]]></artwork>

            <postamble>Figure 3 ACH6 OAM ProCC Message</postamble>
          </figure></t>

        <t>Associated Channel ID: indicates the identifier of OAM session.
        </t>

        <t>Diag:</t>

        <t><list style="symbols">
            <t>0 = no diagnostic</t>

            <t>1 = control detection time expired</t>

            <t>2 = echo function failed</t>

            <t>3 = neighbor signaled session down</t>

            <t>4 = forwarding plane reset</t>

            <t>5 = path down</t>

            <t>6 = concatenated path down</t>

            <t>7 = administratively down</t>

            <t>8 = reverse concatenated path down</t>

            <t>9-31 = reserved for future use</t>
          </list>State:</t>

        <t><list style="symbols">
            <t>0 = adminDown</t>

            <t>1 = down</t>

            <t>2 = Init</t>

            <t>3 = up</t>
          </list></t>

        <t>Flag:</t>

        <t><list style="symbols">
            <t>P flag: if set, the transmitting node is requesting
            verification of connectivity, or of a parameter change, and is
            expecting a packet with the F bit in reply. If clear, the
            transmitting node is not requesting verification.</t>

            <t>F flag: if set, the transmitting node is responding to a
            received Proactive Continuity Check packet that had the P bit set.
            If clear, the transmitting node is not responding to a requesting
            packet that had the P bit set.</t>

            <t>D flag: if set, Demand mode is active in the transmitting node.
            The node wishes to operate in Demand mode and direct the remote
            node to cease the periodic transmission of Proactive Continuity
            Check packets. If clear, Demand mode is not active in the
            transmitting node.</t>

            <t>M flag: this bit is reserved for future point-to-multipoint
            extensions to ACH6 Proactive Continuity Check. It MUST be zero on
            both transmit and receipt.</t>
          </list></t>

        <t>Detect Mult: detection time multiplier.</t>

        <t>Desired Min TX Interval: this is the minimum interval, in
        microseconds, that the local system would like to use when
        transmitting ACH6 Proactive Continuity Check packets.</t>

        <t>Required Min RX Interval: this is the minimum interval, in
        microseconds, between received ACH6 Proactive Continuity Check packets
        that this system is capable of supporting, less any jitter applied by
        the sender.</t>

        <t>Required Min Echo RX Interval: this is the minimum interval, in
        microseconds, between received Echo packets that this system is
        capable of supporting, less any jitter applied by the sender.</t>
      </section>

      <section title="ACH6 Performance Measurement">
        <t>Performance Measurement provides a method of measuring packet loss
        and delay. Figure 4 defines ACH6 OAM format of Performance Measurement
        message.</t>

        <t><figure align="center">
            <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 
                                +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
                                |       Channel Type = TBA3     | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
~                   Associated Channel ID                       ~ 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   
|                  Sender Sequence Number                       |              
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    
|                  Reflector Sequence Number                    |              
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
~                         TimeStamp1                            ~          
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
~                         TimeStamp2                            ~      
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                         TimeStamp3                            ~  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                         TimeStamp4                            ~  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Padding (MBZ, variable)                    |              
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>

            <postamble>Figure 4 ACH6 OAM Performance Measurement
            Message</postamble>
          </figure></t>

        <t>Associated Channel ID: indicates the identifier of OAM session.
        </t>

        <t>Sender Sequence Number: the counter of performance measurement test
        packets sent from sender</t>

        <t>Reflector Sequence Number: the counter of performace measurement
        test packets set by reflector</t>

        <t>Timestamp 1-4: When a query is sent from A, timestamp 1 is set to
        T1, timestamp 2-4 fields are set to 0. When the query is received at
        B, timestamp 2 is set to T2. In this case, B copies timestamp 1 to
        timestamp 3, copies timestamp 2 to timestamp 4, and initializes
        timestamp 1 and timestamp 2 to 0. When B sends a response, timestamp 1
        is set to T3. When a response is received at A, timestamp 2 is set to
        T4.</t>
      </section>
    </section>

    <section title="IANA Considerations">
      <t><list style="symbols">
          <t>This document requests IANA to assign a codepoint of On-demand
          Echo Request/Reply of ACH6 Channel Types.</t>

          <t>This document requests IANA to assign a codepoint of Proactive
          Continuity Check of ACH6 Channel Types.</t>

          <t>This document requests IANA to assign a codepoint of Performance
          Measurement of ACH6 Channel Types.</t>
        </list></t>
    </section>

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

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

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

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

      <?rfc ?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.yang-spring-ach6-sr'?>

      <?rfc 
?>
    </references>
  </back>
</rfc>
