<?xml version="1.0" encoding="utf-8"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC1570 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1570.xml">
<!ENTITY RFC1692 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1692.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3153 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3153.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC4170 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4170.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-saldana-tsvwg-simplemux-05" ipr="trust200811">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

<front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="Simplemux">Simplemux. A generic multiplexing protocol</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Jose Saldana" initials="J." surname="Saldana">
      <organization>University of Zaragoza</organization>
      <address>
        <postal>
          <street>Dpt. IEC Ada Byron Building</street>
          <!-- Reorder these if your country does things differently -->
          <city>Zaragoza</city>
          <region></region>
          <code>50018</code>
          <country>Spain</country>
        </postal>
        <phone>+34 976 762 698</phone>
        <email>jsaldana@unizar.es</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
 

    <date month="July" year="2016" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
   in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>Transport</area>

    <workgroup>Transport Area Working Group</workgroup>

    <!-- WG name at the upperleft corner of the doc,
   IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
    which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>multiplexing</keyword>
    <keyword>small-packet flows</keyword>
    <keyword>simplemux</keyword>
    <keyword>aggregation</keyword>
    
    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
        <t>The high amount of small packets present in nowaday's networks results
        in a low efficiency, when the size of the headers and the payload are in
        the same order of magnitude.
        In some situations, multiplexing a number of small packets into a 
        bigger one is desirable in order to improve the efficiency. For example, 
        a number of small packets can be sent together
        between a pair of machines if they share a common network path. Thus, the traffic profile
        can be shifted from small to larger packets, reducing the network overhead and the
        number of packets per second to be managed by intermediate routers.</t>
	 
        <t>This document describes Simplemux, a protocol able to encapsulate a number of packets
        belonging to different protocols into a single packet. Small headers (separators) are 
        added at the beginning of each multiplexed packet, including some flags, the length and 
        a “Protocol” field. This allows the inclusion of a number of packets belonging to
        different protocols (multiplexed packets) on a packet of another protocol (tunneling
        protocol).</t>
	 
        <t>In order to reduce the overhead, the size of the multiplexing headers is kept very 
        low (it may be a single byte when multiplexing small packets).</t>
    </abstract>
</front>


<middle>
	<section title="Introduction">
    <t>The high amount of small packets present in nowaday's networks results
    in a low efficiency, when the size of the headers and the payload are in
    the same order of magnitude.
    In some situations, multiplexing a number of small packets into a 
    bigger one is desirable in order to improve the efficiency. For example, a 
    number of small packets can be sent together
    between a pair of machines if they share a common network path. Thus, the traffic profile
    can be shifted from small to larger packets, reducing the network overhead and the
    number of packets per second to be managed by intermediate routers.</t>
     
    <t>This document describes Simplemux, a protocol able to encapsulate a number of packets
    belonging to different protocols into a single packet. This can be useful e.g. for
    grouping small packets and thus reducing the number of packets per second in a network.</t>
	 	
    <t>Simplemux is a generic multiplexing protocol, i.e. it can be used to aggregate
    a number of packets belonging to a protocol, on a single packet belonging to other (or the same)
    protocol. Thus, in this document we will talk about the “multiplexed” protocol, and the “tunneling”
    protocol, being Simplemux the “multiplexing” protocol. The “external header” will be 
    the one of the “tunneling” protocol (see <xref target="headers"> the figure</xref>)</t>
	 	
<figure align="center" anchor="headers">
        	<preamble></preamble>
        	<artwork align="center"><![CDATA[
                                  
    +--------------------------------+
    |       Multiplexed Packet       |     Multiplexed protocol
    +--------------------------------+
    |           Simplemux            |     Multiplexing protocol
    +--------------------------------+
    |       Tunneling header         |     Tunneling protocol
    +--------------------------------+

                        ]]></artwork>
        	<postamble></postamble>
