<?xml version="1.0" encoding="US-ASCII"?> version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

<!-- [rfced] updated by Chris /09/04/19 -->

<!ENTITY RFC7230 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7230.xml">
<!ENTITY RFC7231 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7231.xml">
<!ENTITY RFC7232 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7232.xml">
<!ENTITY RFC7233 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7233.xml">
<!ENTITY RFC7234 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7234.xml">
<!ENTITY RFC7235 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7235.xml">
<!ENTITY RFC3550 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3550.xml">
<!ENTITY RFC4566 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4566.xml">
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3986 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml">
<!ENTITY RFC3264 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3264.xml">
<!ENTITY RFC4634 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4634.xml">
<!ENTITY RFC8017 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8017.xml">
<!ENTITY RFC0793 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0793.xml">
<!ENTITY RFC0768 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0768.xml">
<!ENTITY RFC3550 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3550.xml">
<!ENTITY RFC3629 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3629.xml">
<!ENTITY RFC5322 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5322.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC3261 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3261.xml">
<!ENTITY RFC3649 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3649.xml">
<!ENTITY RFC4656 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4656.xml">
<!ENTITY RFC5357 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5357.xml">
]> "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
submissionType="independent"
category="info" number="XXXX" ipr="trust200902">
number="8802"
docName="draft-aranda-dispatch-q4s-10"
ipr="trust200902"
obsoletes=""
updates=""
xml:lang="en"
sortRefs="false"
symRefs="true"
tocDepth="4"
tocInclude="true"
version="3">
  <!-- xml2rfc v2v3 conversion 2.40.1 -->
  <!-- Generated by id2xml 1.4.4 on 2019-08-20T02:21:18Z -->
	<?rfc compact="yes"?>
        <?rfc text-list-symbols="oo*+-"?>
	<?rfc subcompact="no"?>
	<?rfc sortrefs="no"?>
	<?rfc symrefs="yes"?>
	<?rfc strict="yes"?>
	<?rfc toc="yes"?>
<front>

    <title>The Quality for Service (Q4S) Protocol</title>
    <seriesInfo name="RFC" value="8802"/>
    <author fullname="Jose Javier Garcia Aranda" initials="J." initials="J.J." surname="Aranda">
      <organization>Nokia</organization>
	<address><postal><street>C/Maria
      <address>
        <postal>
          <street>María Tubau 9</street>
	<street>28050 Madrid</street>
	<street>Spain</street>
          <code>28050</code>
          <city>Madrid</city>
          <country>Spain</country>
        </postal>
        <phone>+34 91 330 4348</phone>
        <email>jose_javier.garcia_aranda@nokia.com</email>
      </address>
    </author>
    <author fullname="Monica Cortes" fullname="Mónica Cortés" initials="M." surname="Cortes">
	<organization abbrev="Univ. Politecnica de Madrid">Universidad Politecnica de Madrid</organization>
	<address><postal><street>Avenida Complutense 30</street>
	<street>28040 Madrid</street>
	<street>Spain</street> surname="Cortés">
      <organization>Nokia</organization>
      <address>
        <postal>
          <street>María Tubau 9</street>
          <code>28050</code>
          <city>Madrid</city>
          <country>Spain</country>
        </postal>
	<email>cortesm@dit.upm.es</email>
        <email>monica.cortes_sack@nokia.com</email>
      </address>
    </author>
    <author fullname="Joaquin Salvachua" fullname="Joaquín Salvachúa" initials="J." surname="Salvachua"> surname="Salvachúa">
      <organization abbrev="Univ. Politecnica de Madrid">Universidad Politecnica de Madrid</organization>
	<address><postal><street>Avenida
      <address>
        <postal>
          <street>Avenida Complutense 30</street>
	<street>28040 Madrid</street>
	<street>Spain</street>
          <code>28040</code>
          <city>Madrid</city>
          <country>Spain</country>
        </postal>
        <phone>+34 91 0672134</phone>
	<email>jsalvachua@dit.upm.es</email>
        <email>Joaquin.salvachua@upm.es</email>
      </address>
    </author>
    <author fullname="Maribel Narganes" initials="M." surname="Narganes">
      <organization abbrev="Tecnalia">Tecnalia Research &amp; Innovation</organization>
	<address><postal><street>Parque Cientifico
      <address>
        <postal>
          <extaddr>Parque Científico y Tecnologico Tecnológico de Bizkaia</street>
	<street>Geldo Auzoa, Bizkaia</extaddr>
          <street>Astondo Bidea, Edificio 700</street>
	<street>E-48160 Derio (Bizkaia)</street>
	<street>Spain</street>
          <code>E-48160</code>
          <city>Derio</city>
          <region>Bizkaia</region>
          <country>Spain</country>
        </postal>
        <phone>+34 946 430 850</phone>
        <email>maribel.narganes@tecnalia.com</email>
      </address>
    </author>
    <author fullname="Inaki Martinez Sarriegui" fullname="Iñaki Martínez-Sarriegui" initials="I." surname="Sarriegui"> surname="Martínez-Sarriegui">
      <organization>Optiva Media</organization>
	<address><postal><street>Edificio
      <address>
        <postal>
          <street>Edificio Europa II,</street>
          <street>Calle Musgo 2, 1G,</street>
          <street>28023 Madrid</street>
          <street>Spain</street>
        </postal>
        <phone>+34 91 297 7271</phone>
        <email>inaki.martinez@optivamedia.com</email>
      </address>
    </author>
    <date month="September" year="2019"/>

<!-- [rfced] Please insert any keywords (beyond those that appear in
the title) for use on https://www.rfc-editor.org/search. -->

<keyword>example</keyword>

	<abstract><t> month="July" year="2020"/>
<keyword>quality measurement</keyword>
<keyword>measurement protocol</keyword>
<keyword>latency</keyword>
<keyword>jitter</keyword>
<keyword>bandwidth</keyword>
<keyword>packet-loss</keyword>
    <abstract>
      <t>
   This memo describes an application level application-level protocol for the
   communication of end-to-end QoS compliance information based on
   the   Hypertext HyperText Transfer Protocol (HTTP) and the Session
   Description Protocol (SDP).  The Quality for Service Protocol
   (Q4S) protocol provides a mechanism to negotiate and monitor latency,
   jitter, bandwidth, and packet, packet loss, and to alert whenever one of the
   negotiated conditions is violated.</t>
      <t>
   Implementation details on the actions to be triggered upon
   reception/detection of QoS alerts exchanged by the protocol are
   out of scope of this document, document; it is either application dependent (e.g.,
   act to increase quality or reduce bit-rate) or network dependent
   (e.g., change connection's quality profile).</t>
      <t>
   This protocol specification is the product of research conducted
   over a number of years, and years; it is presented here as a permanent
   record and to offer a foundation for future similar work.  It does
   not represent a standard protocol and does not have IETF
   consensus.</t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction" anchor="section-1"><t> anchor="sec-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   The World Wide Web (WWW) is a distributed hypermedia system
   which
   that has gained widespread acceptance among Internet users.
   Although WWW browsers support other, preexisting Internet
   application protocols, the primary protocol used between WWW
   clients and servers became the HyperText Transfer Protocol (HTTP)
   (RFC 7230
   (<xref target="RFC7230" format="default"/>, <xref target="ref-1"/>, RFC 7231 target="RFC7231" format="default"/>,
    <xref target="ref-2"/>, RFC 7232 target="RFC7232" format="default"/>, <xref target="ref-3"/>, RFC 7233 target="RFC7233" format="default"/>,
    <xref target="ref-4"/>, RFC 7234
   <xref target="ref-5"/>, target="RFC7234" format="default"/>, and RFC 7235 <xref target="ref-6"/>). target="RFC7235" format="default"/>).
   Since then, HTTP over TLS (known as HTTPS
   and described in RFC 2818 [7]) <xref target="RFC2818" format="default"/>) has become an imperative for
   providing secure and authenticated WWW access.  The mechanisms
   described in this document are equally applicable to HTTP and
   HTTPS.</t>
      <t>
   The ease of use of the Web has prompted its widespread employment
   as a client/server architecture for many applications.  Many of
   such applications require the client and the server to be able to
   communicate with each other and exchange information with certain
   quality constraints.</t>
      <t>
   Quality in communications at the application level consists of
   four measurable parameters:

	<list style="hanging" hangIndent="6">
        <t hangText="Latency:">The

      </t>
      <dl newline="false" spacing="normal" indent="6">
        <dt>Latency:</dt>
        <dd>The time a message takes to travel from source to
        destination. It may be approximated to as RTT/2 (Round trip (round-trip
        time), assuming the networks are symmetrical. In this context context,
        we will consider the statistical median formula.</t>

	<t hangText="Jitter:">latency formula.</dd>
        <dt>Jitter:</dt>
        <dd>Latency variation. There are some formulas to
        calculate Jitter, jitter, and in this context context, we will consider the
        arithmetic mean formula.</t>

	<t hangText="Bandwidth:">bit formula.</dd>

        <dt>Bandwidth:</dt>
        <dd>Bit rate of communication. To assure ensure quality, a
        protocol must assure ensure the availability of the bandwidth needed
        by the application.</t>

	<t hangText="Packet loss:">The application.</dd>
        <dt>Packet loss:</dt>
        <dd>The percentage of packet loss is closely related
        to bandwidth and jitter. Affects Packet loss affects bandwidth because a high
        packet loss implies sometimes implies retransmissions that also
        consumes extra bandwidth, other times the retransmissions are
        not achieved (for example example, in video streaming over UDP) UDP), and
        the information received is less than the required bandwidth.
        In terms of jitter, a packet loss sometimes is seen by the
        destination like as a larger time between arrivals, causing a
        jitter growth.</t>

	</list>
	</t> growth.</dd>
      </dl>
      <t>
   Any other communication parameter parameter, such as throughput, is not a
   network parameter because it depends on protocol window size and
   other implementation-dependent aspects.</t>
      <t>
   The Quality for Service Protocol (Q4S) Q4S protocol provides a mechanism for
   quality monitoring based on an HTTP syntax and the Session
   Description protocol Protocol (SDP) in order to be easily integrated in the
   WWW, but it may be used by any type of application, not only those
   based on HTTP. Quality requirements may be needed by any type of
   application that communicates using any kind of protocol,
   especially those with real-time constraints. Depending on the
   nature of each application application, the constraints may be different different,
   leading to different parameter thresholds that need to be met.</t>
      <t>
   Q4S is an application level Client/Server application-level client/server protocol that
   continuously measures session quality for a given flow (or set of
   flows), end-to-end (e2e) and in real-time; real time; raising alerts if
   quality parameters are below a given pre-negotiated negotiated threshold and
   sending recoveries when quality parameters are restored. Q4S
   describes when these notifications, alerts alerts, and recoveries, recoveries need to
   be sent and the entity receiving them. The actions undertaken by
   the receiver of the alert are out of scope of the protocol.</t>
      <t>
   Q4S is session-independent from the application flows, flows to minimize
   the impact on them. To perform the measurements, two control flows
   are created on both communication paths (forward and reverse
   directions).</t>
      <t>
   This protocol specification is the product of research conducted
   over a number of years, years and is presented here as a permanent
   record and to offer a foundation for future similar work.  It does
   not represent a standard protocol and does not have IETF
   consensus.</t>
      <section title="Scope" anchor="section-1.1"><t> anchor="sec-1.1" numbered="true" toc="default">
        <name>Scope</name>
        <t>
   The purpose of Q4S is to measure end-to-end network quality in
   real-time.
   real time. Q4S does not transport any application data. It This means
   that Q4S is designed to be used jointly with other transport
   protocols such as Real Time Real-time Transport Protocol (RTP)(RFC 3550 (RTP) <xref target="ref-8"/>), target="RFC3550" format="default"/>,
   Transmission Control Protocol (TCP) (RFC 793 <xref target="ref-16"/>), Quick UDP
   Internet Connections (QUIC)<xref target="ref-9"/> , target="RFC0793" format="default"/>,
   QUIC <xref target="I-D.ietf-quic-transport" format="default"/>,
   HTTP <xref target="ref-1"/>, target="RFC7230" format="default"/>, etc.</t>
        <t>
   Some existent transport protocols are focused in on real-time media
   transport and certain connection metrics are available, which is
   the case of RTP and Real Time RTP Control Protocol (RTCP)<xref target="ref-8"/>. (RTCP) <xref target="RFC3550" format="default"/>. Other
   protocols such as QUIC provide low connection latencies as well as
   advanced congestion control. These protocols transport data
   efficiently and provide a lot of functionalities. However, there are
   currently no other quality measurement protocols offering the same
   level of function as Q4S.  See <xref target="section-1.4"/> target="sec-1.4" format="default"/> for a discussion of the
   IETF's OWAMP and TWAMP quality measurement protocols.</t> protocols, One-Way Active Measurement Protocol (OWAMP) and
   Two-Way Active Measurement Protocol (TWAMP).</t>
        <t>
   Q4S enable enables applications to become reactive under e2e network
   quality changes. To achieve it, an independent Q4S stack
   application must run in parallel to with the target application. Then, Q4S
   metrics may be used to trigger actions on the target application application, such
   as speed adaptation to latency in multiuser games, bitrate control
   at streaming services, intelligent commutation of delivery node at
   Content Delivery Networks, and whatever the target application allow.</t> allows.</t>
      </section>
      <section title="Motivation" anchor="section-1.2"><t> anchor="sec-1.2" numbered="true" toc="default">
        <name>Motivation</name>
        <t>
   Monitoring quality of service (QoS) in computer networks is useful
   for several reasons:</t>

	<t><list style="symbols"><t>Enable
        <ul spacing="normal">
          <li>It enables real-time services and applications to verify whether
        network resources achieve a certain QoS level. This helps
        real-time services and applications to run through over the
        Internet, allowing the existence of Application Content
        Providers (ACPs) (ACPs), which offer guaranteed real-time services to
        the final users.</t>

	<t>Real-time end users.</li>
          <li>Real-time monitoring allows applications to adapt themselves
        to network conditions (Application-based (application-based QoS) and/or request
        more network quality to from the Internet Service Provider (ISP)
        (if the ISP offers this possibility).</t>

	<t>Monitoring possibility).</li>
          <li>Monitoring may also be required by Peer to Peer peer-to-peer (P2P) real-time
           applications for which Q4S can be used</t>

	<t>Enable used.</li>
          <li>Monitoring enables ISPs to offer QoS to any ACP or final end user application
        in an accountable way</t>

	<t>Enable way.</li>
          <li>
            <t>Monitoring enables e2e negotiation of QoS parameters, independently of
        the ISPs of both endpoints.<vspace blankLines="1"/> endpoints.</t>
           </li>
</ul>
            <t>

        A protocol to monitor QoS must address the following issues:

            </t>

	<t>Must
        <ul spacing="normal">
          <li>Must be ready to be used in conjunction with current standard
        protocols and applications, without forcing a change on them.</t>

	<t>Must them.</li>
          <li>Must have a formal and compact way to specify quality
        constraints desired by the application to run.</t>

	<t>Must run.</li>
          <li>Must have measurement mechanisms avoiding that avoid application
        disruption and minimizing minimize network resources consumption.</t>

	<t>Must consumption.</li>
          <li>Must have specific messages to alert about the violation of
        quality constraints in different directions (forward and
        reverse),
        reverse) because network routing may not be symmetrical, and
        of course, quality constraints may not be symmetrical.</t>

	<t>After symmetrical.</li>
          <li>After having alerted about the violation of quality
        constraints, must have specific messages to inform about
        the recovery of quality constraints in corresponding directions
        (forward and reverse).</t>

	<t>Must reverse).</li>
          <li>Must protect the data (constrains, (constraints, measurements, QoS levels
        demanded from the network) in order to avoid the injection of
        malicious data in the measurements.</t>

	</list>
	</t> measurements.</li>
        </ul>
      </section>
      <section title="Summary anchor="sec-1.3" numbered="true" toc="default">
        <name>Summary of Features" anchor="section-1.3"><t> Features</name>
        <t>
   The Quality for Service Protocol (Q4S) protocol is a message-oriented
   communication protocol that can be used in conjunction with any
   other application-level protocol. Q4S is a measurement protocol.
   Any action taken derived from its measurements are out of scope of
   the protocol. These actions depend on the application provider and may
   be application-level adaptive reactions, may involve requests to
   the ISP, or whatever the application provider decide.</t> decides.</t>
        <t>
   The benefits in quality measurements provided by Q4S can be used
   by any type of application that uses any type of protocol for data
   transport. It provides a quality monitoring scheme for any
   communication that takes place between the client and the server,
   not only for the Q4S communication itself.</t>
        <t>
   Q4S does not establish multimedia sessions sessions, and it does not
   transport application data. It monitors the fulfillment of the
   quality requirements of the communication between the client and
   the server, and therefore server; therefore, it does not impose any restrictions on the
   type of application, protocol protocol, or the type of usage of the
   monitored quality connection.</t>
        <t>
   Some applications may vary their quality requirements dynamically
   for any given quality parameter. Q4S is able to adapt to the
   changing application needs needs, modifying the parameter thresholds to
   the new values and monitoring the network quality according to the
   new quality constraints. It will raise alerts if the new
   constraints are violated.</t>
        <t>
   The Q4S session lifetime is composed of four phases with different
   purposes: Handshake, Negotiation, Continuity Continuity, and Termination.
   Negotiation and Continuity phases perform network parameter
   measurements as per a negotiated measurement procedure. Different
   measurement procedures could be used inside Q4S, although one
   default measurement mechanism is needed for compatibility reasons
   and is the one defined in this document. Basically, Q4S defines
   how to transport application quality requirements and measurement
   results between a client and server and providing how to provide monitoring and
   alerting
   alerting, too.</t>
        <t>
   Q4S must be executed just before starting a client-server
   application which that needs a quality connection in terms of latency,
   jitter, bandwidth bandwidth, and/or packet loss. Once the client and server have
   succeeded in establishing communication under quality constraints,
   the application can start, and Q4S continues measuring and
   alerting if necessary.</t>
        <t>
   The quality parameters can be suggested by the client in the first
   message of the handshake Handshake phase, but it's it is the server that accepts
   these parameter values or forces others. The server is in charge
   of deciding the final values of quality connection.</t>
      </section>
      <section title="Differences with OWAMP/TWAMP" anchor="section-1.4"><t> anchor="sec-1.4" numbered="true" toc="default">
        <name>Differences from OWAMP/TWAMP</name>
        <t>
   OWAMP (RFC 4656) <xref target="ref-27"/> target="RFC4656" format="default"/> and
   TWAMP (RFC 5357) <xref target="ref-28"/> target="RFC5357" format="default"/> are two protocols
   to measure network quality in terms of RTT, but has they have a different
   goal than Q4S. The main difference is the scope: Q4S is designed
   to assist reactive applications, while whereas OWAMP/TWAMP is designed
   just
   to measure just network delay.</t>
        <t>
   Differences
   The differences can be summarized in the following points:</t>

	<t><list style="symbols"><t>OWAMP/TWAMP is
        <ul spacing="normal">
          <li>OWAMP and TWAMP are not intended for measuring availability of
      resources (certain Bandwidth availability bandwidth availability, for example) but
      only RTT. However, Q4S is intended for measuring required
      bandwidth, packet-loss, jitter packet loss, jitter, and latency in both
      directions. Available bandwidth is not measured by Q4S, but
      required
      bandwidth required for a specific application.</t>

	<t>OWAMP/TWAMP does application is.</li>
          <li>OWAMP and TWAMP do not have responsivity control (which
      defines the speed of protocol reactions under network quality
      changes),
      changes) because this protocol is these protocols are designed to measure
      network performance, not to assist reactive applications applications, and
      does
      do not detect the fluctuations of quality in within certain time
      intervals to take reactive actions. However, responsivity
      control is a key feature of Q4S.</t>

	<t>OWAMP/TWAMP is Q4S.</li>
          <li>OWAMP and TWAMP are not intended to run in parallel with reactive
      applications, but Q4S' the Q4S protocol's goal is to run in parallel and assist
      reactive applications to take in making decisions based on Q4S ALERT
      packets Q4S-ALERT
      packets, which may trigger actions.</t>

	</list>
	</t> actions.</li>
        </ul>
      </section>
    </section>
    <section title="Terminology" anchor="section-2"><t> anchor="sec-2" numbered="true" toc="default">
      <name>Terminology</name>
      <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
   "MAY", "<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 "OPTIONAL" "<bcp14>OPTIONAL</bcp14>" in this document are to be
    interpreted as described in BCP 14  RFC 2119 BCP&nbsp;14 <xref target="ref-11"/> RFC 8174 target="RFC2119"/> <xref target="ref-21"/>
    target="RFC8174"/> when, and only when, they appear in all capitals, as
    shown here.</t> here.
</t>
    </section>
    <section title="Overview anchor="sec-3" numbered="true" toc="default">
      <name>Overview of Operation" anchor="section-3"><t> Operation</name>
      <t>
   This section introduces the basic operation of Q4S using simple
   examples.  This section is of a tutorial nature and does not contain
   any normative statements.</t>
      <t>
   The first example shows the basic functions of a Q4S:
   communication establishment between a client and a server, quality
   requirement negotiations for the requested application,
   application start and continuous quality parameter measurements,
   and finally communication termination.</t>
      <t>
   The client triggers the establishment of the communication by
   requesting a specific service or application from the server. This
   first message must have a special URI (RFC 3986)<xref target="ref-12"/>, <xref target="RFC3986" format="default"/>, which may
   force the use of the Q4S protocol if it is implemented in a
   standard web browser. This message consists of a Q4S BEGIN method,
   which can optionally include a proposal for the communication
   quality requirements in an SDP body. This option gives the client
   a certain negotiation capacity about quality requirements, but it
   will be the server who finally decides about the stated
   requirements.</t>
      <t>
   This request is answered by the server with a Q4S 200 OK response
   letting the client know that it accepts the request. This response
   message must contain an SDP body with:</t>

	<t><list style="symbols"><t>The with the following:</t>
      <ul spacing="normal">
        <li>The assigned Q4S session id.</t>

	<t>The sess-id.</li>
        <li>The quality constraints required by the requested
      application.</t>

	<t>The application.</li>
        <li>The measurement procedure to use.</t>

	<t>The alerting mode: there use.</li>
        <li>
          <t>"alerting-mode" attribute: There are two different scenarios for
      sending alerts that trigger actions either on the network or
      in the application when measurements identify violated
      quality constraints. In both cases, alerts are triggered by
      the server.

      <list style="format (%c)">
           <t> Q4S-aware-network
          </t>
          <ol spacing="normal" type="(%c)">
            <li>
              <t>Q4S-aware-network scenario: the The network is Q4S aware, aware
           and reacts by itself to these alerts. In this scenario
           Q4S ALERT scenario,
           Q4S-ALERT messages are sent by the server to the client,
           and network elements inspect and process these alert
           messages. The alerting mode in this scenario is called
           Q4S-aware-network alerting mode.</t>
            </li>
            <li>
              <t>Reactive scenario: As shown in Figure 1,
           <xref target="ref-reactive-scenario" format="default"/>, the network
           is not Q4S aware. In this scenario scenario, alert notifications
           are sent to a specific node, called an Actuator, which is
           in charge of taking making decisions regarding what actions to
           trigger: either to change application behavior to adapt
           it to network conditions and/or invoke a network policy
           server in order to reconfigure the network and request
           more
           better quality for application flows.</t>

	</list>
	</t>

	</list>
	</t>
      <figure title="Reactive scenario" anchor="ref-reactive-scenario"><artwork><![CDATA[ anchor="ref-reactive-scenario">
        <name>Reactive Scenario</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
         +------+                           +-----------+
         |  App |<----- app flows---------->|Application|
         |Client|                           +-----------+
         +------+                                 A
                                                  |
         +------+             +------+       +--------+
         | Q4S  |<----Q4S---->| Q4S  |<----->|Actuator|
         |Client|             |Server|       +--------+
         +------+             +------+            |
                                                  V
                                           +-------------+
                                           |policy server|
                                           +-------------+
]]></artwork>
      </figure>
	<t><list style="symbols"><t>The
        <t>The format of messages exchanged between the server stack and
      the Actuator, Actuator doesn't follow Q4S codification rules, but rules;
      their format will be implementation dependent. In this way,
      we will call the messages sent from the server stack to the
      Actuator "notifications" (e.g., alert notifications), notifications) and the
      messages sent from the Actuator to the server stack in
      response to notifications "acknowledges" (e.g., alert
      acknowledges).</t>

	<t>alert-pause:
        </li>
      </ol></li>
