<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" consensus="true" ipr="trust200902" docName="draft-dreibholz-ipv4-flowlabel-44" obsoletes="" updates="" xml:lang="en" tocInclude="true" symRefs="true" version="3">
 <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
 <front>
  <title>An IPv4 Flowlabel Option</title>
  <seriesInfo name="Internet-Draft" value="draft-dreibholz-ipv4-flowlabel-44" />
  <!-- ************** THOMAS DREIBHOLZ *************** -->
  <author initials="T." surname="Dreibholz" fullname="Thomas Dreibholz">
   <organization abbrev="SimulaMet">Simula Metropolitan Centre for Digital Engineering</organization>
   <address>
    <postal>
     <street>Stensberggata 27</street>
     <city>0170 Oslo</city>
     <country>Norway</country>
    </postal>
    <email>dreibh@simula.no</email>
    <uri>https://www.simula.no/people/dreibh</uri>
   </address>
  </author>
  <date day="12" month="October" year="2026" />
  <keyword>Internet-Draft</keyword>
  <abstract>
   <t>
    This draft defines an IPv4 option containing a flowlabel that is
    compatible with IPv6. It is required for simplified usage of IntServ and
    interoperability with IPv6.
   </t>
  </abstract>
 </front>
 <middle>
  <section toc="default">
   <name>Introduction</name>
   <section toc="default">
    <name>Terminology</name>
    <t>This document uses the following terms:</t>
    <ul spacing="normal">
     <li>
      IntServ (Integrated Services): Reservation of network resources
      (bandwidth) on a per-flow basis. See <xref target="RFC1633" />,
      <xref target="RFC2205" />, <xref target="RFC2208" />,
      <xref target="RFC2209" />, <xref target="RFC2210" />,
      <xref target="RFC2211" /> and <xref target="RFC2212" /> for details.
     </li>
     <li>Flow: An IntServ reservation between two endpoints.</li>
     <li>
      Flow Label: The Flow Label field of the IPv6 header and the IPv4 option
      header defined in this draft. It is used for marking a packet to use a
      specific IntServ reservation. See <xref target="RFC6437" />,
      <xref target="RFC6436" /> for detailed descriptions.
     </li>
    </ul>
   </section>
   <section toc="default">
    <name>Abbreviations</name>
    <ul spacing="normal">
     <li>RSVP: ReSource Reservation Protocol</li>
     <li>SCTP: Stream Control Transmission Protocol</li>
     <li>TCP: Transmission Control Protocol</li>
     <li>QoS: Quality of Service</li>
     <li>UDP: User Datagram Protocol</li>
    </ul>
   </section>
   <section toc="default">
    <name>Conventions</name>
    <t>
     The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
     "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
     NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
     "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
     "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" 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>
  </section>
  <section toc="default">
   <name>A Flow Label Option for IPv4</name>
   <section toc="default">
    <name>Motivation</name>
    <t>
     This section describes the motivation to add a flow label option to the
     IPv4 protocol.
    </t>
    <section toc="default">
     <name>The Flow Label Field of IPv6</name>
     <t>
      The Flow Label field (see <xref target="RFC6436" /> and
      <xref target="RFC6437" />) of the IPv6 header (see
      <xref target="RFC8200" />) is a 20-bit number. All packets from the same
      source address having the same flow label <bcp14>MUST</bcp14> contain
      the same destination address. Therefore, the flow label combined with
      the source address is a network-unique identification for a specific
      packet flow. The idea behind the flow label is marking specific flows
      for IntServ. That is, the routers on the path from source to destination
      keep reservation states. The flow label provides easy identification and
      utilizes efficient lookup, e.g. using a hash function on the 3-tuple
      (source address, destination address, flow label).
     </t>
     <t>
      Using the IPv6 flow label, packets can be mapped easily to specific
      flows, with the following features:
     </t>
     <ul spacing="normal">
      <li>
       Transport Layer Protocol Independence: Since the mapping is directly
       specified in the IP header, all possible layer 4 protocols are
       supported, even protocols to be specified in a distant future.
      </li>
      <li>
       Support for Network Layer Encryption: The mapping is independent of
       payload encryption (e.g. by IPsec).
      </li>
      <li>
       Support for Fragmentation: If fragmentation of a large IP packet is
       necessary, all fragments contain the same flow label. Therefore,
       fragmentation does not cause any flow-marking problem.
      </li>
      <li>
       Flow Sharing: By marking packets with a flow label, it is possible to
       share a single flow (IntServ reservation) with several communication
       associations from host A to host B. For example, a video stream via UDP
       and an HTTP download via TCP could share a single reservation. For the
       user, flow sharing has the advantage that if one of its communication
       associations temporarily requires lower bandwidth than expected, other
       associations sharing the same flow may use the remaining bandwidth.
       That is, a possibly expensive reservation may be fully utilized. Flow
       sharing also helps to keep the total number of reservations a router
       has to handle small, reducing their CPU and memory requirements and
       therefore cost.
      </li>
      <li>
       Multi-Flow Connections: One communication association can divide its
       packets into several flows, simply by marking packets with different
       flow labels. This technique can be used for layered transmission. That
       is, a stream (e.g. a video) is divided up into several parts (called
       layers). For example, the first layer (base layer) of a video contains
       a low-quality version, the second (1st enhancement layer) the data to
       generate a high-quality version, etc. Now, the first layer can be
       mapped to a high-quality reservation (guaranteed bandwidth, low loss
       rate) at higher cost, but the following layers can be mapped to
       lower-quality reservations (e.g. higher loss rate) or even best effort
       at lower cost. Research shows that the total transmission cost can be
       reduced significantly by applying layered transmission (see
       <xref target="Dre2001" />, <xref target="IJMUE2009" /> for details).
      </li>
     </ul>
    </section>
    <section toc="default">
     <name>The Limitations of IntServ via IPv4</name>
     <t>
      Using IntServ with IPv4, there are several problems that can only be
      solved with high management effort:
     </t>
     <ul spacing="normal">
      <li>
       No Transport Layer Protocol Independence: It is necessary to mark the
       packets within the layer 4 protocol header. For example, the TCP, UDP
       or SCTP port numbers can be used to mark flows (with limitations, see
       below). But for new protocols (e.g. experimental, new standards,
       proprietary), software updates for <em>all</em> IntServ routers are
       necessary to recognize the packet flow!
      </li>
      <li>
       No Support for Network Layer Encryption: Since it is necessary to read
       fields of the layer 4 protocol header, it may not be encrypted.
       Therefore, e.g. the usage of IPsec is impossible.
      </li>
      <li>
       Support for Fragmentation: Only the first fragment of a large packet
       contains the layer 4 header necessary to map the packet to a flow.
       Mapping other fragments would require intermediate routers to remember
       packet identities and try to map fragments to packet identities. Due to
       the management effort and memory requirements, this is not realistic
       for high-bandwidth backbone routers; especially when packet reordering
       must be considered. Furthermore, load sharing or traffic distribution
       would be impossible.
      </li>
      <li>
       No Flow Sharing: It is usually impossible for two different
       communication associations to share the same flow, e.g. if TCP flows
       are recognized using port numbers. This makes it necessary to reserve
       an IntServ flow for each communication association. This implies an
       increased number of flow states for routers to keep and maintain.
       Furthermore, if one association temporarily uses a lower bandwidth, the
       free bandwidth of its flow cannot easily be borrowed by another
       association.
      </li>
      <li>
       No Multi-Flow Connections: To use layered transmission, e.g. a video
       via UDP, the transmission of every layer would require its own port
       numbers. In the case of connection-oriented transmission protocols
       (e.g. TCP, SCTP), every layer would even require its own connection
       setup and management. Depending on the transport protocol, the number
       of communication associations and the number of flows, much more work
       is necessary compared to IPv6 using flow labels.
      </li>
     </ul>
     <t>
      All in all, using IntServ flows with IPv4 requires much more work
      compared to IPv6, where simply the flow label can be used. It is
      therefore useful to add such a field to IPv4, too. An appropriate place
      to add such a field is an IPv4 option header.
     </t>
    </section>
   </section>
   <section toc="default">
    <name>Definition of the Flow Label Option</name>
    <t>
     IPv4 (see <xref target="RFC0791" />) already defines an option header for
     a 16-bit SATNET stream identifier. Since this identifier would be
     incompatible with the 20-bit IPv6 flow label, reuse of this existing
     option header is inappropriate. Therefore, a new one is defined as
     follows:
    </t>
    <artwork name="" type="" align="left" alt=""><![CDATA[
Flow Label Option

 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     |0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 0 0 0|0 0 0 0|              Flow Label               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>
    <ul spacing="normal">
     <li>Type: 143</li>
     <li>Length: 8 octets</li>
     <li>
      Flow Label: The 20-bit flow label. All definitions of
      <xref target="RFC6437" /> and <xref target="RFC6436" /> for the IPv6
      flow label are also valid for this field. A value of zero denotes that
      no flow label is used. In this case, the flow label option is in fact
      unnecessary.
     </li>
    </ul>
    <t>
     The Flow Label option <bcp14>SHOULD</bcp14> be copied on fragmentation.
     See also <xref target="I-D.templin-intarea-ipid-ext2" />. It
     <bcp14>MUST</bcp14> be the first option of the IP header and therefore
     <bcp14>MUST NOT</bcp14> appear more than once per IPv4 packet. The Router
     Alert option <bcp14>SHOULD NOT</bcp14> be used to mark the necessity for
     routers to examine the options. Placing the Flow Label option as the
     first option allows for easy processing in hardware.
    </t>
   </section>
  </section>
  <section toc="default">
   <name>Translation between IPv6 and IPv4</name>
   <t>
    Since the new IPv4 flow label is fully compatible with the IPv6 flow
    label, the field <bcp14>MAY</bcp14> be translated into the other
    protocol's one during protocol translation. That is, a router can
    translate an IPv6 packet set from an IPv6-only host to an IPv4-mapped
    address of an IPv4-only host and the flow label may simply be copied. The
    same procedure may also be applied in the backward direction.
   </t>
   <t>
    Note that copying the flow label during protocol translation is not
    mandatory. There may be IntServ reservation reasons for not copying but
    setting the flow label to zero. But a router <bcp14>MUST NOT</bcp14> set
    the flow label to a value other than the copy or 0, since the source is
    responsible for ensuring that the source address combined with the flow
    label is network-unique.
   </t>
  </section>
  <section toc="default">
   <name>Security Considerations</name>
   <t>
    Security considerations are similar to the IPv6 flow label, see
    <xref target="RFC6437" />.
   </t>
  </section>
  <section toc="default">
   <name>IANA Considerations</name>
   <t>This document introduces no additional considerations for IANA.</t>
  </section>
  <section toc="default">
   <name>Acknowledgments</name>
   <t>
    The author would like to thank Brian E. Carpenter, Wes George, Perry
    Lorier, Christoph Reichert, Fred Templin and Michael Tüxen for their
    comments.
   </t>
  </section>
 </middle>
 <back>
  <references>
   <name>Normative References</name>
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.0791.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2205.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2210.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2211.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2212.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8200.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6437.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml" />
  </references>
  <references>
   <name>Informative References</name>
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.templin-intarea-ipid-ext2.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1633.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2208.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2209.xml" />
   <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6436.xml" />
   <reference anchor="Dre2001" target="https://www.nntb.no/~dreibh/diplom/Dre2001.pdf">
    <front>
     <title>Management of Layered Variable Bitrate Multimedia Streams over DiffServ with Apriori Knowledge</title>
     <author initials="T." surname="Dreibholz" fullname="Thomas&nbsp;Dreibholz" />
     <date day="20" month="February" year="2001" />
    </front>
    <seriesInfo name="" value="Masters Thesis" />
   </reference>
   <reference anchor="IJMUE2009" target="https://gvpress.com/journals/IJMUE/vol4_no2/14.pdf">
    <front>
     <title>A Scalable QoS Device for Broadband Access to Multimedia Services</title>
     <author initials="W." surname="Zhu" fullname="Wenyu&nbsp;Zhu" />
     <author initials="T." surname="Dreibholz" fullname="Thomas&nbsp;Dreibholz" />
     <author initials="E.&nbsp;P." surname="Rathgeb" fullname="Erwin Paul&nbsp;Rathgeb" />
     <author initials="X." surname="Zhou" fullname="Xing&nbsp;Zhou" />
     <date day="30" month="April" year="2009" />
    </front>
    <seriesInfo name="SERSC International Journal of Multimedia and Ubiquitous Engineering&nbsp;(IJMUE)" value="Number 2, Volume 4, Pages 157–172, ISSN&nbsp;1975-0080" />
   </reference>
  </references>
 </back>
</rfc>