</figure>	

		<t>As an example, if a number of small IPv6 packets have to travel over an IPv4 network,
	 	they can be multiplexed into a single IPv4 packet. In this case, IPv4 is the “tunneling”
	 	protocol and IPv6 is the “multiplexed” protocol. The IPv4 header is called in this case the
	 	“tunneling” or the “external” header. The simplified scheme of this packet would be:</t>
			
		<t>|IPv4 hdr||Simplemux hdr|IPv6 packet||Simplemux hdr|IPv6 packet||...|</t>

 		<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="Existing multiplexing protocols">		
	 		<t>Different multiplexing protocols have been approved by the IETF in the past:</t>

      <t><list style="symbols">
		    <t><xref target="RFC1692">TMux</xref></t>
		  </list> </t>
	
    	<t>TMux is able to combine multiple short transport 
    	segments, independent of application type, and send them between a server and host pair.
    	As stated in the reference, “The TMux protocol is intended to optimize the transmission of large
    	numbers of small data packets. In particular, communication load is not measured only in bits per
    	seconds but also in packets per seconds, and in many situation the
    	latter is the true performance limit, not the former. The proposed
    	multiplexing is aimed at alleviating this situation.”</t>
    	 	
    	<t>A TMux message appears as:</t>
    
    	<t>|IP hdr||TMux hdr|Transport segment||TMux hdr|Transport segment||...|</t>
    		
    	<t>Therefore, the Transport Segment is not an entire IP packet, since it does not include the IP header.</t>
    
    	<t>TMux works “between a server and host pair”, so it multiplexes a number of segments between 
    	the same pair of machines. However, there are scenarios where a number of low-efficiency flows
    	share a common path, but they are not sent between the same pair of machines.</t>

      <t><list style="symbols">
		    <t><xref target="RFC3153">PPPMux</xref></t>
		  </list> </t>
   		
    	<t>PPPMux “sends multiple PPP encapsulated packets
   		in a single PPP frame. As a result, the PPP overhead per packet is
   		reduced.” Thus, it is able to multiplex complete IP packets, using separators.</t>
   			
   		<t>However, the use of PPPMux requires the use of PPP and L2TP in order to multiplex a number
   		of packets together, as done in <xref target="RFC4170">TCRTP</xref>. Thus, it introduces
   		more overhead and complexity.</t>
 
    	<t>An IP packet including a number of them using PPPMux appears as:</t>
    
    	<t>|IP hdr|L2TP hdr|PPP hdr||PPPMux hdr|packet||PPPMux hdr|packet||...|</t>
  			
   		<t>The scheme proposed by PPPMux is similar to the Compound-Frames of <xref target="RFC1570">
   		PPP LCP Extensions</xref>. The key differences are that PPPMux is more efficient and that it 
   		allows concatenation of variable sized frames.</t>
   			
			<figure align="center" >
        	<preamble></preamble>
        	<artwork align="center"><![CDATA[
***
                      ]]></artwork>
        	<postamble></postamble>
			</figure>
			
   		<t>The definition of a protocol able to multiplex complete packets, avoiding the need
   		of other protocols as PPP is seen as convenient. The multiplexed packets can be of any kind, 
   		since a “Protocol Number” field can be added to each of them. Not all the packets multiplexed in 
   		the same one must belong to the same protocol. The general scheme of Simplemux is:</t>
   			
			<t>|tunnel hdr||Simplemux hdr|packet||Simplemux hdr|packet||...|</t>

			<t>The Simplemux header includes the “Protocol Number” field, so it permits the multiplexing of different
			kinds of packets in the same bundle.</t>
			
			<t>We will also refer to the Simplemux header with the terms “separator”, “Simplemux separator”
			or “mux separator”. In the figures we will also use the abbreviation “Smux”.</t>
			
			<t>When applied to IP packets, the scheme of a multiplexed packet becomes:</t>
			
			<t>|tunnel hdr||Simplemux hdr|IP packet||Simplemux hdr|IP packet||...|</t>
		</section>

		<section title="Benefits of multiplexing">
   		<t>The benefits of multiplexing are:</t>

			<t>- Tunneling a number of packets together. If a number of packets have to be
			tunneled through a network segment, they can be multiplexed and then sent together
			using a single external header. This will avoid the need for adding a tunneling header
			to each of the packets, thus reducing the overhead.</t>
			
      <t>- Reduction of the amount of packets per second in the network. It is 
      desirable for two main reasons: first, network equipment has a limitation in terms of 
      the number of packets per second it can manage, i.e. many devices are not able to 
      send small packets back to back due to processing delay.</t>
            
      <t>- Bandwidth reduction. The presence of high rates of tiny packets translate into an 
      inefficient usage of network resources, so there is a need for mechanisms able to reduce 
      the overhead introduced by low-efficiency flows. When combined with header compression,
      as done in <xref target="RFC4170">TCRTP</xref> multiplexing may produce significant 
      bandwidth savings, which are interesting for network operators, since they may alleviate 
      the traffic load in their networks.</t>           
            
      <t>- Energy savings: a lower amount of packets per second will reduce 
      energy consumption in network equipment since, 
      according to <xref target="Bolla"></xref>, internal packet processing engines and 
      switching fabric require 60% and 18% of the power consumption of high-end routers 
      respectively. Thus, reducing the number of packets to be managed and switched will 
      reduce the overall energy consumption. The measurements deployed in <xref target="Chabarek">
      </xref>on commercial routers corroborate this: 
      a study using different packet sizes was presented, and the tests with big packets showed 
      that energy consumption gets reduced, since a non-negligible amount of energy is 
      associated to header processing tasks, and not only to the sending of the packet itself.</t>
		</section>
	</section>
			
	<section title="Description of the scenario">

		<t>Simplemux works between a pair of machines. It creates a tunnel between an “ingress” and
		an “egress”. They MAY be the endpoints of the 
		communication, but they MAY also be middleboxes able to multiplex packets belonging to
		different flows. Different mechanisms MAY be used in order to classify flows according 
		to some criteria (sharing a common path, kind of service, etc.) and to select 
		the flows to be multiplexed and sent to the egress (see <xref target="simplemux_scheme">
		</xref>).</t>
			
