<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">


<?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="no"?>
<?rfc subcompact="no"?>
<?rfc authorship="yes"?>
<?rfc tocappendix="yes"?>
<rfc  xmlns:xi="http://www.w3.org/2001/XInclude" category="std" ipr='trust200902' tocInclude="true"  obsoletes="" updates="5172" consensus="true" submissionType="IETF" xml:lang="en" version="3" docName="draft-thubert-schc-over-ppp-00" >

<front>

   <title abbrev='SCHCoPPP'>SCHC over PPP</title>
   <author initials='P' surname='Thubert' fullname='Pascal Thubert' role='editor'>
      <organization abbrev='Cisco Systems'>Cisco Systems, Inc</organization>
      <address>
         <postal>
            <street>Building D</street>
            <street>45 Allee des Ormes - BP1200 </street>
            <city>Mougins - Sophia Antipolis</city>
            <code>06254</code>
          <country>France</country>
         </postal>
         <phone>+33 497 23 26 34</phone>
         <email>pthubert@cisco.com</email>
      </address>
   </author>
        <date/>

	<area>Internet</area>

	<workgroup>LPWAN</workgroup>

        <abstract>
	  <t>
     This document extends RFC 5172 to signal the use of SCHC as the compression
     method between a pair of nodes over PPP. Combined with RFC 2516, this
     enables the use of SCHC over Ethernet and Wi-Fi.
	  </t>
	</abstract>
    </front>

    <middle>

	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<section anchor='introduction'><name>Introduction</name>

	   <t>
   The Point-to-Point Protocol (PPP) <xref target='RFC5172'/> provides a
   standard method of encapsulating network-layer protocol information over
   serial (point-to-point and bus) links.
   <xref target='RFC2516'>"A Method for Transmitting PPP Over Ethernet (PPPoE)"
   </xref> transports PPP over Ethernet between a pair of nodes.
   It is compatible with a translating bridge to Wi-Fi, and therefore
   enables PPP over Wi-Fi as well.
   </t> <t>
   PPP also proposes an extensible Link Control Protocol and a family
   of Network Control Protocols (NCPs) for establishing and configuring
   different network-layer protocols. <xref target='RFC5072'>"IP Version 6 over
   PPP" </xref> specifies the IPv6 Control Protocol (IPV6CP), which is an NCP
   for a PPP link, and allows for the negotiation of desirable parameters for an
   IPv6 interface over PPP.
   <xref target='RFC5172'>"Negotiation for IPv6 Datagram Compression Using
   IPv6 Control Protocol"</xref> defines the IPv6 datagram compression option
   that can be negotiated by a node on the link through the IPV6CP.
   </t>
   <t>PPP is not commonly used in Low-Power Wide Area Networks (LPWAN) but the
   extreme compression techniques that are defined for use in LPWAN may also
   apply to more traditional links where PPP applies.
   </t>
   <t> The <xref target='RFC8724'>"Static Context Header
   Compression (SCHC) and fragmentation for LPWAN, application to UDP/IPv6"
   </xref> is a new technology that effectively provides an extreme compression
   performance but requires a matching state to be provisionned on both ends
   before it can be operated.
   </t>
   <t>The <xref target='I-D.pelov-lpwan-architecture'>"SCHC Architecture"</xref>
   enables a  peer to peer SCHC operation in addition to the classical device
   to network LPWAN paradigm, e.g., over a PPP connection.
   To enable SCHC over PPP and therefore Ethernet and Wi-Fi, this specification
   extends <xref target='RFC5172'/> to signal SCHC as an additional compression
   method for use over PPP.
   </t>
   <t>
   An example use case for SCHC over PPP over Ethernet (SCHCoPPPoE) is to apply
   SCHC to periodic flows and maintain them at a protocol-independant size and
   rate. The constant size may be too small for a particular flow or protocol.
   The SCHC fragmentation can then be used to transport a protocol data unit
   (PDU) as N compressed SCHC fragments, in which case the effective PDU rate is
   the TSN frame rate divided by N.
   </t>
   <t>
   This can be useful to streamline the
   frames and simplifies the scheduling of Deterministic Networking
   <xref target='RFC8655'/> and Operational Technology (OT) control flows over
   <xref target= "IEEE802.1TSNTG">IEEE Std 802.1 Time-Sensitive Networking (TSN) </xref> or one of the
   <xref target='I-D.thubert-raw-technologies'>RAW Technologies</xref>.
   </t>
    </section>

	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->
	<!-- **************************************************************** -->