</ul>
      <ul spacing="normal">
        <li>"alert-pause" attribute: The amount of time between consecutive alerts.
      In the Q4S-aware-network scenario, the server has to wait
      this period of time between Q4S ALERT Q4S-ALERT messages sent to the
      client. In the Reactive scenario, the server stack has to
      wait this period of time between alert notifications sent to
      the Actuator. Measurements are not stopped in Negotiation or
      Continuity Phases phases during this period of time, but no alerts
      are sent sent, even with violated network quality constraints constraints, in
      order to leave time for network reconfiguration or for
      application adjustments.</t>

	<t>recovery-pause: adjustments.</li>
        <li>"recovery-pause" attribute: The amount of time the Q4S server waits
      before trying to recover the initial qos-level. "qos-level" (<xref target="sec-7.2.1" format="default"/>).
      After having
      detected violation of quality constraints several times, the
      qos-level
      "qos-level" will have been increased accordingly. If this
      violation detection finally stops, the server waits for a
      period of time (recovery time) time), and if the situation persists,
      it tries to recover to previous qos-level "qos-level" values gradually by
      sending Q4S RECOVERY Q4S-RECOVERY messages to the client, client in the Q4S-aware-network scenario, or recovery notifications to the
      Actuator,
      Actuator in the Reactive scenario.</t>

	</list>
	</t> scenario (<xref target="sec-7.9" format="default"/>).</li>
      </ul>
      <t>
   It is important to highlight that any Q4S 200 OK response sent by
   the server to the client at any time during the life of a quality
   session may contain an SDP body with new values of quality
   constraints required by the application. Depending on the phase
   and the state of the measurement procedure within the specific
   phase, the client will react accordingly so as to take into
   account the new quality constraints in the measurement procedure.</t>
      <t>
   Once the communication has been established (handshake (i.e., the Handshake phase is
   finished), the protocol will verify that the communication path
   between the client and the server meets the quality constraints on in
   both directions, from and to the server (negotiation (Negotiation phase). This
   negotiation
   Negotiation phase requires taking measurements of the quality
   parameters: latencies, jitter, bandwidth bandwidth, and packet loss. This
   phase is initiated with a client message containing a Q4S READY
   method, which will be answered by the server with a Q4S 200 OK
   response.</t>
      <t>
   Negotiation measurements are achieved in two sequential stages:

	<list style="hanging" hangIndent="6">

        <t hangText="Stage 0:">
      </t>
      <dl newline="false" spacing="normal" indent="6">
        <dt>Stage 0:</dt>
        <dd> latency and jitter measurements</t>

	<t hangText="Stage 1:"> measurements</dd>
        <dt>Stage 1:</dt>
        <dd> bandwidth and packet loss measurements</t>

	</list>
	</t> measurements</dd>
      </dl>
      <t>
   Stage 0 measurements are being taken through Q4S PING messages
   sent both from both the client and the server. All Q4S PING
   requests will be answered by Q4S 200 OK messages to allow for
   bidirectional measurements.</t>
      <t>
   Different client and server implementations may send a different
   number of PING messages for measuring, although at least 255
   messages should be considered to perform the latency measurement.
   The Stage 0 measurements only may be considered ended when neither
   client nor server receive new PING messages after an
   implementation-dependent guard time. Only after, client after Stage 0 has ended, can the client send a
   "READY 1" message.</t>
      <t>
   After a pre-agreed number of measurements have been performed,
   determined by the measurement procedure sent by the server, three
   scenarios may be possible:

      <list style="format (%c)"> <t>
      </t>
      <ol spacing="normal" type="(%c)">
        <li> Measurements do not meet the
        requirements: in this case case, the
	stage 0 is repeated after sending an alert from the server to
      the client or from the server stack to the Actuator, depending
      on the alerting mode defined in the Handshake phase. Notice
      that measurements continue to be taken but no alerts are sent
      during the alert-pause "alert-pause" time. In the Reactive scenario, the
      Actuator will decide either to forward the alert notification
      to the network policy server or to the application, depending
      on where reconfiguration actions have to be taken.
	</t>

	<t>
	</li>
        <li> Measurements do meet the requirements: in this case case, client
	moves to stage 1 by sending a new READY message.
	</t>

	<t>
	</li>
        <li> At any time during the measurement procedure, the Q4S 200 OK
	message sent by the server to the client, in response to a Q4S
      PING message, contains an SDP body with new values of quality
      constraints required by the application; this application. This means the
      application has varied their quality requirements dynamically
      and therefore dynamically;
      therefore, quality thresholds used while monitoring quality
      parameters have to be changed to the new constraints. In this
      case
      case, the client moves to the beginning of the Stage 0 for
      initiating the negotiation measurements again.
	</t>
	</list>
	</t>
	</li>
      </ol>
      <t>
   Stage 1 is optional. Its purpose is to measure the availability of
   application needed
   application-needed bandwidth. This stage If the "bandwidth" attribute is
   set to zero kbps in the SDP, the client can be skipped skip stage 1 by client
   sending a "READY 2" message after completion of stage 0 when
   bandwidth requirements is set to cero kbps in the SDP. 0. Stage 1
   measurements are achieved through Q4S BWIDTH messages sent both
   from both the client and the server. Unlike PING messages, Q4S BWIDTH
   requests will not be answered.</t>
      <t>
   If Stage 0 and 1 meet the application quality constraints, the
   application may start. Q4S will enter the continuity Continuity phase
   by measuring the network quality parameters through the Q4S PING
   message exchange on both connection paths, paths and raising alerts in
   case of violation.</t>
      <t>
   Once the client wants to terminate the quality session session, it sends a
   Q4S CANCEL message, which will be acknowledged by the server with
   another Q4S CANCEL message. Termination of quality sessions are
   always initiated by the client because Q4S TCP requests follow the
   client server
   client/server schema.</t>

	<t><list style="hanging" hangIndent="-1"><t hangText="Figure 2
        <t><xref target="ref-successful-q4s-message-exchange" format="default"/>
   depicts the message exchange in a successful scenario.">
	<vspace blankLines="0"/>
	</t>

	</list>
	</t> scenario.</t>
      <figure title="Successful anchor="ref-successful-q4s-message-exchange">
        <name>Successful Q4S message exchange" anchor="ref-successful-q4s-message-exchange"><artwork><![CDATA[ Message Exchange</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
            +-------------------------------------------+
            |                                           |
            | Client                             Server |
            |                                           |
Handshake   |     --------- Q4S BEGIN ----------->      |
            |     <-------- Q4S 200 OK -----------      |
            |                                           |
Negotiation |                                           |
(Stage 0)   |     --------- Q4S READY 0---------->      |
            |     <-------- Q4S 200 OK -----------      |
            |                                           |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S 200 OK -----------      |
            |     <-------- Q4S PING -------------      |
            |      -------- Q4S 200 OK ---------->      |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S PING -------------      |
            |     --------- Q4S 200 OK ---------->      |
            |     <-------- Q4S 200 OK -----------      |
            |                    ...                    |
Negotiation |                                           |
(Stage 1)   |     --------- Q4S READY 1---------->      |
            |     <-------- Q4S 200 OK -----------      |
            |                                           |
            |     --------- Q4S BWITDH ---------->      |
            |     <-------- Q4S BWIDTH------------      |
            |     --------- Q4S BWITDH ---------->      |
            |     <-------- Q4S BWIDTH------------      |
            |                    ...                    |
Continuity  |     --------- Q4S READY 2 --------->      |
            |     <-------- Q4S 200 OK -----------      | app start
            |                                           |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S 200 OK -----------      |
            |     <-------- Q4S PING -------------      |
            |      -------- Q4S 200 OK ---------->      |
            |                                           |
Termination |     --------- Q4S CANCEL ---------->      | app end
            |     <-------- Q4S CANCEL -----------      |
            |                                           |
            +-------------------------------------------+
]]></artwork>
      </figure>
      <t>
   Client
   Both client and server measurements are included into in the PING and BWIDTH
   messages, allowing both sides of the communication channel to be are aware
   of all measurements in both directions.</t>
      <t>
   The following two examples show the behavior of the Q4S protocol
   when:
   when quality constraints are violated, and alerts are generated; and,
   later on, when the violation of quality constraints stops leading to the
   execution of the recovery process. The first example (Figure 3)
   (<xref target="ref-q4s-aware-network-alerting-mode" format="default"/>)
   shows the Q4S-aware-network alerting mode scenario:</t>
      <figure title="Q4S-aware-network alerting mode" anchor="ref-q4s-aware-network-alerting-mode"><artwork><![CDATA[ anchor="ref-q4s-aware-network-alerting-mode">
        <name>Q4S-Aware-Network Alerting Mode</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
            +-------------------------------------------+
            |                                           |
            | Client                             Server |
            |                                           |
Handshake   |     --------- Q4S BEGIN ----------->      |
            |     <-------- Q4S 200 OK -----------      |
            |                                           |
Negotiation |                                           |
(Stage 0)   |     --------- Q4S READY 0---------->      |
            |     <-------- Q4S 200 OK -----------      |
            |                                           |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S 200 OK -----------      |
            |     <-------- Q4S PING -------------      |
            |      -------- Q4S 200 OK ---------->      |
            |                    ...                    |
            |                                           |
            |     <-------- Q4S ALERT Q4S-ALERT ------------      |
            |     -------- Q4S ALERT Q4S-ALERT ------------>      |
            |          (alert-pause start)              |
Repetition  |                                           |
of Stage 0  |     --------- Q4S READY 0---------->      |
            |     <-------- Q4S 200 OK -----------      |
            |                                           |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S 200 OK -----------      |
            |     <-------- Q4S PING -------------      |
            |                    ...                    |
Negotiation |                                           |
(Stage 1)   |     --------- Q4S READY 1---------->      |
            |     <-------- Q4S 200 OK -----------      |
            |                                           |
            |     --------- Q4S BWITDH ---------->      |
            |     <-------- Q4S BWIDTH------------      |
            |                    ...                    |
            |                                           |
Continuity  |     --------- Q4S READY 2 --------->      |
            |     <-------- Q4S 200 OK -----------      | app start
            |                                           |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S 200 OK -----------      |
            |     <-------- Q4S PING -------------      |
            |      -------- Q4S 200 OK ---------->      |
            |                    ...                    |
            |(alert-pause expires &                     |
            |                   violated constraints)   |
            |     <-------- Q4S ALERT Q4S-ALERT ------------      |
            |     --------- Q4S ALERT Q4S-ALERT ----------->      |
            |                                           |
            |           (alert-pause start)             |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S 200 OK -----------      |
            |     <-------- Q4S PING -------------      |
            |     --------- Q4S 200 OK ---------->      |
            |                    ...                    |
            |(alert-pause expires &                     |
            |                   violated constraints)   |
            |     <-------- Q4S ALERT Q4S-ALERT ------------      |
            |     --------- Q4S ALERT Q4S-ALERT ----------->      |
            |           (alert-pause)                   |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S 200 OK -----------      |
            |     <-------- Q4S PING -------------      |
            |      -------- Q4S 200 OK ---------->      |
            |                    ...                    |
            |(alert-pause expires &                     |
            |                 Fullfilled                 Fulfilled constraints)    |
            |                                           |
            |           (recovery-pause start)          |
            |                                           |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S 200 OK -----------      |
            |     <-------- Q4S PING -------------      |
            |      -------- Q4S 200 OK ---------->      |
            |                    ...                    |
            |(recovery-pause expires &                  |
            |                 Fullfilled                 Fulfilled constraints)    |
            |     <--------- Q4S RECOVERY Q4S-RECOVERY ---------     |
            |     -------- Q4S RECOVERY Q4S-RECOVERY ----------->    |
            |                                           |
            |          (recovery-pause start)           |
            |     --------- Q4S PING ------------>      |
            |     <-------- Q4S 200 OK -----------      |
            |     <-------- Q4S PING -------------      |
            |      -------- Q4S 200 OK ---------->      |
            |                    ...                    |
            |                                           |
Termination |     --------- Q4S CANCEL ---------->      | app end
            |     <-------- Q4S CANCEL -----------      |
            |                                           |
            +-------------------------------------------+
]]></artwork>
      </figure>
      <t>
   In this Q4S-aware-network alerting mode scenario, the server may
   send Q4S alerts to the client at any time on upon detection of violated
   quality constraints. This alerting exchange must not interrupt the
   continuity quality parameter measurements between client and
   server.</t>
   <t>
   The second example depicted in the figure 4 <xref target="ref-reactive-alerting-mode" format="default"/> represents the
   Reactive scenario, in which alert notifications are sent from the
   server stack to the Actuator Actuator, which is in charge of deciding either
   to act over application behavior and/or to invoke a network policy
   server. The Actuator is an entity that has a pre-defined defined set of
   different quality levels and decides how to act depending on the
   actions stated for each of these levels; it can take actions for
   making adjustments on the application application, or it can send a request to
   the policy server for acting on the network. The policy server
   also has a pre-defined defined set of different quality levels pre-agreed previously agreed
   upon between the Application Content Provider and the ISP. The
   Reactive alerting mode is the default mode.</t>
      <figure title="Reactive alerting mode" anchor="ref-reactive-alerting-mode"><artwork><![CDATA[ anchor="ref-reactive-alerting-mode">
        <name>Reactive Alerting Mode</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
            +-------------------------------------------+
            |                                           |
            | Client               Server      Actuator |
Handshake   |   ----- Q4S BEGIN ----->                  |
            |   <---- Q4S 200 OK -----                  |
            |                                           |
Negotiation |                                           |
(Stage 0)   |   ----- Q4S READY 0---->                  |
            |   <---- Q4S 200 OK -----                  |
            |                                           |
            |   ----- Q4S PING ------>                  |
            |   <---- Q4S 200 OK -----                  |
            |   <---- Q4S PING -------                  |
            |    ---- Q4S 200 OK ---->                  |
            |              ...                          |
            |  (alert-pause start)                      |
            |                          --alert          |
            |                         notification-->   |
            |                                           |
            |                         <--alert          |
            |                          acknowledge---   |
            |                                           |
Repetition  |                                           |
of Stage 0  |   ----- Q4S READY 0---->                  |
            |   <---- Q4S 200 OK -----                  |
            |                                           |
            |   ----- Q4S PING ------>                  |
            |   <---- Q4S 200 OK -----                  |
            |   <---- Q4S PING -------                  |
            |              ...                          |
            |(alert-pause expires &                     |
            |                   violated constraints)   |
            |                                           |
            |                         --alert           |
            |                         notification-->   |
            |                                           |
            |                         <--alert          |
            |                          acknowledge---   |
            |                                           |
            |   ----- Q4S PING ------>                  |
            |   <---- Q4S 200 OK -----                  |
            |   <---- Q4S PING -------                  |
            |              ...                          |
Negotiation |                                           |
(Stage 1)   |   ----- Q4S READY 1---->                  |
            |   <---- Q4S 200 OK -----                  |
            |                                           |
            |   ----- Q4S BWITDH ---->                  |
            |   <---- Q4S BWIDTH------                  |
            |              ...                          |
Continuity  |   ----- Q4S READY 2 --->                  |
            |   <---- Q4S 200 OK -----                  | app start
            |                                           |
            |(alert-pause expires &                     |
            |                  fulfilled constraints)   |
            |                                           |
            |(recovery-pause start)                     |
            |   ----- Q4S PING ------>                  |
            |   <---- Q4S 200 OK -----                  |
            |   <---- Q4S PING -------                  |
            |   ----- Q4S PING ------>                  |
            |                                           |
            |(recovery-pause expires &                  |
            |                  fulfilled constraints)   |
            |                                           |
            |                         --recovery        |
            |                         notification-->   |
            |                                           |
            |                         <--recovery       |
            |                          acknowledge---   |
            |                                           |
            |(recovery-pause start)                     |
            |   <---- Q4S 200 OK -----                  |
            |   <---- Q4S PING -------                  |
            |   ----- Q4S 200 OK ---->                  |
            |   ----- Q4S PING ------>                  |
            |              ...                          |
            |                                           |
Termination |   ----- Q4S CANCEL ---->                  | app end
            |                          --cancel         |
            |                          notification-->  |
            |                                           |
            |                          <--cancel        |
            |                           acknowledge--   |
            |   <---- Q4S CANCEL -----                  |
            |                                           |
            +-------------------------------------------+
]]></artwork>
      </figure>
      <t>
   At the end of any stage of the Negotiation phase stage, phase, the server sends an
   alert notification to the Actuator if quality constraints are
   violated. During the period of time defined by the alert-pause
   parameter, "alert-pause"
   attribute, no further alert notifications are sent, but
   measurements are not interrupted. This way, both the client and
   the server will detect network improvements as soon as possible.
   In a similar way, way during the continuity Continuity phase, the server may send
   alert notifications at any time to the Actuator on upon detection of
   violated quality constraints. This alerting exchange must not
   interrupt the continuity measurements between client and server.</t>
      <t>
   Finally, in the Termination phase, Q4S CANCEL messages sent from
   the client to the server must be forwarded from the server to the
   Actuator in order to release possible assigned resources for the
   session.</t>
    </section>
    <section title="Q4S Messages" anchor="section-4"><t> anchor="sec-4" numbered="true" toc="default">
      <name>Q4S Messages</name>
      <t>
   Q4S is a text-based protocol and uses the UTF-8 charset (RFC 3629
   <xref target="ref-19"/>). target="RFC3629" format="default"/>. A Q4S message is either a request or a response.</t>
      <t>
   Both Request request and Response response messages use the basic format of
   Internet Message Format (RFC 5322 <xref target="ref-20"/>). target="RFC5322" format="default"/>. Both types of messages
   consist of a start-line, one or more header fields, an empty line
   indicating the end of the header fields, and an optional message-body.</t> message-body.
   This document uses ABNF notation <xref target="RFC5234" format="default"/>
   for the definitions of the syntax of messages.</t>
      <t>
   The start-line, each message-header line, and the empty line MUST <bcp14>MUST</bcp14>
   be terminated by a carriage-return line-feed sequence (CRLF).
   Note that the empty line MUST <bcp14>MUST</bcp14> be present even if the message-body
   is not.</t>

	<figure><artwork><![CDATA[
      <sourcecode type="abnf"><![CDATA[
      generic-message  =  start-line CRLF
                          *message-header CRLF
                          CRLF
                          [ message-body ]
      start-line       =  Request-Line / Status-Line
]]></artwork>
	</figure>
]]></sourcecode>
      <t>
   Much of Q4S's messages and header field syntax are identical to
   HTTP/1.1. However, Q4S is not an extension of HTTP.</t>
      <section title="Requests" anchor="section-4.1"><t> anchor="sec-4.1" numbered="true" toc="default">
        <name>Requests</name>
        <t>
   Q4S requests are distinguished by having a Request-Line for a
   start-line. A Request-Line contains a method name, a Request-URI,
   and the protocol version separated by a single space (SP)
   character.</t>
        <t>
   The Request-Line ends with CRLF. No CR or LF are allowed except in
   the end-of-line CRLF sequence. No linear whitespace (LWS) (LWSP) is allowed
   in any of the elements.</t>

        <t>
        <sourcecode  type="abnf"><![CDATA[
   Request-Line  =  Method SP Request-URI SP Q4S-Version CRLF </t>

	<t><list style="hanging" hangIndent="6">

      <t hangText="Method:">
]]></sourcecode>
        <dl newline="false" spacing="normal" indent="6">
          <dt>Method:</dt>
          <dd>
	This specification defines seven methods: BEGIN for
	starting and negotiate negotiating quality sessions, READY for
      synchronization of measurements, PING and BWIDTH for
      quality measurements purpose, purposes, CANCEL for terminating
      sessions, Q4S-ALERT for reporting quality violations reporting, violations, and
      Q4S-RECOVERY for reporting quality recovery reporting.
	</t>

	<t hangText="Request-URI:"> recovery.
	</dd>
          <dt>Request-URI:</dt>
          <dd>
	The Request-URI is a Q4S URI (RFC 2396) <xref target="RFC3986" format="default"/> as described
	in 7.4. <xref target="sec-7.4" format="default"/>. The Request-URI MUST NOT <bcp14>MUST NOT</bcp14> contain unescaped spaces
      or control characters and MUST NOT <bcp14>MUST NOT</bcp14> be enclosed in "&lt;&gt;".
	</t>

	<t hangText="Q4S-Version:">
	</dd>
          <dt>Q4S-Version:</dt>
          <dd>
	Both request and response messages include the
	version of Q4S in use. To be compliant with this
      specification, applications sending Q4S messages MUST <bcp14>MUST</bcp14>
      include a Q4S-Version of "Q4S/1.0".  The Q4S-Version string
      is case-insensitive, case insensitive, but implementations MUST <bcp14>MUST</bcp14>
      send upper-case. uppercase. Unlike HTTP/1.1, Q4S treats the version number as a
      literal string.  In practice, this should make no difference.
	</t>

	</list>
	</t>
	</dd>
        </dl>
      </section>
      <section title="Responses" anchor="section-4.2"><t> anchor="sec-4.2" numbered="true" toc="default">
        <name>Responses</name>
        <t>
   Q4S responses are distinguished from requests by having a Status-Line as their start-line. A Status-Line consists of the protocol
   version followed by a numeric Status-Code and its associated
   textual phrase, with each element separated by a single SP
   character. No CR or LF is allowed except in the final CRLF
   sequence.</t>

	<t>
        <sourcecode type="abnf"><![CDATA[
   Status-Line  =  Q4S-Version SP Status-Code SP Reason-Phrase CRLF </t>
]]></sourcecode>
        <t>
   The Status-Code is a 3-digit integer result code that indicates
   the outcome of an attempt to understand and satisfy a request. The
   Reason-Phrase is intended to give a short textual description of
   the Status-Code.  The Status-Code is intended for use by automata,
   whereas the Reason-Phrase is intended for the human user. A client
   is not required to examine or display the Reason-Phrase.</t>
        <t>
   While this specification suggests specific wording for the reason
   phrase,
   Reason-Phrase, implementations MAY <bcp14>MAY</bcp14> choose other text, for example, in the
   language indicated in the Accept-Language header field of the
   request.</t>
        <t>
   The first digit of the Status-Code defines the class of response.
   The last two digits do not have any categorization role.  For this
   reason, any response with a status code between 100 and 199 is
   referred to as a "1xx response", any response with a status code
   between 200 and 299 as a "2xx response", and so on.  Q4S/1.0
   allows following values for the first digit:

	<list style="hanging" hangIndent="6">
        <t hangText="1xx:">

        </t>
        <dl newline="false" spacing="normal" indent="6">
          <dt>1xx:</dt>
          <dd>
	Provisional -- request received, continuing to process the request;
	</t>

	<t hangText="2xx:">
	</dd>
          <dt>2xx:</dt>
          <dd>
	Success -- the action was successfully received, understood, and accepted;
	</t>

	<t hangText="3xx:">
	</dd>
          <dt>3xx:</dt>
          <dd>
	Redirection -- further action needs to be taken in order to complete the request;
	</t>

	<t hangText="4xx:">
	</dd>
          <dt>4xx:</dt>
          <dd>
	Request Failure -- the request contains bad syntax or cannot be fulfilled at this server;
	</t>

	<t hangText="5xx:">
	</dd>
          <dt>5xx:</dt>
          <dd>
        Server Error -- the server failed to fulfill an apparently valid request"
	</t>

        <t hangText="6xx:"> request;
	</dd>
          <dt>6xx:</dt>
          <dd>
        Global Failure -- the request cannot be fulfilled at any server"
	</t>
	</list></t> server.
	</dd>
        </dl>
        <t>
   The status codes are the same as described in HTTP (RFC 7231 <xref target="ref-2"/>). target="RFC7231" format="default"/>. In
   the same way as HTTP, Q4S applications are not required to
   understand the meaning of all registered status codes, though such
   understanding is obviously desirable. However, applications MUST <bcp14>MUST</bcp14>
   understand the class of any status code, as indicated by the first
   digit, and treat any unrecognized response as being equivalent to
   the x00 status code of that class.</t>
        <t>
   The Q4S-ALERT, Q4S-RECOVERY Q4S-RECOVERY, and CANCEL requests do not have to be
   responded.
   responded to. However, after receiving a Q4S-ALERT, Q4S-RECOVERY Q4S-RECOVERY, or
   CANCEL request, the server SHOULD <bcp14>SHOULD</bcp14> send a Q4S-ALERT, Q4S-RECOVERY Q4S-RECOVERY,
   or CANCEL request to the client</t> client.</t>
      </section>
      <section title="Header Fields" anchor="section-4.3"><t> anchor="sec-4.3" numbered="true" toc="default">
        <name>Header Fields</name>
        <t>
   Q4S header fields are identical to HTTP header fields in both
   syntax and semantics.</t>
        <t>
   Some header fields only make sense in requests or responses. These
   are called request header fields and response header fields,
   respectively.  If a header field appears in a message that does not matching match
   its category (such as a request header field in a response), it
   MUST
   <bcp14>MUST</bcp14> be ignored.</t>
        <section title="Common anchor="sec-4.3.1" numbered="true" toc="default">
          <name>Common Q4S Header Fields" anchor="section-4.3.1"> Fields</name>
          <t> These fields may appear in Request request and Response response messages.

      <list style="hanging" hangIndent="6">
      <t hangText="Session-Id:">the
          </t>
          <dl newline="false" spacing="normal" indent="6">
            <dt>Session-Id:</dt>
            <dd>the value for this header field is the same session id sess-id
      used in SDP (embedded in "o" the SDP parameter) "o=" line) and is assigned
      by the server. The messages without SDP MUST <bcp14>MUST</bcp14> include this
      header.
      header field. If a message has and an SDP body, this header field is
      optional. The method of &lt;session id&gt; sess-id allocation is up to the
      creating tool, but it is suggested that a UTC timestamp be
      used to ensure uniqueness.</t>

	<t hangText="Sequence-Number:">sequential uniqueness.</dd>
            <dt>Sequence-Number:</dt>
            <dd>sequential and cyclic positive integer
      number assigned to PING and BWIDTH messages, messages and acknowledged
      in 200 OK responses.</t>

	<t hangText="Timestamp:">this responses.</dd>
            <dt>Timestamp:</dt>
            <dd>this optional header field contains the system time
      (with the best possible accuracy). It indicates the time in
      which the PING request was sent. If this header field is present in
      PING messages, then the 200 OK response messages MUST <bcp14>MUST</bcp14> include
      this value.</t>

	<t hangText="Stage:">this value.</dd>
            <dt>Stage:</dt>
            <dd>this is used in the client's READY requests and the server's
      200 OK responses during the Negotiation and Continuity phases
      in order to synchronize the initiation of the measurements.
      Example:  Stage: 0</t>

	</list>
	</t> 0</dd>
          </dl>
        </section>
        <section title="Specific anchor="sec-4.3.2" numbered="true" toc="default">
          <name>Specific Q4S Request Header Fields" anchor="section-4.3.2"><t> Fields</name>
          <t>
   In addition to HTTP header fields, these are the specific Q4S
   request header fields</t>

	<t><list style="symbols"><t>User-Agent: this fields:</t>
          <dl newline="false" spacing="normal" indent="6">
            <dt>User-Agent:</dt>
            <dd>this header field contains information about the
      implementation of the user agent. This is for statistical
      purposes, the tracing of protocol violations, and the
      automated recognition of user agents for the sake of
      tailoring responses to avoid particular user agent
      limitations. User agents SHOULD <bcp14>SHOULD</bcp14> include this field with
      requests. The field MAY <bcp14>MAY</bcp14> contain multiple product tokens and
      comments identifying the agent and any sub-products which that
      form a significant part of the user agent. By convention, the
      product tokens are listed in order of their significance for
      identifying the application.</t>

	<t>Signature: this application.</dd>
            <dt>Signature:</dt>
            <dd><t>this header field contains a digital signature that can
      be used by the network, actuator Actuator, or policy server to validate
      the SDP, preventing security attacks. The signature Signature is an
      optional header field generated by the server according to the
      pre-agreed security policies between the Application Content
      Provider and the ISP. For example, a hash algorithm and
      encryption method such as SHA256 (RFC 4634 <xref target="ref-14"/>) target="RFC6234" format="default"/>
      and RSA (RFC
      8017 <xref target="ref-15"/>) target="RFC8017" format="default"/> based on the server certificate could be used.
      This certificate is supposed to be delivered by a
      Certification Authority (CA) or policy owner to the server.
      The signature is applied to the SDP body.

     <figure><artwork><![CDATA[ body.</t>
              <sourcecode type="abnf"><![CDATA[
      Signature= RSA ( SHA256 (<sdp>), <certificate> )
]]></artwork>
        </figure>

      If
]]></sourcecode>
              <t>If the signature Signature header field is not present, other validation mechanism
      MAY mechanisms
      <bcp14>MAY</bcp14> be implemented in order to provide assured quality with
      security and control.
              </t>

	<t>Measurements: this
            </dd>
            <dt>Measurements:</dt>
            <dd><t>this header field carries the measurements of the
      quality parameters in PING and BWIDTH requests. The format
      is:

	<figure><artwork><![CDATA[ </t>
              <sourcecode type="abnf"><![CDATA[
  Measurements: "l=" " "|[0..9999] ", j=" " "|[0..9999] ", pl="
  " "|[0.00 .. 100.00] ", bw=" " "|[0..999999]
]]></artwork>
	</figure>
]]></sourcecode>
              <t>
      Where "l" stands for latency followed by the measured value
      (in milliseconds)or milliseconds) or an empty space, "j" stands for jitter
      followed by the measured value (in milliseconds) or an empty
      space, "pl" stands for packetloss packet loss followed by the measured
      value (in percentage with two decimals) or an empty space space,
      and "bw" stands for bandwidth followed by the measured value
      (in kbps) or an empty space.</t>

	</list>
	</t>
            </dd>
          </dl>
        </section>
        <section title="Specific anchor="sec-4.3.3" numbered="true" toc="default">
          <name>Specific Q4S Response Header Fields" anchor="section-4.3.3"><t><list style="symbols"><t>Expires: its Fields</name>
          <dl newline="false" spacing="normal" indent="6">
              <dt>Expires:</dt>
               <dd><t>its purpose is to provide a sanity check and allow
      the server to close inactive sessions. If the client does not
      send a new request before the expiration time, the server MAY <bcp14>MAY</bcp14>
      close the session. The value MUST <bcp14>MUST</bcp14> be an integer integer, and the
      measurement units are milliseconds.<vspace blankLines="1"/> milliseconds.</t>
              <t>
	In order to keep the session open open, the server MUST <bcp14>MUST</bcp14> send a Q4S
      alert before the session expiration (Expires header), header field), with
      the same quality levels and an alert cause of "keep-alive".
      The purpose of this alert is to avoid TCP sockets (which sockets, which were
      opened with READY message) message, from being closed, specially in
      NAT scenarios.
	</t>

	</list>
	</t> scenarios.</t>
            </dd>
          </dl>
        </section>
      </section>
      <section title="Bodies" anchor="section-4.4"><t> anchor="sec-4.4" numbered="true" toc="default">
        <name>Bodies</name>
        <t>
   Requests, including new requests defined in extensions to this
   specification, MAY <bcp14>MAY</bcp14> contain message bodies unless otherwise noted.
   The interpretation of the body depends on the request method.</t>
        <t>
   For response messages, the request method and the response status
   code determine the type and interpretation of any message body.
   All responses MAY <bcp14>MAY</bcp14> include a body.</t>
        <t>
   The Internet media type of the message body MUST <bcp14>MUST</bcp14> be given by the
   Content-Type header field.</t>
        <section title="Encoding" anchor="section-4.4.1"><t> anchor="sec-4.4.1" numbered="true" toc="default">
          <name>Encoding</name>
          <t>
   The body MUST NOT <bcp14>MUST NOT</bcp14> be compressed. This mechanism is valid for
   other protocols such as HTTP and SIP (RFC 3261 <xref target="ref-22"/>), target="RFC3261" format="default"/>,
   but a compression/coding scheme will limit certain logical
   implementations of the way the request
   is parsed, thus, parsed to certain logical implementations, thus making
   the protocol concept more implementation dependent. In addition, the
   bandwidth calculation may not be valid if compression is used.
   Therefore, the HTTP Accept-Encoding request header "Accept-Encoding" field cannot be
   used in Q4S with different values than "identity" different from "identity", and if it is
   present in a request, the server MUST <bcp14>MUST</bcp14> ignore it. In addition, the
   response header "Content-Encoding" field Content-Encoding is optional, but if present,
   the unique permitted value is "identity".</t>
          <t>
   The body length in bytes MUST <bcp14>MUST</bcp14> be provided by the Content-Length
   header field. The "chunked" transfer encoding of HTTP/1.1 MUST NOT <bcp14>MUST NOT</bcp14>
   be used for Q4S (Note: Q4S.</t>
   <aside><t>Note: The chunked encoding modifies the body of a
   message in order to transfer it as a series of chunks, each one
   with its own size indicator.)</t> indicator.</t></aside>
        </section>
      </section>
    </section>
    <section title="Q4S anchor="sec-5" numbered="true" toc="default">
      <name>Q4S Method Definitions" anchor="section-5"><t> Definitions</name>
      <t>
   The Method token indicates the method to be performed on the
   resource identified by the Request-URI. The method is case-sensitive.</t>

	<figure><artwork><![CDATA[ case sensitive.</t>
      <sourcecode type="abnf"><![CDATA[
 Method  = "BEGIN" | "READY" | "PING" | "BWIDTH" |
           "Q4S-ALERT" | "Q4S-RECOVERY" | "CANCEL" | extension-method

 extension-method = token
]]></artwork>
	</figure>
]]></sourcecode>
      <t>
   The list of methods allowed by a resource can be specified in an
   "Allow"
   Allow header field (RFC 7231 <xref target="ref-2"/>). target="RFC7231" format="default"/>. The return code of the
   response always notifies the client when a method is currently
   allowed on a resource, since the set of allowed methods can change
   dynamically. Any server application SHOULD <bcp14>SHOULD</bcp14> return the status code
   405 (Method Not Allowed) if the method is known, but not allowed
   for the requested resource, and 501 (Not Implemented) if the
   method is unrecognized or not implemented by the server.</t>
      <section title="BEGIN" anchor="section-5.1"><t> anchor="sec-5.1" numbered="true" toc="default">
        <name>BEGIN</name>
        <t>
   The BEGIN method requests information from a resource identified
   by a Q4S URI. The semantics purpose of this method is to start the starting of a
   quality session.</t>
        <t>
   This method is only used only during the handshake Handshake phase to retrieve
   the SDP containing session id the sess-id and all quality and operation
   parameters for the desired application to run.</t>
        <t>
   When a BEGIN message is received by the server, any current
   quality session MUST <bcp14>MUST</bcp14> be cancelled, canceled, and a new session should be
   created.</t>
        <t>
   The response to a Q4S BEGIN request is not cacheable.</t>
      </section>
      <section title="READY" anchor="section-5.2"><t> anchor="sec-5.2" numbered="true" toc="default">
        <name>READY</name>
        <t>
   The READY method is used to synchronize the starting time for the
   sending of PING and BWIDTH messages over UDP between clients and
   servers. The stage Including the Stage header included field in this method is mandatory.</t>
        <t>
   This message is only used only in negotiation Negotiation and continuity Continuity phases,
   and only just before making a measurement. Otherwise (out (outside of this
   context), the server MUST <bcp14>MUST</bcp14> ignore this method.</t>
      </section>
      <section title="PING" anchor="section-5.3"><t> anchor="sec-5.3" numbered="true" toc="default">
        <name>PING</name>
        <t>
   This message is used during the negotiation Negotiation and continuity Continuity phases
   to measure the RTT and jitter of a session. The message MUST <bcp14>MUST</bcp14> be
   sent only over UDP ports.</t>
        <t>
   The fundamental difference between the PING and BWIDTH requests is
   reflected in the different measurements achieved with them. PING
   is a short message, and MUST it <bcp14>MUST</bcp14> be answered in order to measure RTT
   and jitter, whereas BWIDTH is a long message and MUST NOT <bcp14>MUST NOT</bcp14> be
   answered.</t>
        <t>
   PING is a request method that can be originated by either the client but also
   by or
   the server. Client MUST The client <bcp14>MUST</bcp14> also answer the server PING messages,
   assuming a "server role" for these messages during the measurement
   process.</t>
        <t>
   The
   Including the Measurements header included field in this method is mandatory, and
   provides updated measurements values for latency, jitter jitter, and
   packet loss to the counterpart.</t>
      </section>
      <section title="BWIDTH" anchor="section-5.4"><t> anchor="sec-5.4" numbered="true" toc="default">
        <name>BWIDTH</name>
        <t>
   This message is used only during the Negotiation phase to measure
   the bandwidth and packet loss of a session. The message MUST <bcp14>MUST</bcp14> be
   sent only over UDP ports.</t>
        <t>
   BWIDTH is a request method that can be originated by either the client
   but also by
   or the server. Both (client client and server) MUST NOT server <bcp14>MUST NOT</bcp14> answer
   BWIDTH messages.</t>
        <t>
   The
   Including the Measurements header included field in this method is mandatory and
   provides updated measurements values for bandwidth and packet loss
   to the counterpart.</t>
      </section>
      <section title="Q4S-ALERT" anchor="section-5.5"><t> anchor="sec-5.5" numbered="true" toc="default">
        <name>Q4S-ALERT</name>
        <t>
   This is the request message that Q4S generates when the
   measurements indicate that quality constraints are being violated.
   It is used during the negotiation Negotiation and continuity Continuity phases.</t>
        <t>
   This informative message indicates that the user experience is
   being degraded and includes the details of the problem (bandwidth,
   jitter, packet loss measurements). The Q4S-ALERT message does not
   contain any detail on the actions to be taken, which depends depend on
   the agreements between all involved parties.</t>
        <t>
   Q4S-ALERT request does not have to be answered with a response
   message unless
   Unless there is an error condition, but with an answer to a Q4S-ALERT
   request is optional and is formatted as a request Q4S-ALERT message.
   If there is an error condition, then a response message is sent.
   The response to a Q4S-ALERT request is not cacheable.</t>
        <t>
   This method MUST <bcp14>MUST</bcp14> be initiated by the server in both alerting
   modes. In the Q4S-aware-network alerting mode, the Q4S-ALERT messages
   are fired sent by the server and sent to the client, advising the
   network to react by itself. In the Reactive alerting mode, alert
   notifications are triggered by the server stack and sent to the
   Actuator(see Figure1
   Actuator (see <xref target="ref-reactive-scenario" format="default"/>, "Reactive Scenario").</t>

	<figure><artwork><![CDATA[
        <artwork name="" type="" align="left" alt=""><![CDATA[
Client----q4s----SERVER STACK--->ACTUATOR-->APP OR POLICY SERVER
]]></artwork>
	</figure>
        <t>
   The way in which the server stack notifies the Actuator is
   implementation dependent, and the communication between the
   Actuator and the network policy server is defined by the protocol
   and API that the policy server implements.</t>
      </section>
      <section title="Q4S-RECOVERY" anchor="section-5.6"><t> anchor="sec-5.6" numbered="true" toc="default">
        <name>Q4S-RECOVERY</name>
        <t>
   This is the request message that Q4S generates when the
   measurements indicate that quality constraints were being violated
   but they constraints, which had been violated,
   have been fulfilled during a period of time already
   (recovery pause).
   ("recovery-pause"). It is used during the negotiation Negotiation and continuity Continuity
   phases.</t>
        <t>
   This informative message indicates that the qos-level "qos-level" could be
   increased gradually until the initial qos-level "qos-level" is recovered (the
   qos-level
   "qos-level" established at the beginning os of the session of that was
   decreased during violation of constraints). constraints. See <xref target="sec-7.9" format="default"/>).
   The Q4S-RECOVERY
   message does not contain any detail on the actions to be taken,
   which depends on the agreements between all involved parties.</t>
        <t>
   The answer to a Q4S-RECOVERY request is formatted as a request
   Q4S-RECOVERY message. A Q4S-RECOVERY request MUST NOT <bcp14>MUST NOT</bcp14> be answered
   with a response message unless there is an error condition, but with an answer formatted
   as a request Q4S-RECOVERY message. condition.
   The response to a Q4S-RECOVERY request is not cacheable.</t>
        <t>
   As for
   Like the Q4S-ALERT message, the Q4S-RECOVERY method is always
   initiated by the server in both alerting modes. In the
   Q4S-aware-network alerting mode, the Q4S-RECOVERY messages are fired sent by the
   server and sent to the client, advising the network to react by
   itself. In the Reactive alerting mode, recovery notifications are
   triggered by the server stack and sent to the Actuator(see Figure1 Actuator (see <xref target="ref-reactive-scenario" format="default"/>,
   "Reactive Scenario").</t>
      </section>
      <section title="CANCEL" anchor="section-5.7"><t> anchor="sec-5.7" numbered="true" toc="default">
        <name>CANCEL</name>
        <t>
   The semantics purpose of the CANCEL message is the release of the Q4S session
   id
   Session-Id and the possible resources assigned to the session. This
   message could be triggered by the Q4S stack or by the application
   using the stack (through an implementation dependent implementation-dependent API).</t>
        <t>
   In the same way as Q4S-ALERT, CANCEL must not be answered with a
   response message, but with an answer formatted as a request Q4S-CANCEL message.</t>
        <t>
   In the Reactive scenario, the server stack MUST <bcp14>MUST</bcp14> react to the Q4S
   CANCEL messages received from the client by forwarding a cancel
   notification to the Actuator, in order to release possible
   assigned resources for the session (at the application or at the policy
   server). The Actuator MUST <bcp14>MUST</bcp14> answer the cancel notification with a
   cancel acknowledge towards the server stack, acknowledging the
   reception.</t>
      </section>
    </section>
    <section title="Response Codes" anchor="section-6"><t> anchor="sec-6" numbered="true" toc="default">
      <name>Response Codes</name>
      <t>
   Q4S response codes are used for TCP and UDP. However, in UDP UDP, only
   the response code 200 is used.</t>
      <t>
   The receiver of an unknown response code must take a generic
   action for the received error group (1XX, 2XX, 3XX, 4XX, 5XX,
   6XX). (1xx, 2xx, 3xx, 4xx, 5xx,
   6xx). In case of an unknown error group, the expected action should
   be the same as with 6XX the 6xx error group.</t>
      <section title="100 Trying" anchor="section-6.1"><t> anchor="sec-6.1" numbered="true" toc="default">
        <name>100 Trying</name>
        <t>
   This response indicates that the request has been received by the
   next-hop server and that some unspecified action is being taken on
   behalf of this request (for example, a database is being
   consulted). This response, like all other provisional responses,
   stops retransmissions of a Q4S-ALERT during the alert-pause "alert-pause" time.</t>
      </section>
      <section title="Success 2xx" anchor="section-6.2"><t> anchor="sec-6.2" numbered="true" toc="default">
        <name>Success 2xx</name>
        <t>
   2xx responses give information about the success of a request.</t>
        <section title="200 OK" anchor="section-6.2.1"><t> anchor="sec-6.2.1" numbered="true" toc="default">
          <name>200 OK</name>
          <t>
   The request has succeeded.</t>
        </section>
      </section>
      <section title="Redirection 3xx" anchor="section-6.3"><t> anchor="sec-6.3" numbered="true" toc="default">
        <name>Redirection 3xx</name>
        <t>
   3xx responses give information about the user's new location, location or
   about alternative services that might be able to satisfy the
   request.</t>
        <t>
   The requesting client SHOULD <bcp14>SHOULD</bcp14> retry the request at the new
   address(es) given by the Location header field.</t>
      </section>
      <section title="Request anchor="sec-6.4" numbered="true" toc="default">
        <name>Request Failure 4xx" anchor="section-6.4"><t> 4xx</name>
        <t>
   4xx responses are definite failure responses from a particular
   server. The client SHOULD NOT <bcp14>SHOULD NOT</bcp14> retry the same request without
   modification (for example, adding appropriate headers header fields or SDP
   values). However, the same request to a different server might be
   successful.</t>
        <section title="400 anchor="sec-6.4.1" numbered="true" toc="default">
          <name>400 Bad Request" anchor="section-6.4.1"><t> Request</name>
          <t>
   The request could not be understood due to malformed syntax. The
   Reason-Phrase SHOULD <bcp14>SHOULD</bcp14> identify the syntax problem in more detail,
   for example, "Missing Sequence-Number header field".</t>
        </section>
        <section title="404 anchor="sec-6.4.2" numbered="true" toc="default">
          <name>404 Not Found" anchor="section-6.4.2"><t> Found</name>
          <t>
   The server has definitive information that the user does not exist
   at the domain specified in the Request-URI. This status is also
   returned if the domain in the Request-URI does not match any of
   the domains handled by the recipient of the request.</t>
        </section>
        <section title="405 anchor="sec-6.4.3" numbered="true" toc="default">
          <name>405 Method Not Allowed" anchor="section-6.4.3"><t> Allowed</name>
          <t>
   The method specified in the Request-Line is understood, but not
   allowed for the address identified by the Request-URI.</t>
          <t>
   The response MUST <bcp14>MUST</bcp14> include an Allow header field containing a list
   of valid methods for the indicated address.</t>
        </section>
        <section title="406 anchor="sec-6.4.4" numbered="true" toc="default">
          <name>406 Not Acceptable" anchor="section-6.4.4"><t> Acceptable</name>
          <t>
   The resource identified by the request is only able of generating to generate
   response entities that have content characteristics that are not acceptable
   according to the Accept header field sent in the request.</t>
        </section>
        <section title="408 anchor="sec-6.4.5" numbered="true" toc="default">
          <name>408 Request Timeout" anchor="section-6.4.5"><t> Timeout</name>
          <t>
   The server could not produce a response within a suitable amount
   of time, and the client MAY <bcp14>MAY</bcp14> repeat the request without
   modifications at any later time</t> time.</t>
        </section>
        <section title="413 anchor="sec-6.4.6" numbered="true" toc="default">
          <name>413 Request Entity Too Large" anchor="section-6.4.6"><t> Large</name>
          <t>
   The server is refusing to process a request because the request
   entity-body is larger than the one that the server is willing or
   able to process. The server MAY <bcp14>MAY</bcp14> close the connection to prevent
   the client from continuing the request.</t>
        </section>
        <section title="414 anchor="sec-6.4.7" numbered="true" toc="default">
          <name>414 Request-URI Too Long" anchor="section-6.4.7"><t> Long</name>
          <t>
   The server is refusing to process the request because the Request-URI is longer than the one that the server accepts.</t>
        </section>
        <section title="415 anchor="sec-6.4.8" numbered="true" toc="default">
          <name>415 Unsupported Media Type" anchor="section-6.4.8"><t> Type</name>
          <t>
   The server is refusing to process the request because the message
   body of the request is in a format not supported by the server for
   the requested method. The server MUST <bcp14>MUST</bcp14> return a list of acceptable
   formats using the Accept, Accept-Encoding, or Accept-Language
   header field, depending on the specific problem with the content.</t>
        </section>
        <section title="416 anchor="sec-6.4.9" numbered="true" toc="default">
          <name>416 Unsupported URI Scheme" anchor="section-6.4.9"><t> Scheme</name>
          <t>
   The server cannot process the request because the scheme of the
   URI in the Request-URI is unknown to the server.</t>
        </section>
      </section>
      <section title="Server anchor="sec-6.5" numbered="true" toc="default">
        <name>Server Failure 5xx" anchor="section-6.5"><t> 5xx</name>
        <t>
   5xx responses are failure responses given when a server itself is
   having trouble.</t>
        <section title="500 anchor="sec-6.5.1" numbered="true" toc="default">
          <name>500 Server Internal Error" anchor="section-6.5.1"><t> Error</name>
          <t>
   The server encountered an unexpected condition that prevented it
   from fulfilling the request. The client MAY <bcp14>MAY</bcp14> display the specific
   error condition and MAY <bcp14>MAY</bcp14> retry the request after several seconds.</t>
        </section>
        <section title="501 anchor="sec-6.5.2" numbered="true" toc="default">
          <name>501 Not Implemented" anchor="section-6.5.2"><t> Implemented</name>
          <t>
   The server does not support the functionality required to fulfill
   the request. This is the appropriate response when a Server server does
   not recognize the request method method, and it is not capable of
   supporting it for any user.</t>
          <t>
   Note that a 405 (Method Not Allowed) is sent when the server
   recognizes the request method, but that method is not allowed or
   supported.</t>
        </section>
        <section title="503 anchor="sec-6.5.3" numbered="true" toc="default">
          <name>503 Service Unavailable" anchor="section-6.5.3"><t> Unavailable</name>
          <t>
   The server is temporarily unable to process the request due to a
   temporary overloading or maintenance of the server. The server MAY <bcp14>MAY</bcp14>
   indicate when the client should retry the request in a Retry-After
   header field. If no Retry-After is given, the client MUST <bcp14>MUST</bcp14> act as
   if it had received a 500 (Server Internal Error) response.</t>
          <t>
   A client receiving a 503 (Service Unavailable) SHOULD <bcp14>SHOULD</bcp14> attempt to
   forward the request to an alternate server. It SHOULD NOT <bcp14>SHOULD NOT</bcp14> forward
   any other requests to that server for the duration specified in
   the Retry-After header field, if present.</t>
          <t>
   Servers MAY <bcp14>MAY</bcp14> refuse the connection or drop the request instead of
   responding with 503 (Service Unavailable).</t>
        </section>
        <section title="504 anchor="sec-6.5.4" numbered="true" toc="default">
          <name>504 Server Time-out" anchor="section-6.5.4"><t> Time-Out</name>
          <t>
   The server did not receive a timely response from an external
   server it accessed in attempting to process the request.</t>
        </section>
        <section title="505 anchor="sec-6.5.5" numbered="true" toc="default">
          <name>505 Version Not Supported" anchor="section-6.5.5"><t> Supported</name>
          <t>
   The server does not support, or refuses to support, the Q4S
   protocol version that was used in the request. The server is
   indicating that it is unable or unwilling to complete the request
   using the same major version as the client, other than with this
   error message.</t>
          <t>
   In the case that the Q4S version is not supported, this error may be
   sent by the server in handshake the Handshake phase just after receiving the
   first BEGIN message from client.</t>
        </section>
        <section title="513 anchor="sec-6.5.6" numbered="true" toc="default">
          <name>513 Message Too Large" anchor="section-6.5.6"><t> Large</name>
          <t>
   The server was unable to process the request since because the message
   length exceeded its capabilities.</t>
        </section>
      </section>
      <section title="Global anchor="sec-6.6" numbered="true" toc="default">
        <name>Global Failures 6xx" anchor="section-6.6"><t> 6xx</name>
        <t>
   6xx responses indicate that a server has definitive information
   about a particular policy not satisfied for processing the
   request.</t>
        <section title="600 session does not exist" anchor="section-6.6.1"><t> anchor="sec-6.6.1" numbered="true" toc="default">
          <name>600 Session Does Not Exist</name>
          <t>
   The Session-Id is not valid</t> valid.</t>
        </section>
        <section title="601 quality level not allowed" anchor="section-6.6.2"><t> anchor="sec-6.6.2" numbered="true" toc="default">
          <name>601 Quality Level Not Allowed</name>
          <t>
   The QOS level "qos-level" requested is not allowed for the pair client/server</t> client/server pair.</t>
        </section>
        <section title="603 anchor="sec-6.6.3" numbered="true" toc="default">
          <name>603 Session not allowed" anchor="section-6.6.3"><t> Not Allowed</name>
          <t>
   The session is not allowed due to some policy (number (the number of sessions
   allowed for the server is exceeded, or the time band of the Q4S-ALERT
   is not allowed for the pair client/server, client/server pair, etc.).</t>
        </section>
        <section title="604 authorization not allowed" anchor="section-6.6.4"><t> anchor="sec-6.6.4" numbered="true" toc="default">
          <name>604 Authorization Not Allowed</name>
          <t>
   The policy server does not authorize the Q4S-ALERT quality session
   improvement operation due to an internal or external reason.</t>
        </section>
      </section>
    </section>
    <section title="Protocol" anchor="section-7"><t> anchor="sec-7" numbered="true" toc="default">
      <name>Protocol</name>
      <t>
   This section describes the measurement procedures, the SDP
   structure of the Q4S messages, the different Q4S protocol phases phases,
   and the messages exchanged in them.</t>
      <section title="Protocol Phases" anchor="section-7.1"><t> anchor="sec-7.1" numbered="true" toc="default">
        <name>Protocol Phases</name>
        <t>
   All elements of the IP network contribute to the quality in
   terms of latency, jitter, bandwidth bandwidth, and packet loss. All these
   elements have their own quality policies in terms of priorities,
   traffic mode, etc. etc., and each element has its own way to manage the
   quality. The purpose of a quality connection is to establish an
   end-to-end communication with enough quality for the application
   to function flawlessly.</t>
        <t>
   To monitor quality constraints of the application, four phases are
   defined and can be seen in figure 5:</t> <xref target="ref-session-lifetime-phases" format="default"/>:</t>
        <figure title="Session lifetime phases" anchor="ref-session-lifetime-phases"><artwork><![CDATA[ anchor="ref-session-lifetime-phases">
          <name>Session Lifetime Phases</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
+---------------------------------------------------------------+
|                                                               |
|                                                               |
| Handshake ---> Negotiation -+--> Continuity ----> Termination |
|                   A         |    (app start) |    (app end)   |
|                   |         V        A       V       A        |
|                   |     violated     |     violated  |        |
|                   |    constraints   |   constraints |        |
|                   |      |     |     |_______|   ____|        |
|                   |      |     |     +-------+       |        |
|                   |      |     |                     |        |
|                   +------+     +---------------------+        |
|                                                               |
+---------------------------------------------------------------+
]]></artwork>
        </figure>
	<t><list style="symbols"><t>Handshake phase: in
        <dl spacing="normal">
          <dt>Handshake phase:</dt><dd>in which the server is contacted by the
      client
      client, and in the answer message message, the quality constraints for
      the application is are communicated embedded in an SDP.</t>

	<t>Negotiation phase: in the embedded SDP.</dd>
          <dt>Negotiation phase:</dt><dd>in which the quality of the connection is
      measured in both directions (latency, jitter, bandwidth bandwidth, and
      packet loss), and Q4S messages may be sent in order to alert
      if the measured quality does not meet the constraints. This
      phase is iterative until quality constraints are reached, or
      the session is cancelled canceled after a number of measurement cycles
      with consistent violation of the quality constraints. The
      number of measurement cycles executed depends on the qos-level "qos-level",
      which is incremented in each cycle until a maximum qos-level "qos-level" value
      is reached. Just after reaching the quality
      requirements, Q4S provides a simple optional mechanism using
      HTTP to start the application.</t>

	<t>Continuity phase: in application.</dd>
          <dt>Continuity phase:</dt><dd>in which quality is continuously measured.
      In this phase phase, the measurements MUST <bcp14>MUST</bcp14> avoid disturbing the
      application by consuming network resources. If quality
      constraints are not met, the server stack will notify the
      Actuator with an alert notification. If later the quality
      improves, the server stack will notify the Actuator, in this
      case with a recovery notification. After several alert
      notifications with no quality improvements, the Q4S stack
      SHOULD
      <bcp14>SHOULD</bcp14> move to the Termination phase.</t>

	<t>Termination phase: in phase.</dd>
          <dt>Termination phase:</dt><dd>in which the Q4S session is terminated.
      The application may be closed too also or may not start.</t>

	</list>
	</t> start.</dd>
        </dl>
      </section>
      <section title="SDP Structure" anchor="section-7.2"><t> anchor="sec-7.2" numbered="true" toc="default">
        <name>SDP Structure</name>
        <t>
   The original goal of SDP was to announce necessary information for
   the participants and multicast MBONE (Multicast Backbone)
   applications. Right now, its use has been extended to the
   announcement and the negotiation of multimedia sessions. The
   purpose of Q4S is not to establish media stream sessions, but to
   monitor a quality connection. This connection may be later used to
   establish any type of session including media sessions; Q4S does
   not impose any conditions on the type of communication requiring
   quality parameters.</t>
        <t>
   SDP will be used by Q4S to exchange quality constraints and will
   therefore always have all the media attributes ("m") descriptions ("m=") set to zero.</t>
        <t>
   The SDP embedded in the messages is the container of the quality
   parameters. As these may vary depending on the direction of the
   communication (to and from the client) client), all quality parameters need
   to specify the uplink and downlink values: &lt;uplink&gt; / &lt;downlink&gt;. &lt;downlink&gt;
   (see <xref target="sec-7.5.3" format="default"/> for an example).
   When one or both of these values are empty, it MUST <bcp14>MUST</bcp14> be understood
   as needing no constraint on that parameter and/or that direction.</t>
        <t>
   The uplink direction MUST <bcp14>MUST</bcp14> be considered as being the communication
   from the client to the server. The downlink direction MUST <bcp14>MUST</bcp14> be
   considered as being the communication from the server to the
   client.</t>
        <t>
   The SDP information can comprise all or some of the following
   parameters shown in the example below. This is an example of an
   SDP message used by Q4S included in the 200 OK response to a Q4S
   BEGIN request.</t>

	<figure><artwork><![CDATA[
        <sourcecode type="sdp"><![CDATA[
v=0
o=q4s-UA 53655765 2353687637 IN IP4 192.0.2.33
s=Q4S
i=Q4S parameters
t=0 0
a=qos-level:0/0
a=alerting-mode:Reactive
a=alert-pause:5000
a=public-address:client IP4 198.51.100.51
a=public-address:server IP4 198.51.100.58
a=measurement:procedure default(50/50,75/75,5000,40/80,100/256)
a=latency:40
a=jitter:10/10
a=bandwidth:20/6000
a=packetloss:0.50/0.50
a=flow:app clientListeningPort TCP/10000-20000
a=flow:app clientListeningPort UDP/15000-18000
a=flow:app serverListeningPort TCP/56000
a=flow:app serverListeningPort UDP/56000
a=flow:q4s clientListeningPort UDP/55000
a=flow:q4s clientListeningPort TCP/55001
a=flow:q4s serverListeningPort UDP/56000
a=flow:q4s serverListeningPort TCP/56001
]]></artwork>
	</figure>
]]></sourcecode>
        <t>
   As quality constraints may be changed by applications at any time
   during the Q4S session lifetime, any Q4S 200 OK response sent by
   the server to the client in the Negotiation and Continuity phases
   could also include an SDP body with the new quality requirements
   stated by the applications from then on. Therefore, in response to
   any PING request sent by the client to the server, the server
   could send a Q4S 200 OK with an embedded SDP message embedded that
   specifies new quality constraints requested by the application.</t>
        <section title="&quot;qos-level&quot; attribute" anchor="section-7.2.1"><t> anchor="sec-7.2.1" numbered="true" toc="default">
          <name>"qos-level" Attribute</name>
          <t>
   The "qos-level" attribute contains the QoS level for uplink and
   downlink. Default values are 0 for both directions. The meaning of
   each level is out of scope of Q4S, but a higher level SHOULD <bcp14>SHOULD</bcp14>
   correspond to a better service quality.</t>
          <t>
   Appropriate attribute values: [0..9] "/" [0..9]</t>
          <t>
   The "qos-level" attribute may be changed during the session
   lifetime
   lifetime, raising or lowering the value as necessary following the
   network measurements and the application needs.</t>
        </section>
        <section title="&quot;alerting-mode&quot; attribute" anchor="section-7.2.2"><t> anchor="sec-7.2.2" numbered="true" toc="default">
          <name>"alerting-mode" Attribute</name>
          <t>
   The "alerting-mode" attribute specifies the player in charge of
   triggering Q4S alerts in the case of constraint violation. There are
   two possible values:</t>
          <t>
   Appropriate attribute values: &lt;"Q4S-aware-network"|"Reactive"&gt;</t>

	<t><list style="format (%c)">
        <t>Q4S-aware-network: Q4S ALERT
          <dl newline="false" spacing="normal" indent="6">
            <dt>Q4S-aware-network:</dt> <dd>Q4S-ALERT messages are triggered by the
	server to the client. In this case case, the network is supposed to
        be Q4S aware, and reacts by itself to these alerts.
	</t>

	<t> Reactive: alert alerts.</dd>
            <dt> Reactive:</dt> <dd>alert notifications are sent by the server stack to
	the Actuator. In this case case, the network is not Q4S aware aware, and a
      specific node (Actuator) is in charge of triggering tuning
      mechanisms.,
      mechanisms, either on the network or in the application.
	</t>

	</list>
	</t>
	</dd>
          </dl>
          <t>
   The "alerting-mode" attribute is optional optional, and if not present present,
   Reactive alerting mode is assumed.</t>
        </section>
        <section title="&quot;alert-pause&quot; attribute" anchor="section-7.2.3"><t> anchor="sec-7.2.3" numbered="true" toc="default">
          <name>"alert-pause" Attribute</name>
          <t>
   In the Q4S-aware-network scenario, the "alert-pause" attribute
   specifies the amount of time (in milliseconds) the server waits
   between consecutive Q4S ALERT Q4S-ALERT messages sent to the client. In the
   Reactive scenario, the "alert-pause" attribute specifies the
   amount of time (in milliseconds) the server stack waits between
   consecutive alert notifications sent to the Actuator. Measurements
   are not stopped in Negotiation or Continuity Phases phases during this
   period of time, but no Q4S ALERT Q4S-ALERT messages or alert notifications
   are fired, even with violated quality constraints, allowing for either
   network reconfigurations or application adjustments.</t>
          <t>
   Appropriate attribute values: [0..60000]</t>
        </section>
        <section title="&quot;recovery-pause&quot; attribute" anchor="section-7.2.4"><t> anchor="sec-7.2.4" numbered="true" toc="default">
          <name>"recovery-pause" Attribute</name>
          <t>
   In the Q4S-aware-network scenario, the "recovery-pause" attribute
   specifies the amount of time (in milliseconds) the server waits
   for initiating the qos-level "qos-level" recovery process. Once the recovery
   process has started, the "recovery-pause" attribute also states
   the amount of time (in milliseconds) between consecutive Q4S-RECOVERY
   messages sent by the server to the client (in the Q4S-aware-network scenario), scenario) or between recovery notifications sent by
   the server stack to the Actuator (in the Reactive scenario).</t>
          <t>
   Appropriate attribute values: [0..60000]</t>
        </section>
        <section title="&quot;public-address&quot; attributes" anchor="section-7.2.5"><t> anchor="sec-7.2.5" numbered="true" toc="default">
          <name>"public-address" Attributes</name>
          <t>
   This attribute contains the public IP address of the client and
   the server. The server fills these attributes with his its own public
   IP address and the public IP address of the first message received
   from the client in the handshake Handshake phase.</t>
          <t>
   The purpose of these attributes is to make available the
   addressing information to the network policy server or other external
   entities in charge of processing Q4S-ALERT messages.</t>
          <t>
   Appropriate attribute values:&lt;"client"|"server"&gt;&lt;"IP4"|"IP6"&gt; values: &lt;"client"|"server"&gt; &lt;"IP4"|"IP6"&gt;
   &lt;value of IP address&gt;</t>
        </section>
        <section title="&quot;latency&quot; attribute" anchor="section-7.2.6"><t> anchor="sec-7.2.6" numbered="true" toc="default">
          <name>"latency" Attribute</name>
          <t>
   The maximum latency (considered equal for uplink and downlink)
   tolerance are is specified in the "latency" attribute, expressed in
   milliseconds. In the Q4S-aware-network scenario, if the latency
   constraints are not met, a Q4S-ALERT method will be sent to the
   client. In the Reactive scenario, if the latency constraints are
   not met, an alert notification will be sent to the Actuator. If
   the "latency" attribute is not present or has a 0 value, no
   latency constraints need to be met met, and no measurements MAY <bcp14>MAY</bcp14> be
   taken.</t>
          <t>
   Appropriate attribute values: [0..9999]</t>
        </section>
        <section title="&quot;jitter&quot; attribute" anchor="section-7.2.7"><t> anchor="sec-7.2.7" numbered="true" toc="default">
          <name>"jitter" Attribute</name>
          <t>
   The maximum uplink and downlink jitter tolerance are is specified in
   the "jitter" attribute, expressed in milliseconds. In the Q4S-aware-network scenario, if the jitter constraints are not met, a
   Q4S-ALERT method will be sent to the client. In the Reactive
   scenario, if the latency constraints are not met, an alert
   notification will be sent to the Actuator. If the "jitter" attribute
   is not present or has a 0 value, no jitter constraints need to be
   met
   met, and no measurements MAY <bcp14>MAY</bcp14> be taken.</t>
          <t>
   Appropriate attribute values: [0..9999] "/" [0..9999]</t>
        </section>
        <section title="&quot;bandwidth&quot; attribute" anchor="section-7.2.8"><t> anchor="sec-7.2.8" numbered="true" toc="default">
          <name>"bandwidth" Attribute</name>
          <t>
   The minimum uplink and downlink bandwidth are is specified in the
   "bandwidth" attribute, expressed in kbps. In the Q4S-aware-network
   scenario, if the bandwidth constraints are not met, a Q4S-ALERT
   method will be sent to the client. In the Reactive scenario, an
   alert notification will be sent to the Actuator. If the "bandwidth"
   attribute is not present or has a 0 value, no bandwidth
   constraints need to be met met, and no measurements MAY <bcp14>MAY</bcp14> be taken.</t>
          <t>
   Appropriate attribute values: [0..99999] "/" [0..99999]</t>
        </section>
        <section title="&quot;packetloss&quot; attribute" anchor="section-7.2.9"><t> anchor="sec-7.2.9" numbered="true" toc="default">
          <name>"packetloss" Attribute</name>
          <t>
   The maximum uplink and downlink packet loss tolerance are is
   specified in the "packetloss" attribute expressed in percentage
   (two decimal accuracy). In the Q4S-aware-network scenario, if the
   packetloss constraints are not met, a Q4S-ALERT method will be
   sent to the client. In the Reactive scenario, an alert
   notification will be sent to the Actuator. If the "packetloss"
   attribute is not present or has a 0 value, no packetloss packet loss
   constraints need to be met met, and no measurements MAY <bcp14>MAY</bcp14> be taken.</t>
          <t>
   Appropriate attribute values: [0.00 ..100.00] "/"[0.00 ..100.00]</t>
        </section>
        <section title="&quot;flow&quot; attributes" anchor="section-7.2.10"><t> anchor="sec-7.2.10" numbered="true" toc="default">
          <name>"flow" Attributes</name>
          <t>
   These attributes specify the flows (protocol, destination
   IP/ports) of data over TCP and UDP ports to be used in uplink and
   downlink communications.</t>
          <t>
   Several "flow" attributes can be defined. These flows identify the
   listening port (client or server), the protocol (TCP or UDP) (RFC
   793 <xref target="ref-16"/> and RFC 768 target="RFC0793" format="default"/>
   or UDP <xref target="ref-17"/>) target="RFC0768" format="default"/>)
   with the range of ports that are going
   to be used by the application and, of course, by the Q4S protocol
   (for quality measurements). All defined flows (app ("app" and q4s) "q4s") will
   be considered within the same quality profile, which is determined
   by the qos-level "qos-level" attribute in each direction. This allows us to
   assume that measurements on q4s "q4s" flows are the same experimented as experienced by
   the application application, which is using app "app" flows.</t>
          <t>
   During negotiation Negotiation and continuity phases Continuity phases, the specified Q4S ports
   in the "flow:q4s" attributes of SDP will be used for Q4S messages.</t>
          <t>
   The Q4S flows comprise two UDP flows and two TCP flows (one uplink
   and one downlink for each one) one), whereas application traffic MAY <bcp14>MAY</bcp14>
   consist of many flows, depending on its nature. The handshake Handshake
   phase takes place through the Q4S Contact URI, using the standard
   Q4S TCP port. However, the negotiation Negotiation and continuity Continuity phases will
   take place on the specified Q4S ports (UDP and TCP) specified in
   the SDP.</t>
          <t>
   The "clientListeningPort" is a port in on which the client listens
   for server requests and MUST <bcp14>MUST</bcp14> be used as the origin port of client
   responses. The "serverListeningPort" is a port in on which the server is
   listening for incoming messages from the client. The origin port
   of server responses may be different than the "serverListeningPort"
   value.</t>
          <t>
   If "clientListeningPort" is zero (a=flow:q4s ("a=flow:q4s clientListeningPort
   TCP/0),
   TCP/0"), the client MAY <bcp14>MAY</bcp14> choose one randomly as per OS standard
   rules. Client ports inside the SDP must always be matched against
   actual received port values on the server side in order to deal
   with NAT/NATP NAT/NAPT devices. If a zero value or incorrect value is
   present, the server must set the value to the received origin port in
   the next message with SDP (200 OK, ALERT ALERT, and CANCEL messages).</t>

	<figure><artwork><![CDATA[
          <sourcecode type="abnf"><![CDATA[
Attribute values:
   <"q4s"|"app"> <"serverListeningPort"|"clientListeningPort">
<"UDP"|"TCP"> <0..65535>[ <0..65535> [ "-" [0..65535]]
]]></artwork>
	</figure>
]]></sourcecode>
        </section>
        <section title="&quot;measurement&quot; attributes" anchor="section-7.2.11"><t> anchor="sec-7.2.11" numbered="true" toc="default">
          <name>"measurement" Attributes</name>
          <t>
   These attributes contain the measurement procedure and the results
   of the quality measurements.</t>
          <t>
   Measurement parameters are included using the session attribute
   "measurement". The first measurement parameter is the procedure.
   Q4S provides a "default" procedure for measurements, but others
   like RTP/RTCP might be used and defined later. This document will
   only define and explain the "default" procedure.</t>
          <t>
   In the initial client request request, a set of measurement procedures can
   be sent to the server for negotiation. One measurement procedure
   line MUST <bcp14>MUST</bcp14> be included in the SDP message for each proposed method.
   The server MUST <bcp14>MUST</bcp14> answer with only one line with the chosen
   procedure.</t>
          <t>
   For each procedure, a set of values of parameters separated by ","
   can be included in the same attribute line. The amount and type of
   parameters depends on the procedure type.</t>
          <t>
   In the following example example, the "default" procedure type is chosen:</t>

        <figure><artwork><![CDATA[
          <sourcecode type="sdp"><![CDATA[
   a=measurement:procedure default(50/50,75/75,5000,40/80,100/256)
        ]]></artwork></figure>
        ]]></sourcecode>
          <t>
   In the "default" procedure, the meaning of these parameters is:</t>

	<t><list style="symbols"><t>The is
the following:</t>
          <ul spacing="normal">
            <li>The first parameter is the interval of time (in milliseconds)
      between PING requests during the negotiation Negotiation phase. Uplink
      and downlink values from the client's point of view are
      separated by "/". This allows having different responsiveness
      values depending on the control resources used in each
      direction.</t>

	<t>The
      direction.</li>
            <li>The second parameter is the time interval (in milliseconds)
      between PING requests during the continuity Continuity phase. Uplink and
      downlink values are separated by "/". This allows having two
      different responsiveness values depending on the control
      resources used in each direction.</t>

	<t>The direction.</li>
            <li>The third parameter is the time interval to be used to
      measure bandwidth during the negotiation phase.</t>

	<t>The Negotiation phase.</li>
            <li>The fourth parameter indicates the window size for jitter and
      latency calculations. Uplink and downlink values are
      separated by "/".</t>

	<t>The "/".</li>
            <li>The fifth parameter indicates the window size for packet loss
      calculations. Uplink and downlink values are separated by
      "/".</t>

	</list>
	</t>
      "/".</li>
          </ul>
          <t>
   There are four more measurement "measurement" attributes:</t>

	<figure><artwork><![CDATA[
          <sourcecode type="sdp"><![CDATA[
a=measurement:latency 45
a=measurement:jitter 3/12
a=measurement:bandwidth 200/9800
a=measurement:packetloss 0.00/1.00
]]></artwork>
	</figure>
]]></sourcecode>
          <t>
   The latency, jitter, bandwidth "measurement:latency", "measurement:jitter", "measurement:bandwidth", and packet-loss measurement "measurement:packetloss"
   attributes contain the values measured for each of these quality
   parameters in uplink and downlink directions. Notice that latency
   is considered equal for uplink and downlink directions. Quality
   parameter values in these measurement "measurement" attributes provide a
   snapshot of the quality reached and MUST <bcp14>MUST</bcp14> only be
   included in Q4S-ALERT messages in the SDP body such that they can be protected
   from malicious attacks as these alerts include a signature of the
   SDP body in the header. The rest of the messages will include the
   measured values in the Measurements header.</t> header field.</t>
          <t>
   In the case of procedure "default", the "default" procedure, the valid values are:</t>

	<figure><artwork><![CDATA[ are as follows:</t>
          <sourcecode type="abnf"><![CDATA[
a=measurement:procedure default,[0..999]"/" [0..999]  "," [0..999]
"/" [0..999] "," [0..9999] "," [0..999]/[0..999] ","
[0..999]/[0..999]
]]></artwork>
	</figure>
]]></sourcecode>
        </section>
        <section title="&quot;max-content-length&quot; attribute" anchor="section-7.2.12"><t> anchor="sec-7.2.12" numbered="true" toc="default">
          <name>"max-content-length" Attribute</name>
          <t>
   The adaptation of measurement traffic to approximate the actual
   data streams' characteristics is convenient to accurately estimate
   the expected QoS for applications. Particularly, packet size can
   have a remarkable effect on bandwidth estimations. Moreover, this
   can produce problems depending on the MTU of the end hosts and
   links along the path.</t>
          <t>
   Therefore, the maximum content length MAY <bcp14>MAY</bcp14> be set in an attribute
   denoted as "max-content-length". Its value MUST <bcp14>MUST</bcp14> be given in bytes
   and MUST NOT <bcp14>MUST NOT</bcp14> include application, transport, network network, or link layer
   headers, i.e., size of the content length at the application
   layer. If not set, the value MUST <bcp14>MUST</bcp14> be 1000 bytes.</t>
          <t>
   Furthermore, this attribute MAY <bcp14>MAY</bcp14> be used to inform about communicate MTU limits
   in end points, endpoints, hence reducing possible bias as a result of
   network-layer fragmentation.</t>
          <t>
   For instance:</t>
          <t>
   a=max-content-length:1300</t>
        </section>
      </section>
      <section title="Measurements" anchor="section-7.3"><t> anchor="sec-7.3" numbered="true" toc="default">
        <name>Measurements</name>
        <t>
   This section describes the way quality parameters are measured as
   defined by the "default" procedure. Measurements MUST <bcp14>MUST</bcp14> be taken for
   any quality parameter with constraints, that is, specified in the
   SDP attributes with non-zero values. For non-present attributes absent attributes,
   measurements MAY <bcp14>MAY</bcp14> be omitted.</t>
        <section title="Latency" anchor="section-7.3.1"><t> anchor="sec-7.3.1" numbered="true" toc="default">
          <name>Latency</name>
          <t>
   Latency measurements will be performed if the latency "latency" attribute
   and/or the application latency "a=measurement:latency" attribute are present and with have non-zero values.</t>
          <t>
   Q4S defines a PING method in order to exchange packets between the
   client and the server. Based on this PING exchange exchange, the client and
   the server are able to calculate the round-trip time (RTT). The
   RTT is the sum of downlink latency (normally named "reverse latency") and uplink latency (normally named "forward latency").</t>
          <t>
   At least 255 samples of RTT MUST <bcp14>MUST</bcp14> be taken by the client and
   server. As the forward and reverse latencies are impossible to
   measure, the client and server will assume that both latencies are
   identical (symmetric network assumption). The latency will
   therefore be calculated as the statistical median value of all the
   RTT samples divided by 2.</t>
        </section>
        <section title="Jitter" anchor="section-7.3.2"><t> anchor="sec-7.3.2" numbered="true" toc="default">
          <name>Jitter</name>
          <t>
   Jitter measurements will be performed if the jitter "jitter" attribute
   and/or the application jitter "a=measurement:jitter" attribute are present and with have non-zero values.</t>
          <t>
   The jitter can be calculated independently by the client and by
   the server. The downlink jitter is calculated by the client taking
   into account the time interval between PING requests as defined by
   the measurement procedure "measurement:procedure" attribute in the first or second
   parameter depending on the Q4S protocol phase. The client and the
   server MUST <bcp14>MUST</bcp14> send these PING requests at the specified intervals.
   The client measures the downlink jitter jitter, whereas the server
   measures the uplink jitter. Note that PING responses are not taken
   into account when calculating jitter values.</t>
          <t>
   Every time a PING request message is received by an endpoint
   (either server or client), the corresponding jitter value is
   updated using the Statistical Jitter value calculated on with the first
   255 packets received using statistical jitter value, which is
   the arithmetic mean of the absolute values of elapsed times.</t> times
   calculated on the first 255 packets received.
          </t>
          <t>
   Each endpoint sends a PING periodically with a fixed interval,
   and each value of "elapsed time" (ET) should be very close to this
   interval. If a PING message is lost, the elapsed time ET value is
   doubled. Identifying lost PING messages, however, is not an issue
   because all PING messages are labeled with a Sequence-Number
   header. Therefore
   header field. Therefore, the receiver can discard this elapsed time ET
   value.</t>
          <t>
   In order to have the first jitter sample, the receiver MUST <bcp14>MUST</bcp14> wait
   until it receives 3 PING requests, because each ET is the time
   between two PINGs PINGs, and a Jitter jitter measurement needs at least two ET.</t>
          <t>
   The client measures the values of RTT and downlink jitter jitter, and the
   server measures RTT and uplink jitter, but all measurements are
   shared with the counterpart by means of "Measurements" the Measurements header field of
   the PING message.</t>
        </section>
        <section title="Bandwidth" anchor="section-7.3.3"><t> anchor="sec-7.3.3" numbered="true" toc="default">
          <name>Bandwidth</name>
          <t>
   Bandwidth measurements will be performed if the bandwidth "bandwidth"
   attribute and/or the application bandwidth "a=measurement:bandwidth" attribute is present
   and with has non-zero values.</t>
          <t>
   In order to measure the available bandwidth, both the client and
   the server MUST <bcp14>MUST</bcp14> start sending BWIDTH messages simultaneously using
   the UDP control ports exchanged during the handshake Handshake phase in the
   SDP message, message at the needed rate to verify the availability of the
   bandwidth constraint in each direction. The messages are sent
   during the period of time defined in the third parameter of the
   SDP measurement default procedure "measurement:procedure default" attribute in millisecond units.</t> milliseconds.</t>
          <figure title="Bandwidth anchor="ref-bandwidth-and-packet-loss-measurements">
            <name>Bandwidth and packet loss measurements" anchor="ref-bandwidth-and-packet-loss-measurements"><artwork><![CDATA[ Packet Loss Measurements</name>
            <artwork name="" type="" align="left" alt=""><![CDATA[
a=measurement:procedure default(50/50,75/75,5000,256/256,256/256)

        +------------------------------------------------+
        |             Rate                               |
        |              A                                 |
        |              |                                 |
        |downlink rate-|-------------------+ <-- traffic |
        |              |                   |     sent by |
        |              |                   |     server  |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |              |                   |             |
        |  uplink rate-|-------------------+ <-- traffic |
        |              |                   |     sent by |
        |              |                   |     client  |
        |              |                   |             |
        |              |                   |             |
        |              |---|---|---|---|---|----> time   |
        |              0   1   2   3   4   5     (sec.)  |
        |                                                |
        +------------------------------------------------+
]]></artwork>
          </figure>
          <t>
   The goal of these measurements is not to identify the available
   bandwidth of the communication path path, but to determine if the
   required bandwidth is available, meeting the application's
   constraints. Therefore, the requested bandwidth MUST <bcp14>MUST</bcp14> be measured
   sending only the highest bit rate bitrate required by the bandwidth
   attribute. This is illustrated in Figure 6.</t> <xref target="ref-bandwidth-and-packet-loss-measurements" format="default"/>.</t>
          <t>
   During bandwidth measurement time,
   ALERTS are not expected, expected during bandwidth measurement, but
   only at the end of the measurement time.</t>
          <t>
   When measuring bandwidth, all BWIDTH requests sent MUST <bcp14>MUST</bcp14> be 1
   kilobyte in length (UDP payload length by default), and MUST they <bcp14>MUST</bcp14>
   include a Sequence-Number header field with a sequential number starting
   at 0, and their content MUST <bcp14>MUST</bcp14> consist of randomly generated values
   to minimize the effect of compression elements along the path. The
   Sequence-Number MUST <bcp14>MUST</bcp14> be incremented by 1 with each BWIDTH packet
   sent. If any measurement stage needs to be repeated, the sequence
   number MUST <bcp14>MUST</bcp14> start at zero again. BWIDTH requests MUST NOT <bcp14>MUST NOT</bcp14> be
   answered. Examples:</t>

	<figure><artwork><![CDATA[
          <artwork name="" type="" align="left" alt=""><![CDATA[
Client message:
=========================
       BWIDTH q4s://www.example.com Q4S/1.0
       User-Agent: q4s-ua-experimental-1.0
       Session-Id: 53655765
       Sequence-Number: 0
       Content-Type: text
       Content-Length: XXXX
       Measurements: l=22, j=10, pl=0.00, bw=3000

       VkZaU1FrNVZNVlZSV0doT1ZrZ (to complete up to "max-content-
                                 length" bytes UDP payload length)
=========================
]]></artwork>
	</figure>
          <t>
   The client MUST <bcp14>MUST</bcp14> send BWIDTH packets to the server to allow the
   server to measure the uplink bandwidth. The server MUST <bcp14>MUST</bcp14> send
   BWIDTH packets to the client to allow the client to measure the
   downlink bandwidth.</t>

	<figure><artwork><![CDATA[
          <artwork name="" type="" align="left" alt=""><![CDATA[
Server message:
=========================
       BWIDTH q4s://www.example.com Q4S/1.0
       Session-Id: 53655765
       Sequence-Number: 0
       Content-Type: text
       Content-Length: XXXX
       Measurements: l=22, j=7, pl=0.00, bw=200

       ZY0VaT1ZURlZVVmhyUFE9PQ (to complete up to max-content-
                               length UDP payload length)
=========================
]]></artwork>
	</figure>
        </section>
        <section title="Packet loss" anchor="section-7.3.4"><t> anchor="sec-7.3.4" numbered="true" toc="default">
          <name>Packet Loss</name>
          <t>
   Packet loss and bandwidth are measured simultaneously using the
   BWIDTH packets sent by both the client and the server. Because the
   BWIDTH packets contain a Sequence-Number header field incremented
   sequentially with each sent packet, lost packets can be easily
   identified. The lost packets MUST <bcp14>MUST</bcp14> be counted during the
   measurement time.</t>
        </section>
      </section>
      <section title="Handshake Phase" anchor="section-7.4"><t> anchor="sec-7.4" numbered="true" toc="default">
        <name>Handshake Phase</name>
        <t>
   The first phase consists of a Q4S BEGIN method issued from the
   client to the server as shown in Figure 7.</t> <xref target="ref-handshake-phase" format="default"/>.</t>
        <t>
   The first Q4S message MUST <bcp14>MUST</bcp14> have a special URI (RFC 3986 <xref target="ref-12"/>), target="RFC3986" format="default"/>,
   which forces the use of the Q4S protocol if it is implemented in a
   standard web browser.</t>
        <t>
   This URI, named "Contact URI", is used to request the start of a
   session. Its scheme MUST <bcp14>MUST</bcp14> be:</t>

	<figure><artwork><![CDATA[
        <sourcecode type="abnf"><![CDATA[
      "q4s:" "//" host [":" port] [path["?" query]
]]></artwork>
	</figure>
]]></sourcecode>
        <t>
   Optionally, the client can send the desired quality parameters
   enclosed in the body of the message as an SDP document. The server
   MAY
   <bcp14>MAY</bcp14> take them into account when building the answer message with
   the final values in the SDP body, following a request / response request/response
   schema (RFC 3264 <xref target="ref-13"/>).</t> target="RFC3264" format="default"/>.</t>
        <t>
   If the request is accepted, the server MUST <bcp14>MUST</bcp14> answer it with a Q4S
   200 OK message, which MUST <bcp14>MUST</bcp14> contain an SDP body (RFC 4566 <xref target="ref-10"/>) target="RFC4566" format="default"/>
   with the assigned session id sess-id (embedded in the "o" SDP parameter), "o=" line),
   the IP addresses to be used, the flow ports to be used, the
   measurement procedure to be followed followed, and information about the
   required quality constraints. Additionally, the alerting-mode "alerting-mode" and
   alert-pause
   "alert-pause" time parameters attributes may be included. Q4S responses should
   use the protocol designator "Q4S/1.0".</t>
        <t>
   After these two messages are exchanged, the first phase is
   completed. The quality parameter thresholds have been sent to the
   client. The next step is to measure the actual quality of the
   communication path between the client and the server and alert if
   the Service Level Agreement (SLA) is being violated.</t>
        <figure title="Handshake phase" anchor="ref-handshake-phase"><artwork><![CDATA[ anchor="ref-handshake-phase">
          <name>Handshake Phase</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
        +------------------------------------------------+
        |                                                |
        | Client                            Server       |
        |                                                |
        |     ------- Q4S BEGIN ------------>            |
        |                                                |
        |     <------ Q4S 200 OK ------------            |
        |                                                |
        |                                                |
        +------------------------------------------------+
]]></artwork>
        </figure>
        <t>
   Example
   The following is an example of Client Request a client request and Server Answer:</t>

	<figure><artwork><![CDATA[ a server answer:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
Client Request:
=========================
BEGIN q4s://www.example.com Q4S/1.0
Content-Type: application/sdp
User-Agent: q4s-ua-experimental-1.0
Content-Length: 142

(SDP not shown)
=========================

Server Answer:
=========================
Q4S/1.0 200 OK
Date: Mon, 10 Jun 2010 10:00:01 GMT
Content-Type: application/sdp
Expires: 3000
Signature: 6ec1ba40e2adf2d783de530ae254acd4f3477ac4
Content-Length: 131

(SDP not shown)
=========================

The headers
]]></artwork>
<t>The header fields used are explained in section 4.3.
]]></artwork>
	</figure> <xref target="sec-4.3" format="default"/>.</t>
      </section>
      <section title="Negotiation Phase" anchor="section-7.5"><t> anchor="sec-7.5" numbered="true" toc="default">
        <name>Negotiation Phase</name>
        <t>
   The negotiation Negotiation phase is in charge of measuring the quality
   parameters and verifying that the communication paths meet the
   required quality constraints on in both directions as specified in
   the SDP body.</t>
        <t>
   The measured parameters will be compared with the quality
   constraints specified in the SDP body. If the quality session is
   compliant with all the quality constraints constraints, the application can
   start.</t>

	<t><list style="symbols"><t>If
<t>If the quality constraints are not met, a higher quality
      service level will be demanded. Depending on the scenario,
      this quality upgrade will be managed as follows: In </t>

     <dl>
     <dt>In the Q4S-aware-network scenario: a scenario:</dt><dd>a Q4S-ALERT method will be triggered
      by the server to the client client, and the client will answer with
      the same Q4S-ALERT method. After receiving the same Q4S-ALERT
      from the counterpart, no other alerts will be triggered by
      the server during the "alert-pause" period of time, time in order
      to allow the network to react, but measurements will continue
      to be taken to achieve early detection of improved network
      quality conditions and a fast application start.</t>

	<t>In start.</dd>
          <dt>In the Reactive scenario: an scenario:</dt><dd>an alert notification will be sent
      by the server stack to the Actuator, and the Actuator will
      answer with an alert acknowledgement. After receiving the
      alert acknowledgement from the Actuator, the server stack
      will not send other alert notifications during the "alert-pause"
      period of time, time in order to allow the Actuator to
      react and trigger actions on the application or on the policy
      server, but measurements will continue to be taken to achieve
      early detection of improved network quality conditions and a
      fast application start.</t>

	</list>
	</t> start.</dd>
        </dl>
        <t>
   In both scenarios stated above, if after several measurement
   cycles, the network constraints cannot be met met, the quality session
   is terminated. Concretely when when, under all possible actions taken by
   Actuator
   Actuator, the quality remains below requirements, the session must
   be terminated.</t>
        <t>
   The steps to be taken in this phase depend on the measurement
   procedure exchanged during the handshake Handshake phase. This document only
   describes the "default" procedure, but others can be used, like
   RTP/RTCP (RFC 3550 <xref target="ref-18"/>).</t> target="RFC3550" format="default"/>.</t>
        <t>
   Measurements of latency and jitter are done made by calculating the
   differences in the arrival times of packets and can be achieved with
   little bandwidth consumption. The bandwidth measurement, on the
   other hand, involves higher bandwidth consumption in both
   directions (uplink and downlink).</t>
        <t>
   To avoid wasting unnecessary network resources resources, these two types of
   measurements will be performed in two separate stages. If the
   required latencies and jitters cannot be reached, it makes no
   sense to waste network resources measuring bandwidth. In addition,
   if achieving the required latency and jitter thresholds implies
   upgrading the quality session level, the chance of obtaining
   compliant bandwidth measurements without retries is higher, saving
   network traffic again. Therefore, the default procedure, "default" procedure
   determines that the measurements are taken in two stages:

	<list style="hanging" hangIndent="6">

        <t hangText="Stage 0:">
        </t>
        <dl newline="false" spacing="normal" indent="6">
          <dt>Stage 0:</dt>
          <dd> Measurement of latencies, jitters jitters, and packet loss</t>

	<t hangText="Stage 1:"> loss</dd>
          <dt>Stage 1:</dt>
          <dd> Measurement of bandwidths and packet loss</t>

	</list>

        </t> loss</dd>
        </dl>
        <t>
   Notice that packet loss can be measured in both stages, as all
   messages exchanged include a sequence-number Sequence-Number header field that allows
   for easy packet loss detection.</t>
        <t>
   The client starts the negotiation Negotiation phase by sending a READY request
   using the TCP Q4S ports defined in the SDP. This READY request
   includes a "Stage" Stage header field that indicates the measurement stage.</t>
        <t>
   If either jitter, latency latency, or both are specified, the negotiation Negotiation
   phase begins with the measurement of latencies and jitters (stage
   0). If none of those attributes are is specified, stage 0 is skipped.</t>
        <section title="Stage anchor="sec-7.5.1" numbered="true" toc="default">
          <name>Stage 0: Measurement of Latencies and Jitter" anchor="section-7.5.1"><t> Jitter</name>
          <t>
   The Stage 0 MUST <bcp14>MUST</bcp14> start with a synchronization message exchange
   initiated with the client's READY message.</t>

	<figure><artwork><![CDATA[
          <artwork name="" type="" align="left" alt=""><![CDATA[
Client request, Request, READY message:
=========================
       READY q4s://www.example.com Q4S/1.0
       Stage: 0
       Session-Id: 53655765
       User-Agent: q4s-ua-experimental-1.0
       Content-Length: 0
=========================

Server Response:
=========================
  Q4S/1.0 200 OK
       Session-Id: 53655765
       Stage:0
       Content-Length: 0
=========================
]]></artwork>
	</figure>
          <t>
   This triggers the exchange of a sequence of PING requests and
   responses that will lead to the calculation of RTT (latency),
   jitter
   jitter, and packet loss.</t>
          <t>
   After receiving a 200 OK, the client must send the first PING
   message
   message, and the server will wait to send PINGs until the reception
   of this first client PING.</t>
          <t>
   Client
   The client and server MUST <bcp14>MUST</bcp14> send PING requests to each other. The
   Sequence-Number header field of the first PING MUST <bcp14>MUST</bcp14> be set to 0. Client The client
   and server will manage their own sequence numbers.</t>
          <figure title="Simultaneous exchange anchor="ref-simultaneous-exchange-of-ping-request-and-responses">
            <name>Simultaneous Exchange of PING request Request and responses" anchor="ref-simultaneous-exchange-of-ping-request-and-responses"><artwork><![CDATA[ Responses</name>
            <artwork name="" type="" align="left" alt=""><![CDATA[
        +------------------------------------------------+
        |                                                |
        | Client                                Server   |
        |                                                |
        |      --------- Q4S READY 0 --------->          |
        |      <-------- Q4S 200 OK -----------          |
        |                                                |
        |      --------- Q4S PING ------------>          |
        |      <-------- Q4S 200 OK -----------          |
        |      <-------- Q4S PING -------------          |
        |       -------- Q4S 200 OK ---------->          |
        |      --------- Q4S PING ------------>          |
        |      <-------- Q4S PING -------------          |
        |      --------- Q4S 200 OK ---------->          |
        |      <-------- Q4S 200 OK -----------          |
        |                     ...                        |
        |                                                |
        +------------------------------------------------+
]]></artwork>
          </figure>
          <t>
   Figure 8 shows
   The following is
   an example of the PING request sent from the client
   and the server's response:</t>

	<figure><artwork><![CDATA[
          <artwork name="" type="" align="left" alt=""><![CDATA[
Client Request:
=========================
       PING q4s://www.example.com Q4S/1.0
       Session-Id: 53655765
       Sequence-Number: 0
       User-Agent: q4s-ua-experimental-1.0
       Measurements: l=22, j=12, pl=0.20, bw=
       Content-Length: 0
=========================

Server Response:
=========================
  Q4S/1.0 200 OK
       Session-Id: 53655765
       Sequence-Number: 0
       Content-Length: 0
=========================
]]></artwork>
	</figure>
          <t>
   The function of the PING method is similar to the ICMP echo
   request message. message <xref target="RFC0792" format="default"/>.
   The server MUST <bcp14>MUST</bcp14> answer as soon as it receives the
   message.</t>
          <t>
   Both endpoints MUST <bcp14>MUST</bcp14> send Q4S PING messages with the periodicity
   specified in the first parameter of SDP measurement procedure "measurement:procedure"
   attribute, using always using the same UDP ports and incrementing the
   Sequence-Number with each message.</t>
          <t>
   In the following example, the SDP measurement procedure attribute,
   this value of the first parameter of the SDP "measurement:procedure" attribute
   is 50 milliseconds (from the client to the server) and
   60ms
   60 ms (from the server to the client).</t>

	<figure><artwork><![CDATA[ client):</t>
          <sourcecode type="sdp"><![CDATA[
a=measurement:procedure default(50/60,50/50,5000,256/256,256/256)
]]></artwork>
	</figure>
]]></sourcecode>
          <t>
   They MUST NOT <bcp14>MUST NOT</bcp14> wait for a response to send the next PING request.
   The "Sequence-Number" Sequence-Number header field value is incremented sequentially and
   MUST
   <bcp14>MUST</bcp14> start at zero. If this stage is repeated, the initial
   Sequence-Number MUST <bcp14>MUST</bcp14> start at zero again.</t>
          <t>
   All PING requests MUST <bcp14>MUST</bcp14> contain a "Measurements" header, Measurements header field with the
   values of the latency, jitter jitter, and packet loss measured by each
   entity up to that moment. The client will send its measurements to
   the server server, and the server his will send its measurements to the client. Example:</t>

	<figure><artwork><![CDATA[
          <artwork name="" type="" align="left" alt=""><![CDATA[
      Measurements: l=22, j=13, pl=0.10, bw=</t> bw=
]]></artwork>
	</figure>
          <t>
   Where l "l" stands for latency, j "j" for jitter, pl "pl" for packetloss packet loss, and bw "bw"
   for bandwidth. The bandwidth value is omitted, as it is not
   measured at this stage.</t>
          <t>
   Optionally the PING request can include a "Timestamp" header, Timestamp header field with
   the time in which the message has been sent. In the case that the header field is
   present, the server MUST <bcp14>MUST</bcp14> include the header field in the response
   without changing the value.</t>
          <t>
   A minimum number of PING messages MUST <bcp14>MUST</bcp14> be exchanged in order to be
   able to measure latency, jitter jitter, and packet-loss packet loss with certain
   accuracy (at least 256 samples are RECOMMENDED <bcp14>RECOMMENDED</bcp14> to get a an accurate
   packet loss measurement). Both the client and the server calculate
   the respective measured parameter values. The mechanisms to
   calculate the different parameters are described in section 7.3.</t> <xref target="sec-7.3" format="default"/>.</t>

          <t>
   At the end of this stage 0, there are three possibilities:</t>

	<t><list style="symbols"><t>The
          <ul spacing="normal">
            <li>The latency, jitter jitter, and packet loss packetloss constraints are reached
      in both directions</t>

	<t>The directions</li>
            <li>The latency, jitter jitter, and packet loss packetloss constraints are not
      reached in one or both directions</t>

	</list>
	</t> directions</li>
          </ul>
          <t>
   In the first case, Stage 0 is finished. Client The client and server are
   ready for Stage 1: bandwidth and packet loss measurement. The
   client moves to stage 1 by sending a READY message including that includes the
   header field, "Stage: 1".</t>
          <t>
   If the bandwidth constraints are either empty or with have a value of zero, the
   negotiation
   Negotiation phase MUST terminate <bcp14>MUST</bcp14> terminate, and both client and server may
   initiate the Continuity Phase. phase. In this case case, client moves to the
   Continuity phase by sending a READY message including that includes the header field,
   "Stage: 2".</t>
          <t>
   The second case, in which one or more quality constraints have not
   been met, is detailed in section 7.5.4.</t> <xref target="sec-7.5.4" format="default"/>.</t>
        </section>
        <section title="Stage anchor="sec-7.5.2" numbered="true" toc="default">
          <name>Stage 1: Measurement of Bandwidth and Packet Loss" anchor="section-7.5.2"><t> Loss</name>
          <t>
   This stage begins in a similar way to stage 0, sending a READY
   request over TCP. This The value of the READY message "Stage" message's Stage header value field is 1.
   The server answers with a Q4S 200 OK message to synchronize the
   initiation of the measurements as shown in Figure 9.</t>
   <xref target="ref-starting-bandwidth-and-packet-loss-measurement" format="default"/>.</t>
          <figure title="Starting bandwidth anchor="ref-starting-bandwidth-and-packet-loss-measurement">
            <name>Starting Bandwidth and packet loss measurement" anchor="ref-starting-bandwidth-and-packet-loss-measurement"><artwork><![CDATA[ Packet Loss Measurement</name>
            <artwork name="" type="" align="left" alt=""><![CDATA[
        +------------------------------------------------+
        |                                                |
        | Client                                Server   |
        |                                                |
        |      --------- Q4S READY 1 ----------->        |
        |      <-------- Q4S 200 OK -------------        |
        |                                                |
        |      --------- Q4S BWIDTH  ----------->        |
        |      <-------- Q4S BWIDTH  ------------        |
        |      --------- Q4S BWIDTH  ----------->        |
        |      <-------- Q4S BWIDTH  ------------        |
        |                  ...                           |
        |                                                |
        +------------------------------------------------+
]]></artwork>
          </figure>
	<figure><artwork><![CDATA[
          <artwork name="" type="" align="left" alt=""><![CDATA[
Client Request:
=========================
       READY q4s://www.example.com Q4S/1.0
       User-Agent: q4s-ua-experimental-1.0
       Stage: 1
       Session-Id: 53655765
       Content-Length: 0

=========================

Server Response:
=========================
  Q4S/1.0 200 OK
       Session-Id: 53655765
       Stage: 1
       Content-Length: 0

=========================
]]></artwork>
	</figure>
          <t>
   Just after receiving the 200 OK, both the client and the server
   MUST
   <bcp14>MUST</bcp14> start sending BWIDTH messages simultaneously using the UDP
   q4s
   "q4s" ports. <xref target="section-7.3.3"/> target="sec-7.3.3" format="default"/> describes the bandwidth measurement in
   detail.</t>
          <t>
   At the end of this stage 1, there are three possibilities:</t>

	<t><list style="symbols"><t>The
          <ul spacing="normal">
            <li>The bandwidth and packet loss packetloss constraints are reached in both
      directions</t>

	<t>The
      directions.</li>
            <li>The bandwidth and packet loss packetloss constraints are not reached in
      one or both directions.</t>

	</list>
	</t> directions.</li>
          </ul>
          <t>
   In the first case, Stage 1 is finished. Client The client and server are
   ready for the Continuity phase. The client moves to this phase by
   sending a READY message including that includes the header field, "Stage: 2". The
   server answer MUST <bcp14>MUST</bcp14> be 200 OK as shown in Figure 10.</t>
   <xref target="ref-trigger-the-application-using-http-uri" format="default"/>.</t>
          <figure title="Trigger anchor="ref-trigger-the-application-using-http-uri">
            <name>Trigger the application using Application Using HTTP URI" anchor="ref-trigger-the-application-using-http-uri"><artwork><![CDATA[ URI</name>
            <artwork name="" type="" align="left" alt=""><![CDATA[
        +------------------------------------------------+
        |                                                |
        | Client                                Server   |
        |                                                |
        |     ---------  Q4S READY 2 -------------->     |
        |     <---- Q4S 200 OK with trigger URI-----     |
        |                                                |
        |     ---------   HTTP GET ---------------->     |
        |                                                |
        |            (Application starts)                |
        |                                                |
        +------------------------------------------------+
]]></artwork>
          </figure>
	<figure><artwork><![CDATA[
          <artwork name="" type="" align="left" alt=""><![CDATA[
Client Request:
=========================
READY q4s://www.example.com Q4S/1.0
User-Agent: q4s-ua-experimental-1.0
Stage: 2
Session-Id: 53655765
Content-Length: 0

=========================

Server Answer:
=========================
Q4S/1.0 200 OK
Date: Mon, 10 Jun 2010 10:00:01 GMT
Session-Id: 53655765
Trigger-URI: http://www.example.com/app_start
Expires: 3000
Content-Type: application/sdp
Signature: 6ec1ba40e2adf2d783de530ae254acd4f3477ac4
Content-Length: 131

(SDP not shown)
=========================
]]></artwork>
	</figure>
          <t>
   If the "Trigger-URI" Trigger-URI header field is present, the client SHOULD <bcp14>SHOULD</bcp14> send an
   HTTP request to this URI.</t>
          <t>
   The second case, with violated network constraints constraints, is explained in
   7.5.4.</t>
   <xref target="sec-7.5.4" format="default"/>.</t>
        </section>
        <section title="Quality anchor="sec-7.5.3" numbered="true" toc="default">
          <name>Quality Constraints Not Reached" anchor="section-7.5.3"><t> Reached</name>
          <t>
   After finishing Stage 1 of the Negotiation phase, the client and
   the server have each other other's measured parameter values as these have
   been exchanged in the "Measurements" headers Measurements header fields of the PING and
   BWIDTH messages. If there is one or more parameters that do not
   comply with the uplink or downlink application constraints
   required
   required, both the server and the client are aware of it.</t>
          <t>
   If there is any quality parameter that does not meet the uplink or
   downlink quality constraints specified in the SDP message, two
   scenarios are possible depending on the specified alerting-mode alerting mode
   (if not present, the default value is "Reactive" Reactive alerting mode):

   <list style="format (%c)">

          </t>
          <ol spacing="normal" type="(%c)">
            <li>
              <t> Q4S-aware-network alerting mode:"> mode: the server MUST <bcp14>MUST</bcp14> send a
      Q4S-ALERT message to the client including the digital signature
      header, Signature
      header field, and the client MUST <bcp14>MUST</bcp14> answer with the same Q4S-ALERT
      message. The Signature header field contains the signed hash value of
      the SDP body in order to protect all the SDP the data data, and
      therefore it MUST <bcp14>MUST</bcp14> contain the measurement "measurement" parameters in the
      body.

	<figure><artwork><![CDATA[
              </t>
              <artwork name="" type="" align="left" alt=""><![CDATA[
Server request
=========================
Q4S-ALERT q4s://www.example.com Q4S/1.0
Host: www.example.com
User-Agent: q4s-ua-experimental-1.0
Session-Id: 53655765
Content-Type: application/sdp
Content-Length: 142

v=0
o=q4s-UA 53655765 2353687637 IN IP4 192.0.2.33
s=Q4S
i=Q4S parameters
t=0 0
a=qos-level:1/2
a=alerting-mode: Q4S-aware-network
a=alert-pause:5000
a=public-address:client IP4 198.51.100.51
a=public-address:server IP4 198.51.100.58
a=latency:40
a=jitter:10/10
a=bandwidth:20/6000
a=packetloss:0.50/0.50
a=flow:app downlink TCP/10000-20000
a=flow:app uplink TCP/56000
a=flow:q4s downlink UDP/55000
a=flow:q4s downlink TCP/55001
a=flow:q4s uplink UDP/56000
a=flow:q4s uplink TCP/56001
a=measurement:procedure default(50/50,50/50,5000,256/256,256/256)
a=measurement:latency 30
a=measurement:jitter 6/4
a=measurement:bandwidth 200/4000
a=measurement:packetloss 0.20/0.33
=========================
]]></artwork>
	</figure>
              <t>
   At this point, both the client and server keep on measuring but
   without sending new Q4S ALERT Q4S-ALERT messages during the "alert-pause"
   milliseconds. </t>

      <t>
            </li>
            <li>  Reactive alerting mode:"> mode: the server stack MUST <bcp14>MUST</bcp14> send an alert
      notification to the Actuator, and the Actuator MUST <bcp14>MUST</bcp14> answer with
      an acknowledgement to the received alert notification. The
      alert notification sent to the Actuator by the server stack
      doesn't follow Q4S message style but should have all the
      information the Actuator will need for the actions to be taken,
      which will be implementation dependent.
	</t>

	</list>
	</t>
	</li>
          </ol>
          <t>
   At this point, point during Negotiation phase, both the client and server
   keep on measuring without sending new alert notifications to the
   Actuator during the "alert-pause" milliseconds specified in the
   SDP. This way, both client and server will detect any improvement
   in network conditions as soon as the network reacts. The
   application can start as soon as the number of measurements
   indicated in the measurement procedure "measurement:procedure" attribute indicates that
   the quality parameters are met.</t>
          <t>
   Same
   The same applies to Continuity phase: the measurement dialog between
   client and server must not be interrupted by any possible ALERT
   message.</t>
          <section title="Actuator Role" anchor="section-7.5.3.1"><t>
   Actuator anchor="sec-7.5.3.1" numbered="true" toc="default">
            <name>Actuator Role</name>
            <t>
   The actuator receives notifications of unmet requirements from the Q4S
   server stack, stack and act acts upon the application or the network policy
   server, according to logic out of scope of this protocol.</t>
            <t>
   The Actuator logic activates mechanisms at the application level
   or/and
   and/or the network level based on a quality level dictionary, in which
   the meaning of each level meaning is implementation dependent dependent, and each level
   involve
   involves different actions based on rules to keep a certain user
   experience quality.</t>
            <t>
   The type of actions that an Actuator can take at the application level
   are application dependent and MAY <bcp14>MAY</bcp14> involve:</t>

	<t><list style="symbols"><t>Reduction
            <ul spacing="normal">
              <li>Reduction of application functionalities, such as limitation
      of application speed or application options.</t>

	<t>Reduction options.</li>
              <li>Reduction of application resources usage, such as reduction
      of frames per second in a video app application or any other parameter
      modification in order to adapt to network conditions.</t>

	</list>
	</t> conditions.</li>
            </ul>
            <t>
   Apart from actions at the application level, the Actuator MAY <bcp14>MAY</bcp14> act at
   the network level if a network policy server is available.</t>
          </section>
          <section title="Policy anchor="sec-7.5.3.2" numbered="true" toc="default">
            <name>Policy Server Role" anchor="section-7.5.3.2"><t> Role</name>
            <t>
   A network policy server may be part of the reactive scenario Reactive scenario, and
   it is in charge of managing network quality provision. Network A network
   policy server may implement all or some of these features (but implementation is not
   exclusive to):</t>

	<t><list style="symbols"><t>Server
            <ul spacing="normal">
              <li>Server validation in terms of quality constraints.</t>

	<t>Authentication constraints</li>
              <li>Authentication (Signature validation) and security (block (blocking of
      malicious clients)</t> clients)</li>
              <li>
                <t>Policy rules (following (the following rules are only examples):<list style="symbols"><t>Maximum examples):</t>
                <ul spacing="normal">
                  <li>Maximum quality level allowed for the ACP</t>

	<t>Time ACP</li>
                  <li>Time bands allowed for providing quality sessions</t>

	<t>Number sessions</li>
                  <li>Number of simultaneous quality sessions allowed</t>

	<t>Maximum allowed</li>
                  <li>Maximum time used by allowed quality sessions</t>

	<t>Etc.</t>

	</list>
	</t>

	</list>
	</t> sessions</li>
                  <li>Etc.</li>
                </ul>
              </li>
            </ul>
            <t>
   If any of the policy rules fail, a Q4S-ALERT message MUST <bcp14>MUST</bcp14> be
   answered by a 6XX error, 6xx error indicating the cause.</t>
          </section>
        </section>
        <section title="QoS Level Changes" anchor="section-7.5.4"><t> anchor="sec-7.5.4" numbered="true" toc="default">
          <name>"qos-level" Changes</name>
          <t>
   If any constraint was violated, the server MAY <bcp14>MAY</bcp14> trigger a Q4S-ALERT
   asking for a higher qos-level "qos-level" attribute. The maximum qos-level "qos-level"
   allowed is 9, 9 for both uplink and downlink.</t>
          <t>
   If the qos-level "qos-level" has reached the maximum value for the downlink or
   uplink without matching the constraints, then a CANCEL request
   MUST
   <bcp14>MUST</bcp14> be sent by the client using the TCP port determined in the
   handshake
   Handshake phase in order to release the session. In reaction to
   the reception of the CANCEL request, the server MUST <bcp14>MUST</bcp14> send a CANCEL
   request
   request, too. If no CANCEL request is received, the expiration time
   cancels the session at on the server side.</t>

	<figure><artwork><![CDATA[
          <artwork name="" type="" align="left" alt=""><![CDATA[
Client Request:
=========================
CANCEL q4s://www.example.com Q4S/1.0
User-Agent: q4s-ua-experimental-1.0
Session-Id: 53655765
Content-Type: application/sdp
Content-Length: 142

(SDP not shown)
=========================

Server Request in reaction to Client Request:
=========================
CANCEL q4s://www.example.com Q4S/1.0
Session-Id: 53655765
Expires: 0
Content-Type: application/sdp
Signature: 6ec1ba40e2adf2d783de530ae254acd4f3477ac4
Content-Length: 131

(SDP not shown)
=========================
]]></artwork>
	</figure>
        </section>
      </section>
      <section title="Continuity Phase" anchor="section-7.6"><t> anchor="sec-7.6" numbered="true" toc="default">
        <name>Continuity Phase</name>
        <t>
   During the negotiation Negotiation phase, latency, jitter, bandwidth bandwidth, and
   packet loss have been measured. During the continuity phase Continuity phase,
   bandwidth will not be measured again because bandwidth
   measurements may disturb application performance.</t>
        <t>
   This phase is supposed to be executed at the same time as the
   real-time application is being used.</t>
        <t>
   This document only covers the default "default" procedure. The continuity
   operation with default the "default" procedure is based on a sliding window of
   samples. The number of samples involved in the sliding window may
   be different for jitter and latency than for packet-loss packet loss
   calculations according to the fifth and sixth parameters of the
   measurement procedure
   "measurement:procedure" attribute. In the example, shown in Figure
   11,
   <xref target="ref-sliding-samples-window" format="default"/>,
   the jitter and latency sliding window comprises 40 samples samples,
   whereas the size of the packet-loss packet loss sliding window is 100 samples:</t>

	<figure><artwork><![CDATA[
        <sourcecode type="sdp"><![CDATA[
a=measurement:procedure default(50/50,75/75,5000,40/40,100/100)
]]></artwork>
	</figure>
]]></sourcecode>
        <t>
   In addition, the sizes of these windows are configurable per
   direction: uplink and downlink values may differ.</t>
        <t>
   PING requests are sent continuously (in both directions) directions), and when
   the Sequence-Number header field reaches the maximum value, the client
   continues sending PING messages with the Sequence-Number header field
   starting again at zero. When the server PING Sequence-Number
   header field reaches the maximum value, it does the same, starting again
   from zero.</t>
        <t>
   On the client side, the measured values of downlink jitter,
   downlink packet loss loss, and latency are calculated using the last
   samples, discarding older ones, in a sliding window schema.</t>
        <figure title="Sliding samples window" anchor="ref-sliding-samples-window"><artwork><![CDATA[ anchor="ref-sliding-samples-window">
          <name>Sliding Samples Window</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
       +--------------------------------------------------+
       |                                                  |
       | 55 56 57 . . . 253 254 255 0 1 2 . . . 55 56     |
       |        A                                   A     |
       |        |                                   |     |
       |        +-----------------------------------+     |
       |                                                  |
       +--------------------------------------------------+
]]></artwork>
        </figure>
        <t>
   Only if the server detects that the measured values (downlink or
   uplink jitter, packet loss loss, or latency) are not reaching the
   quality constraints, a Q4S ALERT Q4S-ALERT is triggered and sent either to
   the client or to the Actuator, depending on the alerting mode, and
   the alert-pause "alert-pause" timer is started.</t>
        <t>
   In the Q4S-aware-network alerting mode shown in Figure 12,
   <xref target="ref-continuity-in-q4s-aware-network-alerting-mode" format="default"/>,
   if the
   client receives a Q4S ALERT Q4S-ALERT message, it MUST <bcp14>MUST</bcp14> answer by sending the
   Q4S ALERT
   Q4S-ALERT request message back to the server including the SDP
   (with its corresponding digital signature).</t> signature) back to the server.</t>
        <t>
    Both client and server will keep performing measurements measurements,
    but no
   other Q4S ALERT message MUST Q4S-ALERT messages <bcp14>MUST NOT</bcp14> be sent during
    "alert-pause" milliseconds.
   The operations needed to act on the network and the
   agents in charge of them are out of scope of this draft.</t> document.</t>
        <figure title="Continuity anchor="ref-continuity-in-q4s-aware-network-alerting-mode">
          <name>Continuity in Q4S-aware-network alerting mode" anchor="ref-continuity-in-q4s-aware-network-alerting-mode"><artwork><![CDATA[ Q4S-Aware-Network Alerting Mode</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
        +------------------------------------------------+
        |                                                |
        | Client                      Server             |
        |                                                |
        |               ...                              |
        |   ----------- PING ---------->                 |
        |   <--------- 200 OK ----------                 |
        |   <------- Q4S-ALERT ---------                 |
        |   -------- Q4S-ALERT -------->                 |
        |   <---------- PING -----------                 |
        |   ---------- 200 OK --------->                 |
        |   ----------- PING ---------->                 |
        |   <--------- 200 OK ----------                 |
        |   <---------- PING -----------                 |
        |   ---------- 200 OK --------->                 |
        |        ...                                     |
        |                                                |
        +------------------------------------------------+
]]></artwork>
        </figure>
        <t>
   In the Reactive scenario shown in Figure 13, <xref target="ref-continuity-in-reactive-alerting-mode" format="default"/>,
   if the server detects
   that the measured values (downlink or uplink jitter, packet loss loss,
   or latency) are not reaching the quality constraints, an alert
   notification is triggered and sent to the Actuator. The Actuator
   MUST
   <bcp14>MUST</bcp14> then answer to the server stack with an alert acknowledgement</t> acknowledgement.</t>
        <t>
   The measurement dialog between the client and the server MUST NOT <bcp14>MUST NOT</bcp14>
   be interrupted by any possible ALERT message.</t>
        <figure title="Continuity anchor="ref-continuity-in-reactive-alerting-mode">
          <name>Continuity in Reactive alerting mode" anchor="ref-continuity-in-reactive-alerting-mode"><artwork><![CDATA[ Alerting Mode</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
        +------------------------------------------------+
        |                                                |
        | Client             Server             Actuator |
        |        ...                                     |
        |   --- PING ---------->                         |
        |   <-- 200 OK----------                         |
        |   <----- PING --------                         |
        |   <--- 200 OK -------- ---- alert              |
        |                            notification -->    |
        |                                                |
        |   --- PING ----------> <--- alert              |
        |                             acknowledge ---    |
        |   <-- 200 OK----------                         |
        |   <----- PING --------                         |
        |   --- 200 OK -------->                         |
        |        ...                                     |
        |                                                |
        +------------------------------------------------+
]]></artwork>
        </figure>
      </section>
      <section title="Termination Phase" anchor="section-7.7"><t> anchor="sec-7.7" numbered="true" toc="default">
        <name>Termination Phase</name>
        <t>
   The Termination phase is the end point endpoint for the established Q4S
   session that is reached in the following cases:</t>

	<t><list style="symbols"><t>A
        <ul spacing="normal">
          <li>A CANCEL message has been received. The client sends a
      CANCEL message due to the impossibility of the network network's inability to
      meet the required quality constraints. The client and server
      application will be notified by the their respective Q4S stack.</t>

	<t>Session stacks.</li>
          <li>Session expires: if after the Expires time time, no client or
      server activity is detected, that end cancels the session.</t>

	<t>A session.</li>
          <li>A BEGIN message has been received by the server.
     The pre-existing Q4S quality session is cancelled canceled, and a new session
      will be initiated.</t>

	</list>
	</t> initiated.</li>
        </ul>
        <t>
   The meaning of the Termination phase in terms of the release of resources
   or accounting is application dependent and out of scope of the Q4S
   protocol.</t>
        <t>
   In the Reactive alerting mode, Q4S CANCEL messages received by the Q4S
   server must cause the sending of cancel notifications sent from
   the server stack to send cancel notifications
   to the Actuator in order to release possible
   assigned resources for the session.</t>
        <section title="Sanity anchor="sec-7.7.1" numbered="true" toc="default">
          <name>Sanity Check of Quality Sessions" anchor="section-7.7.1"><t> Sessions</name>
          <t>
   A session may finish due to several reasons (client shutdown,
   client CANCEL request, constraints not reached, etc), etc.), and any
   session finished MUST <bcp14>MUST</bcp14> release the assigned resources.</t>
          <t>
   In order to release the assigned server resources for the session,
   the "Expires" Expires header field indicates the maximum interval of time
   without exchanging any Q4S message.</t>
        </section>
      </section>
      <section title="Dynamic anchor="sec-7.8" numbered="true" toc="default">
        <name>Dynamic Constraints And Flows" anchor="section-7.8"><t> and Flows</name>
        <t>
   Depending on the nature of the application, the quality
   constraints to be reached may evolve, changing some or all quality
   constraint values in any direction.</t>
        <t>
   The client MUST <bcp14>MUST</bcp14> be able to deal with this possibility. When the
   server sends an SDP document attached to a response (200 OK, OK or
   Q4S-ALERT, etc), etc.), the client MUST <bcp14>MUST</bcp14> take all the new received values,
   overriding any previous value in use.</t>
        <t>
   The dynamic changes on the quality constraints can be as a result
   of two possibilities:</t>

	<t><list style="symbols"><t>The
        <ul spacing="normal">
          <li>The application communicates to the Q4S server a change in
      the constraints. In this case case, the application requirements
      can evolve evolve, and the Q4S server will be aware of them.</t>

	<t>The them.</li>
          <li>The application uses TCP flows. In that case, in order to
      guarantee a constant throughput, the nature of TCP behavior
      forces the use of a composite constraint function, which
      depends on RTT, packet loss loss, and a window control mechanism
      implemented in each TCP stack.</t>

	</list>
	</t> stack.</li>
        </ul>
        <t>
   TCP throughput can be less than actual bandwidth if the
   Bandwidth-Delay Product (BDP) is large large, or if the network suffers
   from a high packet loss rate. In both cases, TCP congestion
   control algorithms may result in a suboptimal performance.</t>
        <t>
   Different TCP congestion control implementations like Reno <xref target="ref-23" />, target="RENO" format="default"/>,
   High Speed TCP (RFC 3649 <xref target="ref-24"/>), target="RFC3649" format="default"/>,
   CUBIC <xref target="ref-25"/>, target="I-D.rhee-tcpm-cubic" format="default"/>,
   Compound TCP (CTCP (CTCP) <xref target="ref-26"/>), etc. target="I-D.sridharan-tcpm-ctcp" format="default"/>,
   etc., reach different throughputs under the same network
   conditions of RTT and packet loss. In all cases, depending on the
   RTT measured
   RTT-measured value, the Q4S server could change dynamically change the
   packetloss constraints (defined in the SDP) in order to make it possible
   to reach a required throughput or vice versa (use packetloss
   measurement (using "measurement:packetloss"
   to change dynamically the latency constraints).</t>
        <t>
   A general guideline to calculate for calculating the packetloss packet loss constraint and the RTT
   constraint consists in of approximating the throughput by using a
   simplified formula, which should take into account the TCP stack
   implementation of the receiver, in addition to the RTT and packet
   loss:</t>

	<figure><artwork><![CDATA[
        <sourcecode type="pseudocode"><![CDATA[
          Th= Function( RTT, packet loss, ...)
]]></artwork>
	</figure>
]]></sourcecode>
        <t>
   Then, depending on RTT measured RTT-measured values, set dynamically the
   packetloss
   packet loss constraint.</t>
        <t>
   It is possible to easily calculate a worst-case boundary for the
   Reno algorithm, which should ensure for all algorithms that the
   target throughput is actually achieved. Except that, achieved, except that high-speed
   algorithms will then have even a larger throughput, throughput if more
   bandwidth is available.</t>
        <t>
   For the Reno algorithm, the Mathis' Mathis formula may be used <xref target="ref-23"/> target="RENO" format="default"/> for
   the upper bound on the throughput:</t>

	<t><list hangIndent="9" style="hanging"><t>
        <sourcecode type="pseudocode"><![CDATA[
          Th &lt;= <= (MSS/RTT)*(1 / sqrt{p})</t>

	</list>
	</t> sqrt{p})
]]></sourcecode>
        <t>
   In the absence of packet loss, a practical limit for the TCP
   throughput is the receiver_window_size divided by the round-trip
   time. RTT.
   However, if the TCP implementation uses a window scale
   option, this limit can reach the available bandwidth value.</t>
      </section>
      <section title="Qos-level anchor="sec-7.9" numbered="true" toc="default">
        <name>"qos-level" Upgrade And and Downgrade Operation" anchor="section-7.9"><t> Operation</name>
        <t>
   Each time the server detects a violation of constraints, the alert
   mechanism is triggered, the alert-pause "alert-pause" timer is started, and the
   qos-level
   "qos-level" is increased. When this happens repeatedly, and the qos-level
   "qos-level" reaches its maximum value (value 9), the session is
   cancelled.
   canceled. But when the violation of constraints stops before
   reaching qos-level "qos-level" maximum value, the recovery mechanism allows
   for the qos-level "qos-level" upgrade gradually.</t>
        <t>
   Following, this
   This downgrade and upgrade of qos-level "qos-level" is explained
   with an the following example:</t>

	<t><list style="numbers"><t>A
        <ol spacing="normal" type="1">
          <li>A Q4S session is initiated successfully with qos-level=0.</t>

	<t>During "qos-level=0".</li>
          <li>During the continuity Continuity phase, violation of constraints is
      detected; qos-level the "qos-level" is increased to 1, a Q4S-ALERT is sent by
      the server to the client client, and alert-pause an "alert-pause" timer is started.</t>

	<t>Alert-pause started.</li>
          <li>The "alert-pause" timer expires expires, and still a violation of constraints
      is detected; qos-level the "qos-level" is increased to 2, a Q4S-ALERT is sent
      by the server to the client client, and alert-pause an "alert-pause" timer is started.</t>

	<t>Alert-pause started.</li>
          <li>The "alert-pause" timer expires expires, but the violation of constraints has
      stopped; recovery-pause the "recovery-pause" timer is started.</t>

	<t>Recovery-pause started.</li>
          <li>The "recovery-pause" timer expires, and no violation of
      constraints has been detected meanwhile; qos-level detected. Meanwhile, the "qos-level" is
      decreased to 1, a Q4S-RECOVERY is sent by the server to the
      client
      client, and recovery-pause the "recovery-pause" timer is started again.</t>

	<t>Recovery-pause again.</li>
          <li>The "recovery-pause" timer expires again again, and no violation of
      constraints has been detected meanwhile; qos-level detected. Meanwhile, the "qos-level" is
      decreased to 0 0, and a Q4S-RECOVERY is sent by the server to
      the client;  recovery-pause client. The "recovery-pause" timer is not started this time as
      qos-level
      the "qos-level" has reached its initial value.</t>

	</list>
	</t> value.</li>
        </ol>
        <t>
   When the network configuration allows for the possibility of
   managing Q4S flows and application flows independently (either is
   a network-based QoS or a Q4S aware Q4S-aware network), the qos-level "qos-level"
   downgrade process could be managed more efficiently using a
   strategy that allows for carrying out qos-level "qos-level" downgrades
   excluding app application flows from SDP dynamically. The Q4S flows would be
   downgraded to allow for measurements on a lower quality level
   without interference of the application flows. A Q4S client MUST <bcp14>MUST</bcp14>
   allow this kind of SDP modifications modification by the server.</t>
        <t>
   Periodically (every several minutes, depending on the
   implementation) a Q4S-ALERT could be triggered, in which the level
   is downgraded for Q4S flows, excluding application flows from the
   embedded SDP of that request.</t>
        <t>
   This mechanism allows to measure the measurement at lower levels of quality while
   application flows continue using a higher qos level "qos-level" value.</t>

	<t><list style="symbols"><t>If
        <ul spacing="normal">
          <li>If the measurements in the lower level meet the quality
      constraints, then a Q4S-RECOVERY message to this lower qos-level "qos-level" may be triggered, in which the SDP includes the
      application flows in addition to the Q4S flows.</t>

	<t>If flows.</li>
          <li>If the measurements in the lower level do not meet the
      constraints, then a new Q4S-ALERT to the previous qos-level
      MUST "qos-level"
      <bcp14>MUST</bcp14> be triggered, in which the SDP includes only the Q4S
      flows.</t>

	</list>
	</t>
      flows.</li>
        </ul>
        <figure title="Possible evolution of qos-level" anchor="ref-possible-evolution-of-qos-level"><artwork><![CDATA[ anchor="ref-possible-evolution-of-qos-level">
          <name>Possible Evolution of "qos-level"</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
        +------------------------------------------------+
        |                                                |
        | qos-level                                      |
        |   A                                            |
        |   |                                            |
        |  4|                                            |
        |   |                                            |
        |  3|             +------+                       |
        |   |             |      |                       |
        |  2|        +----+      +----+     +---         |
        |   |        |                |     |            |
        |  1|   +----+                +-----+            |
        |   |   |                                        |
        |  0+---+---------------------------------> time |
        |                                                |
        +------------------------------------------------+
]]></artwork>
        </figure>
        <t>
   This mechanism, illustrated in Figure 14, <xref target="ref-possible-evolution-of-qos-level" format="default"/>, avoids the risk of
   disturbing the application, application while the measurements are being run
   in lower levels. However, this optional optimization of resources
   MUST
   <bcp14>MUST</bcp14> be used carefully.</t>
        <t>
   The chosen period to measure a lower qos level "qos-level" is implementation
   dependent. Therefore, it is not included as a measurement
   procedure "measurement:procedure" parameter.
   It is RECOMMENDED <bcp14>RECOMMENDED</bcp14> to use a large value, such
   as 20 minutes.</t>
      </section>
    </section>
    <section title="General anchor="sec-8" numbered="true" toc="default">
      <name>General User Agent Behavior" anchor="section-8"><section title="Roles Behavior</name>
      <section anchor="sec-8.1" numbered="true" toc="default">
        <name>Roles in Peer-to-Peer Scenarios" anchor="section-8.1"><t> Scenarios</name>
        <t>
   In order to allow peer to peer peer-to-peer applications, a Q4S User Agent (UA)
   MUST
   <bcp14>MUST</bcp14> be able to assume both the client and server role. The role
   assumed depends on who sends the first message.</t>
        <t>
   In a communication between two UAs, the UA that first sends the Q4S
   BEGIN request in the first place, for starting to start the handshake
   phase, Handshake phase shall assume the client role.</t>
        <t>
   If both UASs UAs send the BEGIN request at the same time, they will
   wait for a random time to restart again as shown in Figure 15.</t> <xref target="ref-p2p-roles" format="default"/>.</t>
        <t>
   Otherwise, an UA may be configured to act only as server (e.g.,
   content provider's side).</t>
        <figure title="P2P roles." anchor="ref-p2p-roles."><artwork><![CDATA[ anchor="ref-p2p-roles">
          <name>P2P Roles</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
        +-----------------------------------------------+
        |                                               |
        | UA(Client)                         UA(Server) |
        |                                               |
        |     -------- Q4S BEGIN ------------->         |
        |     <------- Q4S BEGIN --------------         |
        |                                               |
        |     ------- Q4S BEGIN -------------->         |
        |     <------ Q4S 200 OK --------------         |
        |                                               |
        |                                               |
        +-----------------------------------------------+
]]></artwork>
        </figure>
      </section>
      <section title="Multiple anchor="sec-8.2" numbered="true" toc="default">
        <name>Multiple Quality Sessions in Parallel" anchor="section-8.2"><t> Parallel</name>
        <t>
   A Q4S session is intended to be used for an application. It This means
   that for using the application, the client MUST <bcp14>MUST</bcp14> establish only one
   Q4S session against the server. Indeed, the relation between
   session-id
   the Session-Id and the application is 1 to 1.</t>
        <t>
   If a user wants to participate in several independent Q4S sessions
   simultaneously against different servers (or against the same
   server)
   server), it can execute different Q4S clients to establish
   separately different Q4S sessions sessions, but it is NOT RECOMMENDED, <bcp14>NOT RECOMMENDED</bcp14>
   because:</t>

	<t><list style="symbols"><t>The
        <ul spacing="normal">
          <li>The establishment of a new Q4S session may affect other
      running applications over other Q4S sessions during bandwidth
      measurement.</t>

	<t>If
      measurement.</li>
          <li>If the negotiation Negotiation phase is executed separately before
      running any application, the summation of bandwidth
      requirements could not be met when the applications are
      running in parallel.</t>

	</list>
	</t> parallel.</li>
        </ul>
      </section>
      <section title="General anchor="sec-8.3" numbered="true" toc="default">
        <name>General Client bBhavior" anchor="section-8.3"><t> Behavior</name>
        <t>
   A Q4S Client client has different behaviors. We will use letters X,Y,Z X, Y, and Z to
   designate each different behavior (follow the letter bullets letters in
   figure 16).</t>

	<t><list hangIndent="3" style="hanging">
<t hangText="X)">When
   <xref target="ref-phases-client-behaviors" format="default"/> and their descriptions below).</t>
        <dl newline="false" spacing="normal" indent="4">
          <dt>X)</dt>
          <dd>When it sends messages over TCP (methods BEGIN, READY,
      Q4S-ALERT, Q4S-RECOVERY Q4S-RECOVERY, and CANCEL) CANCEL), it behaves strictly like a state
      machine that sends requests and waits for responses. Depending
      on the response type type, it enters in into a new state.</t>

	</list>
	</t> state.</dd>
        </dl>
        <t>
   When it sends UDP messages (methods PING and BWIDTH), a Q4S client
   is not strictly a state machine that sends messages and waits for
   responses because:</t>

	<t><list hangIndent="3" style="hanging">
<t hangText="Y)">At because of the following:</t>
        <dl newline="false" spacing="normal" indent="4">
          <dt>Y)</dt>
          <dd>During the measurement of latency, jitter jitter, and packet loss measurement, loss, the PING
      requests are sent periodically, not just after receiving the response
      to the previous request. In addition, the client MUST <bcp14>MUST</bcp14> answer the
      PING requests coming from the server, therefore the client
      assumes temporarily the role of a server.</t>

	</list>
	</t>

	<t><list hangIndent="3" style="hanging">
<t hangText="Z)">At server.</dd>
        </dl>
        <dl newline="false" spacing="normal" indent="4">
          <dt>Z)</dt>
          <dd>During the bandwidth and packet loss measurement stage, the client
      does not expect to receive responses when sending BWIDTH
      requests to the server. In addition, it MUST <bcp14>MUST</bcp14> receive and process
      all server messages in order to achieve the downlink
      measurement.</t>

	</list>
	</t>
      measurement.</dd>
        </dl>
        <t>
   The Q4S-ALERT and CANCEL may have a conventional answer if an
   error is produced, otherwise the corresponding answer is formatted
   as a request message.</t>
        <figure title="Phases &amp; client behaviors" anchor="ref-phases-client-behaviors"><artwork><![CDATA[ anchor="ref-phases-client-behaviors">
          <name>Phases and Client Behaviors</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
  +-----------+------------------------+-----------+-----------+
  | Handshake |    Negotiation         |Continuity |Termination|
  |   Phase   |      Phase             |   Phase   |  Phase    |
  |           |                        |           |           |
  | X ---------> Y --> X --> Z --> X ---> Y --> X ---> X       |
  |           |  A     |     A     |   |  A     |  |           |
  |           |  |     |     |     |   |  |     |  |           |
  |           |  +-----+     +-----+   |  +-----+  |           |
  |           |                        |           |           |
  +------------------------------------------------+-----------+
]]></artwork>
        </figure>
        <section title="Generating Requests" anchor="section-8.3.1"><t> anchor="sec-8.3.1" numbered="true" toc="default">
          <name>Generating Requests</name>
          <t>
   A valid Q4S request formulated by a Client MUST, client <bcp14>MUST</bcp14>, at a minimum,
   contains
   contain the following header fields:</t>

	<t><list style="symbols"><t>If
          <dl>
            <dt>If no SDP is included: the included:</dt><dd>the header fields Session-Id and Sequence-Number are mandatory.</t>

	<t>If mandatory.</dd>
            <dt>If SDP is included: included:</dt><dd>the Session-Id is embedded into the SDP,
      therefore the inclusion of the Session-Id header field is optional optional, but
      if present present, must have the same value. Measurements are
      embedded into the SDP only for Q4S-ALERT messages in order to
      be signed.</t>

	</list>
	</t> signed.</dd>
          </dl>
          <t>
   At any time, if the server sends a new SDP with updated values,
   the client MUST <bcp14>MUST</bcp14> take it into account.</t>
        </section>
      </section>
      <section title="General anchor="sec-8.4" numbered="true" toc="default">
        <name>General Server Behavior" anchor="section-8.4"><t> Behavior</name>
        <t>
   If a server does not understand a header field in a request (that
   is, the header field is not defined in this specification or in
   any supported extension), the server MUST <bcp14>MUST</bcp14> ignore that header field
   and continue processing the message.</t>
        <t>
   The role of the server is changed at negotiation Negotiation and continuity Continuity
   phases, in which the server MUST <bcp14>MUST</bcp14> send packets to measure jitter,
   latency
   latency, and bandwidth. Therefore, the different behaviors of
   the server are (follow the letter bullets letters in the figure 17):</t>

      <t><list hangIndent="3" style="hanging">
      <t hangText="R)"> <xref target="ref-phases-server-behaviours" format="default"/>
and their descriptions below):</t>
        <dl newline="false" spacing="normal" indent="4">
          <dt>R)</dt>
          <dd>
       When the client sends messages over TCP (methods BEGIN,
      READY Q4S-ALERT, Q4S-RECOVERY Q4S-RECOVERY, and CANCEL) CANCEL), it behaves strictly
      like a state machine that receives messages and sends
      responses.</t>

	</list>
	</t>
      responses.</dd>
        </dl>
        <t>
   When the client begins to send UDP messages (methods PING and
   BWIDTH), a Q4S server is not strictly a state machine that
   receives messages and sends responses because:</t>

      <t><list hangIndent="3" style="hanging">
      <t hangText="S)">
      At because of the following:</t>
        <dl newline="false" spacing="normal" indent="4">
          <dt>S)</dt>
          <dd>
      During the measurement of latency, jitter jitter, and packet loss measurement, loss, the PING
      requests are sent periodically by the client but and also by the
      server. In this case case, the server behaves as a server answering
      client requests but also behaves temporarily as a client,
      sending PING requests toward the client and receiving
      responses.</t>

	</list>
	</t>

	<t><list hangIndent="3" style="hanging">
      <t hangText="T)">
      At
      responses.</dd>
        </dl>
        <dl newline="false" spacing="normal" indent="4">
          <dt>T)</dt>
          <dd>
      During bandwidth and packet loss measurement, the server sends
      BWIDTH requests to the client. In addition, it MUST <bcp14>MUST</bcp14> receive and
      process client messages in order to achieve the uplink
      measurement.</t>

	</list>
	</t>
      measurement.</dd>
        </dl>
        <t>
   The Q4S-ALERT and CANCEL may have a conventional answer if an
   error is produced, otherwise the corresponding answer is formatted
   as a request message.</t>
        <figure title="Phases &amp; server behaviours" anchor="ref-phases-server-behaviours"><artwork><![CDATA[ anchor="ref-phases-server-behaviours">
          <name>Phases and Server Behaviors</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
  +-----------+------------------------+-----------+-----------+
  | Handshake |    Negotiation         |Continuity |Termination|
  |   Phase   |      Phase             |   Phase   |  Phase    |
  |           |                        |           |           |
  | R ---------> S --> R --> T --> R ---> S --> R ---> R       |
  |           |  A     |     A     |   |  A     |  |           |
  |           |  |     |     |     |   |  |     |  |           |
  |           |  +-----+     +-----+   |  +-----+  |           |
  |           |                        |           |           |
  +------------------------------------------------+-----------+
]]></artwork>
        </figure>
      </section>
    </section>
    <section title="Implementation Recommendations" anchor="section-9"><section title="Default anchor="sec-9" numbered="true" toc="default">
      <name>Implementation Recommendations</name>
      <section anchor="sec-9.1" numbered="true" toc="default">
        <name>Default Client Constraints" anchor="section-9.1"><t> Constraints</name>
        <t>
   To provide a default configuration, it would be good that if the
   client had a configurable set of Quality quality headers in the
   implementation settings menu. Otherwise Otherwise, these quality headers will
   not be present in the first message.</t>
        <t>
   Different business models (out of scope of this proposal) may be
   achieved: depending on who pays for the quality session, the
   server can accept certain Client client parameters sent in the first
   message, or force billing parameters on the server side.</t>
      </section>
      <section title="Latency anchor="sec-9.2" numbered="true" toc="default">
        <name>Latency and Jitter Measurements" anchor="section-9.2"><t> Measurements</name>
        <t>
   Different client and server implementations may send a different
   number of PING messages for measuring, although at least 255
   messages should be considered to perform the latency measurement.
   The Stage 0 measurements only may be considered ended only when neither
   the client nor server receive new PING messages after an
   implementation-dependent guard time. Only after, the client can send a
   "READY 1" message.</t>
        <t>
   In execution systems, where the timers are not accurate, a
   recommended approach consists of including the optional Timestamp header
   "Timestamp" field
   in the PING request with the time in which the message
   has been sent. This allows an accurate measurement of the jitter
   even with no identical intervals of time between PINGs.</t>
      </section>
      <section title="Bandwidth Measurements" anchor="section-9.3"><t> anchor="sec-9.3" numbered="true" toc="default">
        <name>Bandwidth Measurements</name>
        <t>
   In programming languages or Operating Systems operating systems with limited timers
   or clock resolution, it is recommended to use an approach based on
   several intervals to send messages of 1KB (= 8000 bits), bits) in order
   to reach the required bandwidth consumption consumption, using a rate as close
   as possible to a constant rate.</t>
        <t>
   For example, if the resolution is 1 millisecond, and the bandwidth
   to reach is 11Mbps, 11 Mbps, a good approach consists of sending: </t>