<figure align="center" anchor="simplemux_scheme">
        	<preamble></preamble>
        	<artwork align="center"><![CDATA[
+-------+                                  
|       |       +---------+                          +---------+ 
|       | --->  |Simplemux|        _  _              |Simplemux| -->
|classif| --->  | ingress | ===>  ( `   )_     ===>  | egress  | -->
|       |       +---------+      (  Network  `)      +---------+    
|       | --------------------> (_   (_ .  _) _)  ----------------->      
+-------+
                           <--------Simplemux-------->

                        ]]></artwork>
        	<postamble></postamble>
</figure>	
		</section>
		
		<section title="Protocol description">			
			<t>A Simplemux packet consists of:</t>
		
			<t>- An external header which is used as the tunneling header for the whole packet.</t>

			<t>- A series of pairs “Simplemux header” + “packet” of the multiplexed protocol.</t>

			<t>This is the scheme of a Simplemux packet:</t>
			
			<t>|tun hdr||Simplemux hdr|packet||Simplemux hdr|packet||...|</t>
			
			<t>The Simplemux header has two different forms: one for the “First Simplemux header”, and another
			one for the rest of the Simplemux headers (called “Non-first Simplemux headers”):</t>

      <t><list style="symbols">
		    <t>First Simplemux header (after the tunneling header, and before the first multiplexed packet):</t>
		  </list></t>	
            
        <t>In order to allow the multiplexing of packets of any length, the number of bytes expressing
        the length is variable, and a field called Length Extension (LXT, one bit) is used to flag if the
        current byte is the last one including length information. This is the structure of a First
        Simplemux header:</t>
            
    		<t>|SPB(1 bit)|LXT(1 bit)|length (6 bits)||LXT(1 bit)|length (7 bits)||...||Protocol (8 bits)|</t>
    		
    		<t>- Single Protocol Bit (SPB, one bit) only appears in the first Simplemux header. It
    		is set to 1 if all the multiplexed packets belong to the same protocol (in this case, the “Protocol” 
    		field will only appear in the first Simplemux header). It is set to 0 when each packet MAY belong to 
    		a different protocol.</t>
     
    		<t>- Length Extension (LXT, one bit) is 0 if the current byte is the last byte where the length
        of the first packet is included, and 1 in other case.</t>
     
        <t>- Length (LEN, 6, 13, 20, etc. bits): This is the length of the multiplexed packet (in bytes), not 
        including the length field. If the length of the multiplexed packet is less than 64 bytes (less than or 
        equal to 63 bytes), the first LXT is set to 0 and the 6 bits of the length field are the
        length of the multiplexed packet. If the length of the multiplexed packet is equal or greater than
        64 bytes, additional bytes are added. The first bit of each of the added bytes is the LXT. If LXT is 
        set to 1, it means that there is an additional byte for expressing the length. This allows to multiplex
        packets of any length (see the next figures).</t> 
    
    		<t>- Protocol (8 bits) is the Protocol field of the multiplexed packet, according to
   			IANA “Assigned Internet Protocol Numbers”.</t>
    
        <t>As an example, a First Simplemux header before a packet smaller than 64 (2^6) bytes would 
        be 2 bytes long:</t>