<section anchor='bcp'><name>BCP 14</name>
<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>
</section>	<!-- end section "BCP 14" -->


    <section anchor='ext5172'><name>Extending RFC 5172</name>

    <t>
    With this specification, a PPP session defines a vitual link where a SCHC context is established with a particular set of Rules, which is indicated at the set up of the PPP session as follows:
    </t>
   <t>
   <xref target='RFC5172'/> defines an IPV6CP option called the
   IPv6-Compression-Protocol Configuration option with a type of 2. The option
   contains an IPv6-Compression-Protocol field value that indicates a
   compression protocol and an optional data field as shown in
   <xref target='COMP'/>:
   </t>
   <figure anchor='COMP'>
      <name>The IPv6-Compression-Protocol Configuration Option</name>
<artwork align='center'>

    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     |   IPv6-Compression-Protocol   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Data ...
   +-+-+-+-+
</artwork>
   </figure>
   <t>
   This specification indicates a new IPv6-Compression-Protocol field value
   for <xref target='RFC8724'/>
   (see <xref target='IANA'/>), and enables to transport a Uniform
   Resource Identifier (URI) <xref target='RFC3986'/> of the set of rules in the
   optional data. The default format for the set of rules is YANG using the
   <xref target='I-D.ietf-lpwan-schc-yang-data-model'>"Data Model for SCHC"
   </xref> encoded in JSON as specified in <xref target='RFC7951'/>. The size
   of the URL is computed based on the Length of the option as Length-4.
   If the encoding is asymetrical, the initiator of the session is considered
   downstream, playing the role of the device in an LPWAN network.
   </t>

  </section> <!-- Extending RFC 5172 -->


    <section anchor='highspeedprofile'><name>Profiling SCHC for high speed links</name>
    <t>
    Appendix D of <xref target='RFC8724'/> specifies the profile information that
    technology specifications such as this must provide. The following section
    address this requirement.
    </t>

    <section anchor='archi'><name>Mapping the SCHC Architecture</name>

    <!--
       This section lists the information that needs to be provided in the
   LPWAN technology-specific documents.

   *  Most common uses cases, deployment scenarios.

   *  Mapping of the SCHC architectural elements onto the LPWAN
      architecture.

   *  Assessment of LPWAN integrity checking.

   *  Various potential channel conditions for the technology and the
      corresponding recommended use of SCHC C/D and SCHC F/R.
    -->
    <t>
    This specification leverages SCHC between an end point that is an IP Host
    and possibly a serial DTE (Data Terminal Equipment), and another that is an
    IP Node (either another IP Host or a Router) and possibly a serial DCE (Data
    Control Equipment), or a more modern physical or emulated endpoint, e.g.,
    Ethernet devices that echange IP packets over PPPoE.

    </t>
   <t>
    Both endpoints MUST support the function of SCHC Compressor/Decompressor (C/D)
    as shown in <xref target="arch"/>.
    </t>
    <figure anchor='arch'>
      <name>Typical Deployment</name>