<figure><artwork><![CDATA[
        <artwork name="" type="" align="left" alt=""><![CDATA[
      1 message of 1KB every 1 millisecond +

      1 message of 1KB every 3 milliseconds +

      1 message of 1KB every 23 milliseconds
]]></artwork></figure>
]]></artwork>
        <t>
   The number of intervals depends on the required bandwidth and accuracy
   that the programmer wants to achieve.</t>
        <t>
   Considering messages of 1KB (= 8000 bits), a general approach to
   determine these intervals is

        <list style="format (%d)">
        <t> the following:

        </t>
        <ol spacing="normal" type="(%d)">
          <li> Compute Target target bandwidth / 8000 bits. In the example above above, it is
            11Mbps/8000
            11 Mbps / 8000 = 1375 messages per second
	</t>

	<t> second.
	</li>
          <li> Divide the number of messages per second by 1000 to determine
    	the number of messages per millisecond. 1375/1000 millisecond: 1375 / 1000 = 1'375. 1.375. The
      integer value is the number of messages per millisecond (in this
      case, one). The pending bandwidth is now 375 messages per second
	</t> second.
	</li>
          <li>
            <t> To achieve the 375 messages per second, use a sub-multiple submultiple of
	1000
	1000, which must be less than 375

<figure><artwork><![CDATA[

      1000/2 375:
</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
      1000 / 2 = 500 > 375

      1000/3

      1000 / 3 = 333 < 375

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

   In this case case, a message every 3 ms is suitable. The new pending
   target bandwidth is 375 -333 - 333 = 42 messages per second</t> second.</t>
          </li>
          <li>
            <t> Repeat the same strategy as point 3, 3 to reach the pending
    	    bandwidth. In this case, 23 ms is suitable because:

<figure><artwork><![CDATA[

      1000/22 because of the following:

</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
      1000 / 22 = 45 >42

      1000/23 > 42

      1000 / 23 = 43 >42 > 42

      1000 / 24 = 41.6 < 42

]]></artwork></figure>
        </t>
        </list>
        </t>
]]></artwork>
          </li>
        </ol>
        <t>
   We can choose 24 ms ms, but then we need to cover an additional 0.4
   messages per second (42-41.6=0.4) (42 - 41.6 = 0.4), and 43 is a number higher than
   42 but very close to it.</t>
        <t>
   In execution systems where the timers are not accurate, a
   recommended approach consists of checking at each interval the
   number of packets that should have been sent at this timestamp
   since origin and send the needed number of packets in order to
   reach the required bandwidth.</t>
        <t>
   The shorter the packets are used, the more constant is the rate of
   bandwidth measurement. However, this may stress the execution
   system in charge of receiving and processing packets. As a
   consequence, some packets may be lost because of stack overflows.
   To deal with this potential issue, a larger packet is RECOMMENDED <bcp14>RECOMMENDED</bcp14>
   (2KB or more) more), taking into account the overhead produced by the
   chunks
   chunks' headers.</t>
      </section>
      <section title="Packet anchor="sec-9.4" numbered="true" toc="default">
        <name>Packet Loss Measurement Resolution" anchor="section-9.4"><t> Resolution</name>
        <t>
   Depending on the application nature and network conditions, a packet
   loss resolution less than 1% may be needed. In such cases, there
   is no limit to the number of samples used for this calculation. A
   tradeoff
   trade-off between time and resolution should be reached in each
   case. For example, in order to have a resolution of 1/10000, the
   last 10000 samples should be considered in the packet loss
   measured value.</t>
        <t>
   The problem of this approach is the reliability of old samples. If
   the interval used between PING messages is 50ms, 50 ms, then to have a
   resolution of 1/1000 1/1000, it takes 50 seconds seconds, and a resolution of
   1/10000 takes 500 seconds (more than 8 minutes). The reliability
   of a packet loss calculation based on a sliding window of 8
   minutes depends on how fast network conditions evolve.</t>
      </section>
      <section title="Measurements anchor="sec-9.5" numbered="true" toc="default">
        <name>Measurements and Reactions" anchor="section-9.5"><t> Reactions</name>
        <t>
   Q4S can be used as a mechanism to measure and trigger network
   tuning and application level application-level actions (i.e. lowering video bit-rate, reduce
   reducing multiplayer interaction speed, etc) etc.) in real-time real time in
   order to reach the application constraints, addressing measured
   possible network degradation.</t>
      </section>
      <section title="Instability Treatments" anchor="section-9.6"><t> anchor="sec-9.6" numbered="true" toc="default">
        <name>Instability Treatments</name>
        <t>
   There are two scenarios in which Q4S can be affected by network
   problems: loss of Q4S packets and outlier samples.</t>
        <section title="Loss anchor="sec-9.6.1" numbered="true" toc="default">
          <name>Loss of Control Packets" anchor="section-9.6.1"><t> Packets</name>
          <t>
   Lost UDP packets (PING or BWIDTH messages) don't cause any
   problems for the Q4S state machine, but if TCP packets are
   delivered too late (which we will consider as "lost"), some
   undesirable consequences could arise.</t>
          <t>
   Q4S does have protection mechanisms to overcome these situations.
   Examples:</t>

	<t><list style="symbols"><t>If
          <ul spacing="normal">
            <li>If a BEGIN packet is lost or its corresponding answer, answer is lost, after
      a certain timeout, the client SHOULD <bcp14>SHOULD</bcp14> resend another BEGIN
      packet, resetting the session</t>

	<t>If session</li>
            <li>If a READY packet is lost, after a certain timeout, the
      client SHOULD <bcp14>SHOULD</bcp14> resend another READY packet.</t>

	<t>If packet.</li>
            <li>If a QOS ALERT Q4S-ALERT request is lost or its corresponding answer, answer is lost,
      after a certain timeout, the originator SHOULD <bcp14>SHOULD</bcp14> resend another
      Q4S-ALERT packet.</t>

	<t>If packet.</li>
            <li>If a CANCEL request is lost or its corresponding answer, answer is lost,
      after a certain timeout, the originator SHOULD <bcp14>SHOULD</bcp14> resend another
      CANCEL packet.</t>

	</list>
	</t> packet.</li>
          </ul>
        </section>
        <section title="Outlier Samples" anchor="section-9.6.2"><t> anchor="sec-9.6.2" numbered="true" toc="default">
          <name>Outlier Samples</name>
          <t>
   Outlier samples are those jitter or latency values far from the
   general/average values of most samples.</t>
          <t>
   Hence
   Hence, the Q4S default measurement method uses the statistical median
   formula for latency calculation, and the outlier samples are
   neutralized. This is a very common filtering filter for noise or errors
   on signal and image processing.</t>
        </section>
      </section>
      <section title="Scenarios" anchor="section-9.7"><t> anchor="sec-9.7" numbered="true" toc="default">
        <name>Scenarios</name>
        <t>
   Q4S could be used in two scenarios:</t>

	<t><list style="symbols"><t>client
        <ul spacing="normal">
          <li>client to ACP (Application content provider)</t>

	<t>client </li>
          <li>client to client (peer to peer scenario)</t>

	</list>
	</t> (peer-to-peer scenario)</li>
        </ul>
        <section title="Client anchor="sec-9.7.1" numbered="true" toc="default">
          <name>Client to ACP" anchor="section-9.7.1"><t> ACP</name>
          <t>
   One server:</t>
          <t>
   It is the common scenario in which the client contact contacts the server to
   establish a Q4S session.</t>
          <t>
   N servers:</t>
          <t>
   In Content Delivery Networks and in general applications where
   delivery of contents can be achieved by different delivery nodes,
   two working mechanisms can be defined</t>

	<t><list style="symbols"><t>Starting mode: End-user defined:</t>
          <dl>
            <dt>Starting mode:</dt><dd>the end user may run Q4S against several delivery
      nodes and after some seconds choose the best one to start the
      multimedia session</t>

	<t>Prevention mode: During session.</dd>
            <dt>Prevention mode:</dt><dd>during a streaming session, the user keeps several
      Q4S dialogs against different alternative delivery nodes. In
      case of congestion, end-user MAY the end user <bcp14>MAY</bcp14> change to the best
      alternative delivery node</t>

	</list>
	</t> node.</dd>
          </dl>
        </section>
        <section title="Client anchor="sec-9.7.2" numbered="true" toc="default">
          <name>Client to Client" anchor="section-9.7.2"><t> Client</name>
          <t>
   In order to solve the client to client client-to-client scenario, a Q4S register
   function MUST <bcp14>MUST</bcp14> be implemented. This allows clients to contact each
   other for sending the BEGIN message. In this scenario, the
   Register server would be used by peers to publish their Q4S-Resource-Server header and their public IP address to make
   possible
   enable the assumption of the server role.</t>
          <t>
   The register function is out of scope of this protocol version, version
   because different HTTP mechanisms can be used used, and Q4S MUST NOT <bcp14>MUST NOT</bcp14>
   force any.</t>
        </section>
      </section>
    </section>
    <section title="Security Considerations" anchor="section-10"><section title="Confidentiality Issues" anchor="section-10.1"><t>
   Hence anchor="sec-10" numbered="true" toc="default">
      <name>Security Considerations</name>
      <section anchor="sec-10.1" numbered="true" toc="default">
        <name>Confidentiality Issues</name>
        <t>
   Because Q4S does not transport any application data, Q4S does not
   jeopardize the security of application data. However, other
   certain considerations may take place, like identity impersonation
   and measurements privacy and integrity.</t>
      </section>
      <section title="Integrity anchor="sec-10.2" numbered="true" toc="default">
        <name>Integrity of Measurements and Authentication" anchor="section-10.2"><t> Authentication</name>
        <t>
   Identity impersonation could potentially produce anomalous Q4S
   measurements. If this attack is based on spoofing of the server IP
   address, it can be avoided using the digital signature mechanism, mechanism
   included in the SDP. The network can easily validate this digital
   signature using the public key of the server certificate.</t>
        <t>
   Integrity of Q4S measurements under any malicious manipulation
   (such as a Man-in-the-Middle (MITM) attack) relay relies on the same
   mechanism, the SDP signature.</t>
        <t>
   The Signature header field contains the signed hash value of the SDP
   body in order to protect all the SDP data, including the
   measurements. This signature not only protects the integrity of
   data but also authenticates the server.</t>
      </section>
      <section title="Privacy anchor="sec-10.3" numbered="true" toc="default">
        <name>Privacy of Measurements" anchor="section-10.3"><t> Measurements</name>
        <t>
   This protocol could be supported over IPSec. IPsec. Q4S relays relies on UDP and
   TCP, and IPSec IPsec supports both.  If Q4S is used for application-based
   QoS, then IPsec is operationally valid but valid; however, if Q4S is used to
   trigger network-based actions, then measurements could be wrong, incorrect
   unless IPSec the IPsec ports can be considered at any a target of potential action over the
   network (such as prioritization prioritizing IPsec flows to measure the new, upgraded
   state of certain application flows).</t> flows). </t>
      </section>
      <section title="Availability Issues" anchor="section-10.4"><t> anchor="sec-10.4" numbered="true" toc="default">
        <name>Availability Issues</name>
        <t>
   Any loss of connectivity may interrupt the availability of the Q4S
   service,
   service and results may result in higher packet-loss packet loss measurements, which is
   just the desired behavior in these situations.</t>
        <t>
   In order to mitigate availability issues caused by malicious
   attacks (such as DoS and DDoS), a good practice is to enable the Q4S
   service only for authenticated users. Q4S can be launched after the
   user is authenticated by the application. At this moment, his the user's IP
   address is known known, and the Q4S service may be enabled for this IP
   address. Otherwise Otherwise, the Q4S service should appear unreachable.</t>
      </section>
      <section title="Bandwidth anchor="sec-10.5" numbered="true" toc="default">
        <name>Bandwidth Occupancy Issues" anchor="section-10.5"><t> Issues</name>
        <t>
   Q4S bandwidth measurement is limited to the application needs. It
   means that all available bandwidth is not measured, but only the
   fraction required by the application. This allows other
   applications to use normally the rest of available bandwidth.</t> bandwidth normally.</t>
        <t>
   However, a malicious Q4S client could re-starts restart Q4S sessions just
   after finishing the negotiation Negotiation phase. The consequence would be to
   waste bandwidth for nothing.</t>
        <t>
   In order to mitigate this possible anomalous behavior, it is
   RECOMMENDED
   <bcp14>RECOMMENDED</bcp14> to configure the server to reject sessions from the
   same end-point endpoint when this situation is detected.</t>
      </section>
    </section>
    <section title="Future anchor="sec-11" numbered="true" toc="default">
      <name>Future Code Point Requirements" anchor="section-11"><t> Requirements</name>

      <t>
   If the ideas described in this document are pursued to become a
   protocol specification, then the code points described in this
   document will need to be assigned by IANA.</t>
      <section title="Service Port" anchor="section-11.1"><t>
   The need for an anchor="sec-11.1" numbered="true" toc="default">
        <name>Service Port</name>
        <t>
   An assigned PORT is to port would make possible a future Q4S
   aware network, Q4S-aware
   network capable of react reacting by itself to Q4S alerts. A
   specific port would simplify the identification of the protocol by
   network elements in charge of take making possible reactive decisions.
   Therefore, the need for a port assignment by IANA may be postponed to until there is the
   need for a future Q4S aware Q4S-aware network.</t>
        <t>
   Service Name: Q4S</t>
        <t>
   Transport Protocol(s): TCP</t>

	<t><list style="hanging" hangIndent="3"><t hangText="Assignee :">
	<vspace blankLines="1"/>
	Name :
        <dl newline="true" spacing="normal" indent="3">
          <dt>Assignee:</dt>
          <dd>
            <t>
	Name: Jose Javier Garcia Aranda
	<vspace blankLines="1"/>
            </t>
            <t>
	Email: jose_javier.garcia_aranda@nokia.com
            </t>

	<t hangText="Contact :">
	<vspace blankLines="1"/>
	Name :
          </dd>
          <dt>Contact:</dt>
          <dd>
            <t>
	Name: Jose Javier Garcia Aranda
	<vspace blankLines="1"/>
            </t>
            <t>
	Email: jose_javier.garcia_aranda@nokia.com
            </t>

	</list>
	</t>

        <t><list style="hanging" hangIndent="6">
        <t hangText="Description:">
          </dd>
        </dl>
        <dl newline="false" spacing="normal" indent="6">
          <dt>Description:</dt>
          <dd>
   The service associated with this request is in
   charge of the establishment of new Q4S sessions, and during the
   session
   session, manages the pass handoff to a new protocol stage (handshake,
   negotiation phase (Handshake,
   Negotiation and continuity) Continuity) as well as inform of sends alerts when
   measurements do not meet the requirements.</t>

   <t hangText="Reference:">
   this requirements.</dd>
          <dt>Reference:</dt>
          <dd>
   This document. This service does not use IP-layer
   broadcast, multicast, or anycast communication.</t>

   </list>
   </t> communication.</dd>
        </dl>
      </section>
    </section>