<figure align="center" anchor="header_first_short">
        	<preamble></preamble>
        	<artwork align="left"><![CDATA[                              
    0                   1           
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |S|L|           |               |
   |P|X|  Length   |   Protocol    |
   |B|T| (6 bits)  |   (8 bits)    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ^
      0
                        ]]></artwork>
        	<postamble></postamble>
</figure>	

				<t>A First Simplemux header before a packet greater or equal than 64 bytes, and smaller than 
        8192 bytes (2^13) will be 3 bytes long:</t>

<figure align="center" anchor="header_first_two_bytes">
        	<preamble></preamble>
        	<artwork align="left"><![CDATA[                             
    0                   1                   2    
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3     
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |S|L|           |L|             |               |
   |P|X| Length 1  |X|  Length 2   |   Protocol    |
   |B|T| (6 bits)  |T|  (7 bits)   |   (8 bits)    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ^             ^
      1             0
                        ]]></artwork>
        	<postamble></postamble>
</figure>			

        <t>In this case, the length of the packet will be the number expressed by the concatenation of the bits of
        Length 1 - Length 2 (total 13 bits). Length 1 includes the 6 most significant bits and Length 2 the 7 less
        significant bits.</t>
            
        <t>A First Simplemux header before a packet greater of equal than 8192 bytes, and smaller than
        1048576 bytes (2^20) would be 4 bytes long:</t>

<figure align="center" anchor="header_first_three_bytes">
        	<preamble></preamble>
        	<artwork align="left">
                <![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     
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |S|L|           |L|             |L|             |               |
   |P|X| Length 1  |X|  Length 2   |X|  Length 3   |   Protocol    |
   |B|T| (6 bits)  |T|  (7 bits)   |T|  (7 bits)   |   (8 bits)    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ^             ^               ^
      1             1               0
                        ]]></artwork>
        	<postamble></postamble>