<artwork align='center'>
       <![CDATA[
    +----------+  Wi-Fi /   +----------+                ....
    |    IP    |  Ethernet  |    IP    |            ..          )
    |   Host   +-----/------+  Router  +----------(   Internet   )
    | SCHC C/D |  Serial    | SCHC C/D |            (         )
    +----------+            +----------+               ...
                <-- SCHC -->
                  over PPP
]]>
</artwork>
   </figure>

    <t>
    The SCHC Fragmenter/Reassembler (F/R) is generally not needed, because the
    maximum transmission unit (MTU) is expected to be large enough and SCHC only
    reduces the frame size vs. native IP. But it may be used to obtain a small
    protocol-independant frame size for the compressed packets, possibly way
    smaller than MTU.
    </t>

   <t>
    A context may be generated for a particular upper layer application, such as a control loop using an industrial automation protocol, to protect the  particular flow with a DetNet service. The context can be asymetric, e.g., when connecting a primary and a secondary endpoints, a client and a server, or a programmable logic controller with a sensor or an actuator.
   </t>


    <!--


   *  the following parameters need to be addressed in documents other
      than this one but not necessarily in the LPWAN technology-specific
      documents:

      -  The way the Contexts are provisioned.

      -  The way the Rules are generated.
    -->
    </section> <!-- Mapping the SCHC Architecture -->

    <section anchor='parms'><name>SCHC Parameters</name>


    <t>
    Compared to typical LPWANs, most serial links and emulations such as PPPoE
    are very fast and most of the constraints can be alleviated. For this
    reason, the SCHC profile for PPP is defined as follows:
    </t>


    <dl>
    <dt>RuleID numbering scheme:

    </dt>

    <dd>
    <t>
    The RuleID for a compression rule is expressed as 2 bytes. The first
    (leftmost) 2 bits of that RuleId MUST be set to 0  This leaves 14 bits to
    index the rule.
    A SCHC compressed packet is always in the form:
    </t>

    <figure anchor='pack'>
      <name>SCHC Compressed Packet</name>
     <artwork align='center'>
       <![CDATA[
 0                   1
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+----------...--------+~~~~~~~~~~
|0 0         RuleID             | Compression Residue | Payload
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+----------...--------+~~~~~~~~~~
|------- Compressed Header (byte aligned) ------------|
]]>
</artwork>
   </figure>
   <t>
   This specification only supports the No-ACK Mode of SCHC fragmentation as
   specified in section 8.4.1 of <xref target='RFC8724'/>. The SCHC Fragment
   Header is 2 bytes long.
   </t>
   <t>
   The RuleID for a fragmentation rule is expressed as 4 bits. The bits MUST all
   set to 1 for a fragmentation rule in No-ACK Mode. The DTag field is 11 bits
   long (T=11) and the FCN field is one bit (N=1), which is set to 1 on the last
   fragment as illustrated in Appendix B of <xref target='RFC8724'/> and to 0
   otherwise. There is no W field (M=0).
   </t>
    <figure anchor='frag'>
      <name>SCHC Fragment</name>
     <artwork align='center'>
       <![CDATA[
 0                   1
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--------...-------+~~~~~~~~~~~
|1 1 1 1|        DTag         |F| Fragment Payload |  padding
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--------...-------+~~~~~~~~~~~
        |--------- T ---------|N|
|---- SCHC Fragment Header  ----|
   ]]>
   </artwork>
   </figure>
   <t>
   The No-ACK mode has been designed under the assumption that data unit out-of-sequence delivery does not occur between the entity performing fragmentation and the entity performing reassembly and a DetNet
   PREOF function might be needed to reorder the fragments.
   </t>
    </dd>

    <dt>Maximum packet size:
    <!--
   *  maximum packet size that should ever be reconstructed by SCHC
      decompression (MAX_PACKET_SIZE).  See Section 12.
    -->
    </dt>

    <dd>
    MAX_PACKET_SIZE is aligned to the PPP Link MTU.
    </dd>

    <dt>Padding:
    <!--
       *  Padding: size of the L2 Word (for most LPWAN technologies, this
      would be a byte; for some technologies, a bit).
      -->
    </dt>
    <dd>
    The Compression Residue MUST be aligned to the L2 word. For Ethernet, the L2
    word is one byte, so padding is needed up to the next byte boundary. If a
    compression rule produces a residue that is not byte aligned, then it is
    implicitly terminated with a statement that indicates padding till the next
    byte boundary. The padding bit is 0.
    </dd>

    </dl>

  <section><name>Resulting Packet Format</name>


   <t>
   In the case of PPPoE, the sequence of compression and encapsulation
   is as follows:
   </t>


 <figure anchor='encaps'><name>Stack Operation (no fragment)</name>
 <artwork align="center"><![CDATA[
A packet (e.g., an IPv6 packet)
          |                                           ^ (padding bits
          v                                           |    dropped)
 +------------------+                      +--------------------+
 | SCHC Compression |                      | SCHC Decompression |
 +------------------+                      +--------------------+
          |                                           ^
          +--      No        -+                       |
          |   fragmentation   |   +------------------>+
          v                   |   |                   |
 +--------------------+       |   |         +-------------------+
 | SCHC Fragmentation |       |   |         |  SCHC Reassembly  |
 +--------------------+       |   |         +-------------------+
          |                   |   |                   ^
          +<------------------+   |         No        |
          |                       +-- fragmentation  -+
          v                                           |
 +--------------------+                    +--------------------+
 | PPP Session encaps |                    | PPP Session decaps |
 +--------------------+                    +--------------------+
          |                                           ^
          |                                           |
          v                                           |
  +------------------+                      +------------------+
  | PPPoE(oE) encaps |                      | PPPoE(oE) encaps |
  +------------------+                      +------------------+
          |                                           ^
          |                                           |
          +-------------------------------------------+
        Sender                                    Receiver        ]]></artwork>
 </figure>


   <t>
   In the case of PPPoE, a frame that transports an IPv6 packet compressed with SCHC with no fragmentation shows as follows:
   </t>

 <figure anchor='pppoe'><name>SCHC over PPP over Ethernet Format</name>
 <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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  +     Source MAC Address        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                               |                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Destination MAC Address     +
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Ethernet Frame Type(0x8864)   | Ver=1 | Type=1|   Code=0      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     Session ID                |            Length             |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | PPP Protocol (IPv6) = 0x0057  |0|0|       SCHC RuleID         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
 ...                        Compression                          ...
  |                           Residue                       +-+-+-+
  |                                                         | Pad |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  |                                                               |
  |                         Uncompressed                          |
 ...                          Original                           ...
  |                           Payload                             |
  |                                                               |
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ]]></artwork>
 </figure>

  </section><!-- Resulting Packet Format -->

    </section> <!-- Profiling SCHC for high speed links -->

    <section><name>Security Considerations</name>

	<t>This draft enables to use the SCHC compression and fragmentation over
    PPP and therefore Ethernet and Wi-Fi with PPPoE. It inherits the possible
    threats against SCHC listed in the "Security considerations" section of
    <xref target='RFC8724'/>.
	</t>