<section anchor="sec-12" numbered="true" toc="default">
<name>IANA Considerations</name>
<t>This document has no IANA actions.</t>
</section>
  </middle>
  <back>
	<references title="Normative References">

    <displayreference target="I-D.ietf-quic-transport" to="QUIC"/>
    <displayreference target="I-D.rhee-tcpm-cubic" to="CUBIC"/>
    <displayreference target="I-D.sridharan-tcpm-ctcp" to="CTCP"/>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7230.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7231.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7232.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7233.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7234.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7235.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2818.xml"/>
        <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.8174.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.3629.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5322.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5234.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6234.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8017.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3264.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4566.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3550.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0793.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0792.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml3/reference.I-D.ietf-quic-transport.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4656.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5357.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3261.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0768.xml"/>
	<reference anchor="ref-1" target="https://www.rfc-editor.org/info/rfc7230"><front>
	<title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
	<author fullname="R. Fielding" initials="R." surname="Fielding" role="editor">
	</author>
	<author fullname="J. Reschke" initials="J." surname="Reschke" role="editor">
	</author>
	<date month="June" year="2014"/>
	</front>
	<seriesInfo name="RFC" value="7230"/> anchor="RENO">
          <front>
            <title>The Macroscopic Behavior of the TCP Congestion Avoidance Algorithm</title>
            <seriesInfo name="DOI" value="10.17487/RFC7230"/>
	</reference>

	<reference anchor="ref-2" target="https://www.rfc-editor.org/info/rfc7231"><front>
	<title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title> value="10.1145/263932.264023"/>
            <author fullname="R. Fielding" initials="R." surname="Fielding" role="editor"> fullname="M. Mathis" initials="M." surname="Mathis">
	</author>
            <author fullname="J. Reschke" Semke" initials="J." surname="Reschke" role="editor">
	</author>
	<date month="June" year="2014"/>
	</front>
	<seriesInfo name="RFC" value="7231"/>
	<seriesInfo name="DOI" value="10.17487/RFC7231"/>
	</reference>

	<reference anchor="ref-3" target="https://www.rfc-editor.org/info/rfc7232"><front>
	<title>Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests</title>
	<author fullname="R. Fielding" initials="R." surname="Fielding" role="editor"> surname="Semke">
	</author>
            <author fullname="J. Reschke" Mahdavi" initials="J." surname="Reschke" role="editor">
	</author>
	<date month="June" year="2014"/>
	</front>
	<seriesInfo name="RFC" value="7232"/>
	<seriesInfo name="DOI" value="10.17487/RFC7232"/>
	</reference>

	<reference anchor="ref-4" target="https://www.rfc-editor.org/info/rfc7233"><front>
	<title>Hypertext Transfer Protocol (HTTP/1.1): Range Requests</title>
	<author fullname="R. Fielding" initials="R." surname="Fielding" role="editor">
	</author>
	<author fullname="Y. Lafon" initials="Y." surname="Lafon" role="editor"> surname="Mahdavi">
	</author>
            <author fullname="J. Reschke" initials="J." surname="Reschke" role="editor"> fullname="T. Ott" initials="T." surname="Ott">
	</author>
            <date month="June" year="2014"/> month="July" year="1997"/>
          </front>
	<seriesInfo name="RFC" value="7233"/>
	<seriesInfo name="DOI" value="10.17487/RFC7233"/>
	</reference>

	<reference anchor="ref-5" target="https://www.rfc-editor.org/info/rfc7234"><front>
	<title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
	<author fullname="R. Fielding" initials="R." surname="Fielding" role="editor">
	</author>
	<author fullname="M. Nottingham" initials="M." surname="Nottingham" role="editor">
	</author>
	<author fullname="J. Reschke" initials="J." surname="Reschke" role="editor">
	</author>
	<date month="June" year="2014"/>
	</front>
	<seriesInfo name="RFC" value="7234"/>
	<seriesInfo name="DOI" value="10.17487/RFC7234"/>
	</reference>

	<reference anchor="ref-6" target="https://www.rfc-editor.org/info/rfc7235"><front>
	<title>Hypertext Transfer Protocol (HTTP/1.1): Authentication</title>
	<author fullname="R. Fielding" initials="R." surname="Fielding" role="editor">
	</author>
	<author fullname="J. Reschke" initials="J." surname="Reschke" role="editor">
	</author>
	<date month="June" year="2014"/>
	</front>
	<seriesInfo name="RFC" value="7235"/>
	<seriesInfo name="DOI" value="10.17487/RFC7235"/>
	</reference>

	<reference anchor="ref-8" target="https://www.rfc-editor.org/info/rfc3550"><front>
	<title>RTP: A Transport Protocol for Real-Time Applications</title>
	<author fullname="H. Schulzrinne" initials="H." surname="Schulzrinne">
	</author>
	<author fullname="S. Casner" initials="S." surname="Casner">
	</author>
	<author fullname="R. Frederick" initials="R." surname="Frederick">
	</author>
	<author fullname="V. Jacobson" initials="V." surname="Jacobson">
	</author>
	<date month="July" year="2003"/>
	</front>
	<seriesInfo name="STD" value="64"/>
	<seriesInfo name="RFC" value="3550"/>
	<seriesInfo name="DOI" value="10.17487/RFC3550"/>
	</reference>