</figure>
            
        <t>In this case, the length of the packet will be the number expressed by the concatenation of the bits of
        Length 1 - Length 2 - Length 3 (total 20 bits). Length 1 includes the 6 most significant bits and Length 3 
        the less 7 significant bits.</t>
            
        <t>More bytes can be added to the length if required, using the same scheme: 1 LXT byte plus 7 bits for
        expressing the length.</t>
                    
        <t><list style="symbols">
      		<t>Subsequent (Non-first) Simplemux headers (before the other packets):</t>
    		</list></t>			    
               
        <t>The Non-first Simplemux headers also employ a format allowing the multiplexing of packets of any 
        length, so the number of bytes expressing the length is variable, and the field Length Extension 
        (LXT, one bit) is used to flag if the current byte is the last one including length information.
        This is the structure of a Non-first Simplemux header:</t>
            
        <t>|LXT(1 bit)|length (7 bits)||LXT(1 bit)|length (7 bits)||...||Protocol (8 bits, optional)|</t>
            
     		<t>- Length Extension (LXT, one bit) is 0 if the current byte is the last byte where the length
        of the packet is included, and 1 in other case.</t>
    
        <t>- Length (LEN, 7, 14, 21, etc. bits): This is the length of the multiplexed packet (in bytes), not 
        including the length field. If the length of the multiplexed packet is  less than 128 bytes (less than or 
        equal to 127 bytes), LXT is set to 0 and the 7 bits of the length field represent the
        length of the multiplexed packet. If the length of the multiplexed packet is greater than
        127 bytes, additional bytes are added. The first bit of each of the added bytes is the LXT. If LXT is 
        set to 1, it means that there is an additional byte for expressing the length. This allows to multiplex
        packets of any length (see the next figures).</t> 
    
    		<t>- Protocol (8 bits) is the Protocol field of the multiplexed packet, according to
    		IANA “Assigned Internet Protocol Numbers”. It only appears in Non-first headers if the Single 
    		Protocol Bit (SPB) of the First Simplemux header is set to 1.</t>

    		<t>As an example, a Non-first Simplemux header before a packet smaller than 128 bytes, when
    		the protocol bit has been set to 0 in the first header, would be 1 byte long:</t>

<figure align="center" anchor="header_non-first_short">
        	<preamble></preamble>
        	<artwork align="left"><![CDATA[                                 
    0                   
    0 1 2 3 4 5 6 7  
   +-+-+-+-+-+-+-+-+
   |L|             |
   |X|   Length    |
   |T|  (7 bits)   |  
   +-+-+-+-+-+-+-+-+
    ^
    0
    
SPB = 0 in the first header
                        ]]></artwork>
        	<postamble></postamble>
</figure>	

        <t>A Non-first Simplemux header before a packet greater or equal than 128 bytes, and
        smaller than 16384 (2^14), when the protocol bit has been set to 0 in the first header,
        will be 2 bytes long:</t>

<figure align="center" anchor="header_non-first_long">
        	<preamble></preamble>
        	<artwork align="left">
                <![CDATA[                                 
    0                   1           
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5    
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |L|             |L|             |
   |X|  Length 1   |X|  Length 2   |
   |T|  (7 bits)   |T|  (7 bits)   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ^               ^
    1               0
    
SPB = 0 in the first header
                        ]]></artwork>
        	<postamble></postamble>
</figure>

            <t>A Non-first Simplemux header before a packet greater of equal than 16384 bytes, and smaller than
            2097152 bytes (2^21), when the protocol bit has been set to 0 in the first header, will be
            3 bytes long:</t>

<figure align="center" anchor="header_non-first_three_bytes">
        	<preamble></preamble>
        	<artwork align="left">
                <![CDATA[                             
    0                   1                   2         
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3     
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |L|             |L|             |L|             |
   |X|  Length 1   |X|  Length 2   |X|  Length 3   | 
   |T|  (7 bits)   |T|  (7 bits)   |T|  (7 bits)   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ^               ^               ^
    1               1               0
        
SPB = 0 in the first header
                        ]]></artwork>
        	<postamble></postamble>
</figure>            
        <t>In this case, the length of the packet will be the number expressed by the concatenation of the bits of
        Length 1 - Length 2 - Length 3 (total 21 bits). Length 1 includes the 7 most significant bits and Length 3 
        the 7 less significant bits.</t>
            
        <t>More bytes can be added to the length if required, using the same scheme: 1 LXT byte plus 7 bits for
        expressing the length.</t>
                     
    		<t>A Non-first Simplemux header before a packet smaller than 128 bytes, when
    		the protocol bit has been set to 1 in the first header, will be 2 bytes long:</t>