</section> <!-- SCHC Parameters -->
</section> <!-- Profiling SCHC for high speed links -->

<section anchor='IANA'><name>IANA Considerations</name>


   <t>This document requests the allocation of a new value in the registry
    "IPv6-Compression-Protocol Types" for "SCHC". A suggested value is
    proposed in <xref target="ianacompl"/>:</t>

   <table anchor="ianacompl">
        <name>IP Header Compression Configuration Option Suboption Types</name>
   <thead>
          <tr><th align='center'>Value</th>

          <th align='left'>Description</th>

          <th align='left'>Reference</th></tr>

   </thead><tbody>

          <tr><td align='center'>4</td>

          <td align='left'>Static Context Header Compression (SCHC)</td>

          <td align='left'>This document</td></tr>

   </tbody>
        </table>




</section> <!-- "IANA Considerations"-->


<section><name>Acknowledgments</name>
<t></t>
</section>

    </middle>
    <back>

   <displayreference   target="RFC8655"                             to="DetNet"/>
   <displayreference   target="RFC8724"                             to="SCHC"/>
   <displayreference   target="I-D.ietf-lpwan-schc-yang-data-model" to="SCHC_DATA_MODEL"/>
   <displayreference   target="I-D.thubert-raw-technologies"        to="RAW Technologies"/>

    <references><name>Normative References</name>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2516.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5072.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5172.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8724.xml'/>

    </references>

    <references><name>Informative References</name>
    <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.pelov-lpwan-architecture.xml'/>
      <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-lpwan-schc-yang-data-model.xml'/>
      <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.thubert-raw-technologies.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7951.xml'/>
	  <xi:include href='https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8655.xml'/>

      <reference anchor="IEEE802.1TSNTG" target="https://1.ieee802.org/tsn/">
        <front>
          <title>Time-Sensitive Networking (TSN) Task Group</title>
          <author>
            <organization>IEEE</organization>
          </author>

        </front>
      </reference>

    </references>


    </back>




</rfc>