<!-- Version-Independent Properties of QUIC; companion document RFC YYYY -->

<reference anchor="ref-9">
<front>
<title>Version-Independent Properties of QUIC</title>

<author initials='M' surname='Thomson' fullname='Martin Thomson'>
    <organization />
</author>

<date month='July' day='10' year='2019' />

<abstract><t>This document defines the properties of the QUIC transport protocol that are expected to remain unchanged over time as new versions of the protocol are developed.  Note to Readers  Discussion of this draft takes place on the QUIC working group mailing list (quic@ietf.org), which is archived at https://mailarchive.ietf.org/arch/search/?email_list=quic [1].  Working Group information can be found at https://github.com/quicwg [2]; source code and issues list for this draft can be found at https://github.com/quicwg/base-drafts/labels/-invariants [3].</t></abstract>

</front>
<seriesInfo name="RFC" value="YYYY"/>
<seriesInfo name="DOI" value="10.17487/RFCYYYY"/>
</reference>

	<reference anchor="ref-10" target="https://www.rfc-editor.org/info/rfc4566"><front>
	<title>SDP: Session Description Protocol</title>
	<author fullname="M. Handley" initials="M." surname="Handley">
	</author>
	<author fullname="V. Jacobson" initials="V." surname="Jacobson">
	</author>
	<author fullname="C. Perkins" initials="C." surname="Perkins">
	</author>
	<date month="July" year="2006"/>
	</front>
	<seriesInfo name="RFC" value="4566"/>
	<seriesInfo name="DOI" value="10.17487/RFC4566"/>
	</reference>

	<reference anchor="ref-11" target="https://www.rfc-editor.org/info/rfc2119"><front>
	<title>Key words for use in RFCs to Indicate Requirement Levels</title>
	<author fullname="S. Bradner" initials="S." surname="Bradner">
	</author>
	<date month="March" year="1997"/>
	</front>
	<seriesInfo name="BCP" value="14"/>
	<seriesInfo name="RFC" value="2119"/>
	<seriesInfo name="DOI" value="10.17487/RFC2119"/>
	</reference>

	<reference anchor="ref-12" target="https://www.rfc-editor.org/info/rfc3986"><front>
	<title>Uniform Resource Identifier (URI): Generic Syntax</title>
	<author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee">
	</author>
	<author fullname="R. Fielding" initials="R." surname="Fielding">
	</author>
	<author fullname="L. Masinter" initials="L." surname="Masinter">
	</author>
	<date month="January" year="2005"/>
	</front>
	<seriesInfo name="STD" value="66"/>
	<seriesInfo name="RFC" value="3986"/>
	<seriesInfo name="DOI" value="10.17487/RFC3986"/>
	</reference>

	<reference anchor="ref-13" target="https://www.rfc-editor.org/info/rfc3264"><front>
	<title>An Offer/Answer Model with Session Description Protocol (SDP)</title>
	<author fullname="J. Rosenberg" initials="J." surname="Rosenberg">
	</author>
	<author fullname="H. Schulzrinne" initials="H." surname="Schulzrinne">
	</author>
	<date month="June" year="2002"/>
	</front>
	<seriesInfo name="RFC" value="3264"/>
	<seriesInfo name="DOI" value="10.17487/RFC3264"/>
	</reference>

	<reference anchor="ref-14" target="https://www.rfc-editor.org/info/rfc4634"><front>
	<title>US Secure Hash Algorithms (SHA and HMAC-SHA)</title>
	<author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd">
	</author>
	<author fullname="T. Hansen" initials="T." surname="Hansen">
	</author>
	<date month="July" year="2006"/>
	</front>
	<seriesInfo name="RFC" value="4634"/>
	<seriesInfo name="DOI" value="10.17487/RFC4634"/>
	</reference>

	<reference anchor="ref-15" target="https://www.rfc-editor.org/info/rfc8017"><front>
	<title>PKCS #1: RSA Cryptography Specifications Version 2.2</title>
	<author fullname="K. Moriarty" initials="K." surname="Moriarty" role="editor">
	</author>
	<author fullname="B. Kaliski" initials="B." surname="Kaliski">
	</author>
	<author fullname="J. Jonsson" initials="J." surname="Jonsson">
	</author>
	<author fullname="A. Rusch" initials="A." surname="Rusch">
	</author>
	<date month="November" year="2016"/>
	</front>
	<seriesInfo name="RFC" value="8017"/>
	<seriesInfo name="DOI" value="10.17487/RFC8017"/>
	</reference>

	<reference anchor="ref-16" target="https://www.rfc-editor.org/info/rfc793"><front>
	<title>Transmission Control Protocol</title>
	<author fullname="J. Postel" initials="J." surname="Postel">
	</author>
	<date month="September" year="1981"/>
	</front>
	<seriesInfo name="STD" value="7"/>
	<seriesInfo name="RFC" value="793"/>
	<seriesInfo name="DOI" value="10.17487/RFC0793"/>
	</reference>

	<reference anchor="ref-17" target="https://www.rfc-editor.org/info/rfc768"><front>
	<title>User Datagram Protocol</title>
	<author fullname="J. Postel" initials="J." surname="Postel">
	</author>
	<date month="August" year="1980"/>
	</front>
	<seriesInfo name="STD" value="6"/>
	<seriesInfo name="RFC" value="768"/>
	<seriesInfo name="DOI" value="10.17487/RFC0768"/>
	</reference>

	<reference anchor="ref-18" target="https://www.rfc-editor.org/info/rfc3550"><front>
	<title>RTP: A Transport Protocol for Real-Time Applications</title>
	<author fullname="H. Schulzrinne" initials="H." surname="Schulzrinne">
	</author>
	<author fullname="S. Casner" initials="S." surname="Casner">
	</author>
	<author fullname="R. Frederick" initials="R." surname="Frederick">
	</author>
	<author fullname="V. Jacobson" initials="V." surname="Jacobson">
	</author>
	<date month="July" year="2003"/>
	</front>
	<seriesInfo name="STD" value="64"/>
	<seriesInfo name="RFC" value="3550"/>
	<seriesInfo name="DOI" value="10.17487/RFC3550"/>
	</reference>

	<reference anchor="ref-19" target="https://www.rfc-editor.org/info/rfc3629"><front>
	<title>UTF-8, a transformation format of ISO 10646</title>
	<author fullname="F. Yergeau" initials="F." surname="Yergeau">
	</author>
	<date month="November" year="2003"/>
	</front>
	<seriesInfo name="STD" value="63"/>
	<seriesInfo name="RFC" value="3629"/>
	<seriesInfo name="DOI" value="10.17487/RFC3629"/>
	</reference>

	<reference anchor="ref-20" target="https://www.rfc-editor.org/info/rfc5322"><front>
	<title>Internet Message Format</title>
	<author fullname="P. Resnick" initials="P." surname="Resnick" role="editor">
	</author>
	<date month="October" year="2008"/>
	</front>
	<seriesInfo name="RFC" value="5322"/>
	<seriesInfo name="DOI" value="10.17487/RFC5322"/>
	</reference>

	<reference anchor="ref-21" target="https://www.rfc-editor.org/info/rfc8174"><front>
	<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
	<author fullname="B. Leiba" initials="B." surname="Leiba">
	</author>
	<date month="May" year="2017"/>
	</front>
	<seriesInfo name="BCP" value="14"/>
	<seriesInfo name="RFC" value="8174"/>
	<seriesInfo name="DOI" value="10.17487/RFC8174"/>
	</reference>

	</references>

	<references title="Informative References">

	<reference anchor="ref-22" target="https://www.rfc-editor.org/info/rfc3261"><front>
	<title>SIP: Session Initiation Protocol</title>
	<author fullname="J. Rosenberg" initials="J." surname="Rosenberg">
	</author>
	<author fullname="H. Schulzrinne" initials="H." surname="Schulzrinne">
	</author>
	<author fullname="G. Camarillo" initials="G." surname="Camarillo">
	</author>
	<author fullname="A. Johnston" initials="A." surname="Johnston">
	</author>
	<author fullname="J. Peterson" initials="J." surname="Peterson">
	</author>
	<author fullname="R. Sparks" initials="R." surname="Sparks">
	</author>
	<author fullname="M. Handley" initials="M." surname="Handley">
	</author>
	<author fullname="E. Schooler" initials="E." surname="Schooler">
	</author>
	<date month="June" year="2002"/>
	</front>
	<seriesInfo name="RFC" value="3261"/>
	<seriesInfo name="DOI" value="10.17487/RFC3261"/>
	</reference>