<figure align="center" anchor="header_non-first_short_protocol">
        	<preamble></preamble>
        	<artwork align="left"><![CDATA[                                 
    0                   1           
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |L|             |               |
   |X|   Length    |   Protocol    |
   |T|  (7 bits)   |   (8 bits)    |  
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ^
    0

SPB = 1 in the first header
                        ]]></artwork>
        	<postamble></postamble>
</figure>

    		<t>A Non-first Simplemux header before a packet greater or equal than 128 bytes,
        and smaller than 16384 (2^14), when
    		the protocol bit has been set to 1 in the first header, will be 3 bytes long:</t>

<figure align="center" anchor="header_non-first_long_protocol">
        	<preamble></preamble>
        	<artwork align="left">
                <![CDATA[                                 
    0                   1                   2    
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3     
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |L|             |L|             |               |
   |X|  Length 1   |X|  Length 2   |   Protocol    |
   |T|  (7 bits)   |T|  (7 bits)   |   (8 bits)    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ^               ^
    1               0
    
SPB = 1 in the first header
                        ]]></artwork>
        	<postamble></postamble>
</figure>

            <t>A Non-first Simplemux header before a packet greater of equal than 16384 bytes, and smaller than
            2097152 bytes (2^21), when the protocol bit has been set to 1 in the first header, will be
            4 bytes long:</t>

<figure align="center" anchor="header_non_first_three_bytes_protocol">
        	<preamble></preamble>
        	<artwork align="left">
                <![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    
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |L|             |L|             |L|             |               |
   |X|  Length 1   |X|  Length 2   |X|  Length 3   |   Protocol    | 
   |T|  (7 bits)   |T|  (7 bits)   |T|  (7 bits)   |   (8 bits)    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ^               ^               ^
    1               1               0
    
SPB = 1 in the first header
                        ]]></artwork>
        	<postamble></postamble>
</figure>     
       
            <t>In this case, the length of the packet will be the number expressed by the concatenation of the bits of
            Length 1 - Length 2 - Length 3 (total 21 bits). Length 1 includes the 7 most significant bits and Length 3 
            the 7 less significant bits.</t>
            
            <t>More bytes can be added to the length if required, using the same scheme: 1 LXT byte plus 7 bits for
            expressing the length.</t>
            
            <t>These would be some examples of the whole bundles:</t>
                 
            <t>Case 1: All the packets belong to the same protocol: The first Simplemux header would 
            be 2 or 3 bytes (for usual packet sizes), and the other Simplemux headers would be 1 or 2 bytes. 
            For small packets (&lt; 128 bytes), the Simplemux header would only require one byte.</t>

<figure align="center" anchor="packet_no-prot">
        	<preamble></preamble>
        	<artwork align="left"><![CDATA[
                                  
|tun||0|0|len|Protocol|pkt||0|len|pkt||1|len|0|len|pkt||...|
           |                   |          |     |
           v                   v          v     v
        (6 bits)             (7 bits)    (14 bits)

             
|tun||0|1|len|0|len|Protocol|pkt||0|len|pkt||1|len|0|len|pkt||...|
           |     |                   |          |     |
           v     v                   v          v     v
          (13 bits)               (7 bits)     (14 bits)
                
                        ]]></artwork>
        	<postamble></postamble>
</figure>
                
                 
            <t>Case 2: Each packet may belong to a different protocol: All the Simplemux headers would 
            be 2 or 3 bytes (for usual packet sizes).</t>

<figure align="center" anchor="packet_prot">
        	<preamble></preamble>
        	<artwork align="left"><![CDATA[
                                  
|tun||1|0|len|Prot|pkt||0|len|Prot|pkt||1|len|0|len|Prot|pkt||...|
           |               |               |     |
           v               v               v     v
        (6 bits)         (7 bits)         (14 bits)


|tun||1|1|len|0|len|Prot|pkt||0|len|Prot|pkt||1|len|0|len|Prot|pkt||...|
           |     |               |               |     |
           v     v               v               v     v
          (13 bits)           (7 bits)          (14 bits)             
                
                        ]]></artwork>
        	<postamble></postamble>