<!-- [rfced] [ref-23] URL: https://cseweb.ucsd.edu/classes/wi01/cse222/papers/mathis-tcpmodel-ccr97.pdf -->

	<reference anchor="ref-23"><front>
	<title>The Macroscopic Behavior of the TCP Congestion Avoidance Algorithm</title>
	<author fullname="M. Mathis" initials="M." surname="Mathis">
	</author>
	<author fullname="J. Semke" initials="J." surname="Semke">
	</author>
	<author fullname="J. Mahdavi" initials="J." surname="Mahdavi">
	</author>
	<author fullname="T. Ott" initials="T." surname="Ott">
	</author>
	<date month="July" year="1997"/>
	</front>
	<seriesInfo name="Computer Communications Review," value="27(3)"/>
	</reference>

	<reference anchor="ref-24" target="https://www.rfc-editor.org/info/rfc3649"><front>
	<title>HighSpeed TCP for Large Congestion Windows</title>
	<author fullname="S. Floyd" initials="S." surname="Floyd">
	</author>
	<date month="December" year="2003"/>
	</front>
	<seriesInfo name="RFC" value="3649"/>
	<seriesInfo name="DOI" value="10.17487/RFC3649"/>
	</reference>

<!-- draft-rhee-tcpm-cubic-02; Expired -->

<reference anchor='ref-25'>
<front>
<title>CUBIC for Fast Long-Distance Networks</title>

<author initials='I' surname='Rhee' fullname='Injong Rhee'>
    <organization />
</author>

<author initials='L' surname='Xu' fullname='Lisong Xu'>
    <organization />
</author>

<author initials='S' surname='Ha' fullname='Sangtae Ha'>
    <organization />
</author>

<date month='August' day='26' year='2008' />

<abstract><t>CUBIC is an extension to the current TCP standards.  The protocol differs from the current TCP standards only in the congestion window adjustment function in the sender side.  In particular, it uses a cubic function instead of a linear window increase of the current TCP standards to improve scalability and stability under fast and long distance networks.  BIC-TCP, a predecessor of CUBIC, has been a default TCP adopted by Linux since year 2005 and has already been deployed globally and in use for several years by the Internet community at large.  CUBIC is using a similar window growth function as BIC-TCP and is designed to be less aggressive and fairer to TCP in bandwidth usage than BIC-TCP while maintaining the strengths of BIC-TCP such as stability, window scalability and RTT fairness.  Through extensive testing in various Internet scenarios, we believe that CUBIC is safe for deployment and testing in the global Internet.  The intent of this document is to provide the protocol specification of CUBIC for a third party implementation and solicit the community feedback through experimentation on the performance of CUBIC.  We expect this document to be eventually published as an experimental RFC.</t></abstract>