</figure>
                
                 
    </section>


    <!-- section anchor="Contributing_Authors" title="Contributing Authors"-->
   
    <!-- /section -->


    <section anchor="Acknowledgements" title="Acknowledgements">
        <t>Jose Saldana was funded by the EU H2020 Wi-5 project (Grant Agreement no: 644262).</t>
    </section>

    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
        <t>A protocol number for Simplemux should be requested to IANA.</t>
      
        <t>As a provisional solution for IP networks, the ingress and the egress
        optimizers may agree on a UDP port, and use IP/UDP as the multiplexing
        protocol.</t>
    </section>

    <section anchor="Security" title="Security Considerations"> 
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

  <references title="Normative References">
		&RFC1570;
		&RFC1692;
    &RFC2119;
    &RFC3153;
    &RFC4170;
	</references>  
    
	<references title="Informative References">
      
    	<reference anchor="Bolla">
        <front>
          <title>Energy Efficiency in the Future Internet: A Survey of Existing Approaches and Trends in
			    Energy-Aware Fixed Network Infrastructures</title>
          <author initials="R." surname="Bolla">
            <organization>University of Genoa, Italy</organization>
          </author>
          <author initials="R." surname="Bruschi">
            <organization>University of Genoa, Italy</organization>
          </author>
          <author initials="F." surname="Davoli">
            <organization>University of Genoa, Italy</organization>
          </author>
          <author initials="F." surname="Cucchietti">
            <organization>Telecom Italia, Italy</organization>
          </author>
		  <date year="2011" />
        </front>
        <seriesInfo name="IEEE Communications Surveys and Tutorials" value="vol.13, no.2, pp.223,244" />
      </reference>
    
      <reference anchor="Chabarek" target="">
        <front>
          <title>Power Awareness in Network Design and Routing</title>
          <author initials="J." surname="Chabarek">
            <organization>Univ. of Wisconsin-Madison, Madison, WI</organization>
          </author>
          <author initials="J." surname="Sommers">
            <organization>Univ. of Wisconsin-Madison, Madison, WI</organization>
          </author>
          <author initials="P." surname="Barford">
            <organization>Univ. of Wisconsin-Madison, Madison, WI</organization>
          </author>
          <author initials="C." surname="Estan">
            <organization>Univ. of Wisconsin-Madison, Madison, WI</organization>
          </author>
          <author initials="D." surname="Tsiang">
            <organization>Univ. of Wisconsin-Madison, Madison, WI</organization>
          </author>
          <author initials="S." surname="Wright">
            <organization>Univ. of Wisconsin-Madison, Madison, WI</organization>
          </author>
		  <date year="2008" />
        </front>
        <seriesInfo name="INFOCOM 2008. The 27th Conference on Computer 
        Communications. IEEE" value="pp.457,465" />
      </reference>
</references>


    <!-- Change Log

v00 2006-03-15  EBD   Initial version

v01 2006-04-03  EBD   Moved PI location back to position 1 -
                      v3.1 of XMLmind is better with them at this location.
v02 2007-03-07  AH    removed extraneous nested_list attribute,
                      other minor corrections
v03 2007-03-09  EBD   Added comments on null IANA sections and fixed heading capitalization.
                      Modified comments around figure to reflect non-implementation of
                      figure indent control.  Put in reference using anchor="DOMINATION".
                      Fixed up the date specification comments to reflect current truth.
v04 2007-03-09 AH     Major changes: shortened discussion of PIs,
                      added discussion of rfc include.
v05 2007-03-10 EBD    Added preamble to C program example to tell about ABNF and alternative 
                      images. Removed meta-characters from comments (causes problems).  -->
  </back>
</rfc>