</front>

<seriesInfo name='Work in Progress,' value='draft-rhee-tcpm-cubic-02' />
            <refcontent>ACM SIGCOMM Computer Communication Review, pp. 67-82</refcontent>
        </reference>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3649.xml"/>

        <!-- draft-rhee-tcpm-cubic-02; Expired since 2009 -->
        <xi:include href="https://www.rfc-editor.org/refs/bibxml3/reference.I-D.rhee-tcpm-cubic.xml"/>

        <!-- draft-sridharan-tcpm-ctcp-02; Expired since 2009 -->

<reference anchor='ref-26'>
<front>
<title>Compound TCP: A New TCP Congestion Control for High-Speed and Long Distance Networks</title>

<author initials='M' surname='Sridharan' fullname='Murali Sridharan'>
    <organization />
</author>

<author initials='K' surname='Tan' fullname='Kun Tan'>
    <organization />
</author>

<author initials='D' surname='Bansal' fullname='Deepak Bansal'>
    <organization />
</author>

<author initials='D' surname='Thaler' fullname='Dave Thaler'>
    <organization />
</author>

<date month='November' day='11' year='2008' />

<abstract><t>Compound TCP (CTCP) is a modification to TCP's congestion control mechanism for use with TCP connections with large congestion windows. This document describes the Compound TCP algorithm in detail, and solicits experimentation and feedback from the wider community.  The key idea behind CTCP is to add a scalable delay-based component to the standard TCP's loss-based congestion control. The sending rate of CTCP is controlled by both loss and delay components. The delay-based component has a scalable window increasing rule that not only efficiently uses the link capacity, but on sensing queue build up, proactively reduces the sending rate.</t></abstract>

</front>

<seriesInfo name='Work in Progress,' value='draft-sridharan-tcpm-ctcp-02' />
</reference>

	<reference anchor="ref-27" target="https://www.rfc-editor.org/info/rfc4656"><front>
	<title>A One-way Active Measurement Protocol (OWAMP)</title>
	<author fullname="S. Shalunov" initials="S." surname="Shalunov">
	</author>
	<author fullname="B. Teitelbaum" initials="B." surname="Teitelbaum">
	</author>
	<author fullname="A. Karp" initials="A." surname="Karp">
	</author>
	<author fullname="J. Boote" initials="J." surname="Boote">
	</author>
	<author fullname="M. Zekauskas" initials="M." surname="Zekauskas">
	</author>
	<date month="September" year="2006"/>
	</front>
	<seriesInfo name="RFC" value="4656"/>
	<seriesInfo name="DOI" value="10.17487/RFC4656"/>
	</reference>

	<reference anchor="ref-28" target="https://www.rfc-editor.org/info/rfc5357"><front>
	<title>A Two-Way Active Measurement Protocol (TWAMP)</title>
	<author fullname="K. Hedayat" initials="K." surname="Hedayat">
	</author>
	<author fullname="R. Krzanowski" initials="R." surname="Krzanowski">
	</author>
	<author fullname="A. Morton" initials="A." surname="Morton">
	</author>
	<author fullname="K. Yum" initials="K." surname="Yum">
	</author>
	<author fullname="J. Babiarz" initials="J." surname="Babiarz">
	</author>
	<date month="October" year="2008"/>
	</front>
	<seriesInfo name="RFC" value="5357"/>
	<seriesInfo name="DOI" value="10.17487/RFC5357"/>
	</reference>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml3/reference.I-D.sridharan-tcpm-ctcp.xml"/>
      </references>
    </references>
    <section title="Acknowledgments" anchor="section-13"><t> anchor="sec-13" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>
   Many people have made comments and suggestions contributing to
   this document. In particular, we would like to thank:</t>
      <t>
   Victor Villagra, Sonia Herranz, Clara
   <contact fullname="Victor Villagra"/>, <contact fullname="Sonia Herranz"/>,
   <contact fullname="Clara Cubillo Pastor, Francisco Pastor"/>, <contact fullname="Francisco Duran Pina, Michael Scharf, Jesus Pina"/>,
   <contact fullname="Michael Scharf"/>, <contact fullname="Jesus Soto Viso Viso"/>, and Federico Guillen.</t>
   <contact fullname="Federico Guillen"/>.</t>
      <t>
   Additionally, we want to thank the Spanish Centre for the
   Development of Industrial Technology (CDTI) as well as the Spanish
   Science and Tech Ministry Ministry, which funds this initiative through
   their innovation programs.</t>
    </section>
    <section title="Contributors" anchor="section-14"><figure><artwork><![CDATA[
Jacobo anchor="sec-14" numbered="false" toc="default">
      <name>Contributors</name>
<contact fullname="Jacobo Perez Lajo
Nokia Spain
Email: jacobo.perez@nokia.com

Luis Lajo">
<organization>Nokia Spain</organization>
<address>
<email>jacobo.perez@nokia.com</email>
</address>
</contact>

<contact fullname="Luis Miguel Diaz Vizcaino
Nokia Spain
Email: Luismi.Diaz@nokia.com

Gonzalo Vizcaino">
<organization>Nokia Spain</organization>
<address>
<email>Luismi.Diaz@nokia.com</email>
</address>
</contact>

<contact fullname="Gonzalo Munoz Fernandez
Nokia Spain
Email: gonzalo.munoz_fernandez.ext@nokia.com

Manuel Fernandez">
<organization>Nokia Spain</organization>
<address>
<email>gonzalo.munoz_fernandez.ext@nokia.com</email>
</address>
</contact>

<contact fullname="Manuel Alarcon Granero
Nokia Spain
Email: manuel.alarcon_granero.ext@nokia.com

Francisco Granero">
<organization>Nokia Spain</organization>
<address>
<email>manuel.alarcon_granero.ext@nokia.com</email>
</address>
</contact>

<contact fullname="Francisco Jose juan Quintanilla
Nokia Spain
Email: francisco_jose.juan_quintanilla.ext@nokia.com

Carlos Barcenilla
Universidad Juan Quintanilla">
<organization>Nokia Spain</organization>
<address>
<email>francisco_jose.juan_quintanilla.ext@nokia.com</email>
</address>
</contact>

<contact fullname="Carlos Barcenilla">
<organization>Universidad Politecnica de Madrid

Juan Quemada
Universidad Madrid</organization>
</contact>

<contact fullname="Juan Quemada">
<organization>Universidad Politecnica de Madrid
Email: jquemada@dit.upm.es

Ignacio Maestro
Tecnalia Madrid</organization>
<address>
<email>jquemada@dit.upm.es</email>
</address>
</contact>

<contact fullname="Ignacio Maestro">
<organization>Tecnalia Research & Innovation
Email: ignacio.maestro@tecnalia.com

Lara &amp; Innovation</organization>
<address>
<email>ignacio.maestro@tecnalia.com</email>
</address>
</contact>

<contact fullname="Lara Fajardo Ibanez
Optiva Media
Email: lara.fajardo@optivamedia.com

Pablo Lopez Zapico
Optiva Media
Email: Pablo.lopez@optivamedia.com

David Ibañez">
<organization>Optiva Media</organization>
<address>
<email>lara.fajardo@optivamedia.com</email>
</address>
</contact>

<contact fullname="Pablo López Zapico">
<organization>Optiva Media</organization>
<address>
<email>Pablo.lopez@optivamedia.com</email>
</address>
</contact>

<contact fullname="David Muelas Recuenco
Universidad Recuenco">
<organization>Universidad Autonoma de Madrid
Email: dav.muelas@uam.es
Jesus Madrid</organization>
<address>
<email>dav.muelas@uam.es</email>
</address>
</contact>

<contact fullname="Jesus Molina Merchan
Universidad Merchan">
<organization>Universidad Autonoma de Madrid
jesus.molina@uam.es

Jorge Madrid</organization>
<address>
<email>jesus.molina@uam.es</email>
</address>
</contact>

<contact fullname="Jorge E. Lopez de Vergara Mendez
Universidad Mendez">
<organization>Universidad Autonoma de Madrid
Email: jorge.lopez_vergara@uam.es

Victor Madrid</organization>
<address>
<email>jorge.lopez_vergara@uam.es</email>
</address>
</contact>

<contact fullname="Victor Manuel Maroto Ortega
Optiva Media
Email: victor.maroto@optivamedia.com
]]></artwork>
	</figure> Ortega">
<organization>Optiva Media</organization>
<address>
<email>victor.maroto@optivamedia.com</email>
</address>
</contact>
    </section>
  </back>
</rfc>