Applicability of the QUIC Transport ProtocolEricssonmirja.kuehlewind@ericsson.comGoogle Switzerland GmbHGustav-Gull-Platz 1Zurich8004Switzerlandietf@trammell.ch
tsv
quicQUICapplication protocol mappingdeploymentThis document discusses the applicability of the QUIC transport protocol,
focusing on caveats impacting application protocol development and deployment
over QUIC. Its intended audience is designers of application protocol mappings
to QUIC and implementors of these application protocols.Status of This Memo
This document is not an Internet Standards Track specification; it is
published for informational purposes.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Not all documents
approved by the IESG are candidates for any level of Internet
Standard; see Section 2 of RFC 7841.
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
.
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
() in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Revised BSD License text as described in
Section 4.e of the Trust Legal Provisions and are provided without
warranty as described in the Revised BSD License.
Table of Contents
. Introduction
. The Necessity of Fallback
. 0-RTT
. Replay Attacks
. Session Resumption versus Keep-Alive
. Use of Streams
. Stream versus Flow Multiplexing
. Prioritization
. Ordered and Reliable Delivery
. Flow Control Deadlocks
. Stream Limit Commitments
. Packetization and Latency
. Error Handling
. Acknowledgment Efficiency
. Port Selection and Application Endpoint Discovery
. Source Port Selection
. Connection Migration
. Connection Termination
. Information Exposure and the Connection ID
. Server-Generated Connection ID
. Mitigating Timing Linkability with Connection ID Migration
. Using Server Retry for Redirection
. Quality of Service (QoS) and Diffserv Code Point (DSCP)
. Use of Versions and Cryptographic Handshake
. Enabling Deployment of New Versions
. Unreliable Datagram Service over QUIC
. IANA Considerations
. Security Considerations
. References
. Normative References
. Informative References
Acknowledgments
Contributors
Authors' Addresses
IntroductionQUIC is a new transport protocol providing a number of
advanced features. While initially designed for the HTTP use case, it provides
capabilities that can be used with a much wider variety of applications. QUIC is
encapsulated in UDP. QUIC version 1 integrates TLS 1.3 to
encrypt all payload data and most control information. The version of HTTP that
uses QUIC is known as HTTP/3 .This document provides guidance for application developers who want to use
the QUIC protocol without implementing it on their own. This includes general
guidance for applications operating over HTTP/3 or directly over QUIC.In the following sections, we discuss specific caveats to QUIC's applicability
and issues that application developers must consider when using QUIC as a
transport for their applications.The Necessity of FallbackQUIC uses UDP as a substrate. This enables userspace implementation and permits
traversal of network middleboxes (including NAT) without requiring updates to
existing network infrastructure.Measurement studies have shown between 3% and
5% of networks block all UDP traffic, though there
is little evidence of other forms of systematic disadvantage to UDP traffic
compared to TCP . This blocking implies that all applications
running on top of QUIC must either be prepared to accept connectivity failure
on such networks or be engineered to fall back to some other transport
protocol. In the case of HTTP, this fallback is TLS over TCP.The IETF Transport Services (TAPS) specifications describe a system with a
common API for multiple protocols. This is particularly relevant for QUIC as
it addresses the implications of fallback among multiple protocols.Specifically, fallback to insecure protocols or to weaker versions of secure
protocols needs to be avoided. In general, an application that implements
fallback needs to consider the security consequences. A fallback to TCP and
TLS exposes control information to modification and manipulation in the
network. Additionally, downgrades to TLS versions older than 1.3, which is
used in QUIC version 1, might result in significantly weaker
cryptographic protection. For example, the results of protocol negotiation
only have confidentiality protection if TLS 1.3 is used.These applications must operate, perhaps with impaired functionality, in the
absence of features provided by QUIC not present in the fallback protocol. For
fallback to TLS over TCP, the most obvious difference is that TCP does not
provide stream multiplexing, and therefore stream multiplexing would need to be
implemented in the application layer if needed. Further, TCP implementations
and network paths often do not support the TCP Fast Open (TFO) option , which
enables sending of payload data together with the first control packet of a new
connection as also provided by 0-RTT session resumption in QUIC. Note that
there is some evidence of middleboxes blocking SYN data even if TFO was
successfully negotiated (see ). And even if Fast Open
successfully operates end to end, it is limited to a single packet of TLS
handshake and application data, unlike QUIC 0-RTT.Moreover, while encryption (in this case TLS) is inseparably integrated with
QUIC, TLS negotiation over TCP can be blocked. If TLS over TCP cannot be
supported, the connection should be aborted, and the application then ought
to present a suitable prompt to the user that secure communication is
unavailable.In summary, any fallback mechanism is likely to impose a degradation of
performance and can degrade security; however, fallback must not silently
violate the application's expectation of confidentiality or integrity of its
payload data.0-RTTQUIC provides for 0-RTT connection establishment. Though the same facility
exists in TLS 1.3 with TCP, 0-RTT presents opportunities and challenges for
applications using QUIC.A transport protocol that provides 0-RTT connection establishment is
qualitatively different from one that does not provide 0-RTT from the point of view of the
application using it. Relative trade-offs between the cost of closing and
reopening a connection and trying to keep it open are different; see
.An application needs to deliberately choose to use 0-RTT, as 0-RTT carries a
risk of replay attack. Application protocols that use 0-RTT require a profile
that describes the types of information that can be safely sent. For HTTP, this
profile is described in .Replay AttacksRetransmission or malicious replay of data contained in 0-RTT packets could
cause the server side to receive multiple copies of the same data.Application data sent by the client in 0-RTT packets could be processed more
than once if it is replayed. Applications need to be aware of what is safe to
send in 0-RTT. Application protocols that seek to enable the use of 0-RTT need
a careful analysis and a description of what can be sent in 0-RTT; see
.In some cases, it might be sufficient to limit application data sent in 0-RTT
to data that does not cause actions with lasting effects at a
server. Initiating data retrieval or establishing configuration are
examples of actions that could be safe. Idempotent operations -- those for which
repetition has the same net effect as a single operation -- might be safe.
However, it is also possible to combine individually idempotent operations into
a non-idempotent sequence of operations.Once a server accepts 0-RTT data, there is no means of selectively discarding
data that is received. However, protocols can define ways to reject individual
actions that might be unsafe if replayed.Some TLS implementations and deployments might be able to provide partial or
even complete replay protection, which could be used to manage replay risk.Session Resumption versus Keep-AliveBecause QUIC is encapsulated in UDP, applications using QUIC must deal with
short network idle timeouts. Deployed stateful middleboxes will generally
establish state for UDP flows on the first packet sent and keep state for
much shorter idle periods than for TCP. suggests a TCP idle
period of at least 124 minutes, though there is no evidence of widespread
implementation of this guideline in the literature. However, short network timeout for
UDP is well-documented. According to a 2010 study
(), UDP applications can assume that any NAT binding or other
state entry can expire after just thirty seconds of inactivity. further discusses keep-alive intervals for UDP: it
requires that there is a minimum value of 15 seconds, but recommends larger values, or that keep-alive is omitted entirely.By using a connection ID, QUIC is designed to be robust to NAT
rebinding after a timeout. However, this only helps if one endpoint maintains
availability at the address its peer uses and the peer is the one to send
after the timeout occurs.Some QUIC connections might not be robust to NAT rebinding because the routing
infrastructure (in particular, load balancers) uses the address/port 4-tuple
to direct traffic. Furthermore, middleboxes with functions other than address
translation could still affect the path. In particular, some firewalls do not
admit server traffic for which the firewall has no recent state for a
corresponding packet sent from the client.QUIC applications can adjust idle periods to manage the risk of timeout. Idle
periods and the network idle timeout are distinct from the connection idle
timeout, which is defined as the minimum of either endpoint's idle timeout
parameter; see . There are three options:
Ignore the issue if the application-layer protocol consists only of
interactions with no or very short idle periods or if the protocol's resistance
to NAT rebinding is sufficient.
Ensure there are no long idle periods.
Resume the session after a long idle period, using 0-RTT resumption when
appropriate.
The first strategy is the easiest, but it only applies to certain applications.Either the server or the client in a QUIC application can send PING frames as
keep-alives to prevent the connection and any on-path state from timing out.
Recommendations for the use of keep-alives are application specific, mainly
depending on the latency requirements and message frequency of the application.
In this case, the application mapping must specify whether the client or server
is responsible for keeping the application alive. While suggests
that 30 seconds might be a suitable value for the public Internet when a NAT
is on path, larger values are preferable if the deployment can consistently
survive NAT rebinding or is known to be in a controlled environment (e.g.,
data centers) in order to lower network and computational load.Sending PING frames more frequently than every 30 seconds over long idle
periods may result in excessive unproductive traffic in some situations and
unacceptable power usage for power-constrained (mobile) devices. Additionally,
timeouts shorter than 30 seconds can make it harder to handle transient network
interruptions, such as Virtual Machine (VM) migration or coverage loss during mobility.
See , especially Section .Alternatively, the client (but not the server) can use session resumption
instead of sending keep-alive traffic. In this case, a client that wants to send
data to a server over a connection that has been idle longer than the server's
idle timeout (available from the idle_timeout transport parameter) can simply
reconnect. When possible, this reconnection can use 0-RTT session resumption,
reducing the latency involved with restarting the connection. Of course, this
approach is only valid in cases in which it is safe to use 0-RTT and when the
client is the restarting peer.The trade-offs between resumption and keep-alives need to be evaluated on a
per-application basis. In general, applications should use keep-alives only in
circumstances where continued communication is highly likely; , for
instance, recommends using keep-alives only when a request is outstanding.Use of StreamsQUIC's stream multiplexing feature allows applications to run multiple streams
over a single connection without head-of-line blocking between streams. Stream
data is carried within frames where one QUIC packet on the wire can carry one
or multiple stream frames.Streams can be unidirectional or bidirectional, and a stream may be initiated
either by client or server. Only the initiator of a unidirectional stream can
send data on it.Streams and connections can each carry a maximum of
262-1 bytes in each direction due to encoding limitations on
stream offsets and connection flow control limits. In the presently unlikely
event that this limit is reached by an application, a new connection would
need to be established.Streams can be independently opened and closed, gracefully or abruptly. An
application can gracefully close the egress direction of a stream by instructing
QUIC to send a FIN bit in a STREAM frame. It cannot gracefully close the ingress
direction without a peer-generated FIN, much like in TCP. However, an endpoint
can abruptly close the egress direction or request that its peer abruptly close
the ingress direction; these actions are fully independent of each other.QUIC does not provide an interface for exceptional handling of any stream.
If a stream that is critical for an application is closed, the application can
generate error messages on the application layer to inform the other end and/or
the higher layer, which can eventually terminate the QUIC connection.Mapping of application data to streams is application specific and described for
HTTP/3 in . There are a few general principles to apply when
designing an application's use of streams:
A single stream provides ordering. If the application requires certain data to
be received in order, that data should be sent on the same stream. There is
no guarantee of transmission, reception, or delivery order across streams.
Multiple streams provide concurrency. Data that can be processed
independently, and therefore would suffer from head-of-line blocking if forced
to be received in order, should be transmitted over separate streams.
Streams can provide message orientation and allow messages to be canceled.
If one message is mapped to a single stream, resetting the stream to expire an
unacknowledged message can be used to emulate partial reliability
for that message.
If a QUIC receiver has opened the maximum allowed concurrent
streams, and the sender indicates that more streams are needed, it
does not automatically lead to an increase of the maximum number of
streams by the receiver. Therefore, an application should consider the
maximum number of allowed, currently open, and currently used streams when
determining how to map data to streams.QUIC assigns a numerical identifier, called the stream ID, to each stream. While
the relationship between these identifiers and stream types is clearly defined
in version 1 of QUIC, future versions might change this relationship for various
reasons. QUIC implementations should expose the properties of each stream
(which endpoint initiated the stream, whether the stream is unidirectional or
bidirectional, the stream ID used for the stream); applications should query for
these properties rather than attempting to infer them from the stream ID.The method of allocating stream identifiers to streams opened by the application
might vary between transport implementations. Therefore, an application should
not assume a particular stream ID will be assigned to a stream that has not yet
been allocated. For example, HTTP/3 uses stream IDs to refer to streams that
have already been opened but makes no assumptions about future stream IDs or
the way in which they are assigned (see ).Stream versus Flow MultiplexingStreams are meaningful only to the application; since stream information is
carried inside QUIC's encryption boundary, a given packet exposes
no information about which
stream(s) are carried within the packet.
Therefore, stream multiplexing is not intended to be used for differentiating
streams in terms of network treatment. Application traffic requiring different
network treatment should therefore be carried over different 5-tuples (i.e.,
multiple QUIC connections). Given QUIC's ability to send application data in
the first RTT of a connection (if a previous connection to the same host has
been successfully established to provide the necessary credentials), the cost
of establishing another connection is extremely low.PrioritizationStream prioritization is not exposed to either the network or the receiver.
Prioritization is managed by the sender, and the QUIC transport should
provide an interface for applications to prioritize streams .
Applications can implement their own prioritization scheme on top of QUIC: an
application protocol that runs on top of QUIC can define explicit messages
for signaling priority, such as those defined in
for HTTP. An application protocol can define rules
that allow an endpoint to determine priority based on context or can
provide a higher-level interface and leave the determination to the
application on top.Priority handling of retransmissions can be implemented by the sender in the
transport layer. recommends retransmitting lost data before new data,
unless indicated differently by the application. When a QUIC endpoint uses
fully reliable streams for transmission, prioritization of retransmissions will
be beneficial in most cases, filling in gaps and freeing up the flow
control window. For partially reliable or unreliable streams,
priority scheduling of retransmissions over data of higher-priority streams
might not be desirable. For such streams, QUIC could either provide an
explicit interface to control prioritization or derive the prioritization
decision from the reliability level of the stream.Ordered and Reliable DeliveryQUIC streams enable ordered and reliable delivery. Though it is possible for an
implementation to provide options that use streams for partial reliability
or out-of-order delivery, most implementations will assume that data is
reliably delivered in order.Under this assumption, an endpoint that receives stream data might not make
forward progress until data that is contiguous with the start of a stream is
available. In particular, a receiver might withhold flow control credit until
contiguous data is delivered to the application; see .
To support this receive logic, an endpoint will send stream data until it is
acknowledged, ensuring that data at the start of the stream is sent and
acknowledged first.An endpoint that uses a different sending behavior and does not negotiate that
change with its peer might encounter performance issues or deadlocks.Flow Control DeadlocksQUIC flow control () provides a means of managing access
to the limited buffers that endpoints have for incoming data. This mechanism limits
the amount of data that can be in buffers in endpoints or in transit on the
network. However, there are several ways in which limits can produce conditions
that can cause a connection to either perform suboptimally or become deadlocked.Deadlocks in flow control are possible for any protocol that uses QUIC, though
whether they become a problem depends on how implementations consume data and
provide flow control credit. Understanding what causes deadlocking might help
implementations avoid deadlocks.The size and rate of updates to flow control credit can affect
performance. Applications that use QUIC often have a data consumer that reads
data from transport buffers. Some implementations might have independent
receive buffers at the transport layer and application layer. Consuming data does not
always imply it is immediately processed. However, a common
implementation technique is to extend flow control credit to the sender by emitting MAX_DATA
and/or MAX_STREAM_DATA frames as data is consumed. Delivery of these frames
is affected by the latency of the back channel from the receiver to the data
sender. If credit is not extended in a timely manner, the
sending application can be blocked, effectively throttling the sender.Large application messages can produce deadlocking if the recipient does not
read data from the transport incrementally. If the message is larger than the
flow control credit available and the recipient does not release additional flow
control credit until the entire message is received and delivered, a deadlock
can occur. This is possible even where stream flow control limits are not
reached because connection flow control limits can be consumed by other streams.A length-prefixed message format makes it easier for a data consumer to leave
data unread in the transport buffer and thereby withhold flow control credit. If
flow control limits prevent the remainder of a message from being sent, a
deadlock will result. A length prefix might also enable the detection of this
sort of deadlock. Where application protocols have messages that might be
processed as a single unit, reserving flow control credit for the entire message
atomically makes this style of deadlock less likely.A data consumer can eagerly read all data as it becomes available in order to
make the receiver extend flow control credit and reduce the chances of a
deadlock. However, such a data consumer might need other means for holding a
peer accountable for the additional state it keeps for partially processed
messages.Deadlocking can also occur if data on different streams is interdependent.
Suppose that data on one stream arrives before the data on a second stream on
which it depends. A deadlock can occur if the first stream is left unread,
preventing the receiver from extending flow control credit for the second
stream. To reduce the likelihood of deadlock for interdependent data, the
sender should ensure that dependent data is not sent until the data
it depends on has been accounted for in both stream- and connection-level flow
control credit.Some deadlocking scenarios might be resolved by canceling affected streams with
STOP_SENDING or RESET_STREAM. Canceling some streams results in the connection
being terminated in some protocols.Stream Limit CommitmentsQUIC endpoints are responsible for communicating the cumulative limit of streams
they would allow to be opened by their peer. Initial limits are advertised using
the initial_max_streams_bidi and initial_max_streams_uni transport parameters.
As streams are opened and closed, they are consumed, and the cumulative total is
incremented. Limits can be increased using the MAX_STREAMS frame, but there is no
mechanism to reduce limits. Once stream limits are reached, no more streams can
be opened, which prevents applications using QUIC from making further progress.
At this stage, connections can be terminated via idle timeout or explicit close;
see .An application that uses QUIC and communicates a cumulative stream limit might
require the connection to be closed before the limit is reached, e.g.,
to stop the server in order to perform scheduled maintenance. Immediate connection close
causes abrupt closure of actively used streams. Depending on how an application
uses QUIC streams, this could be undesirable or detrimental to behavior or
performance.A more graceful closure technique is to stop sending increases to
stream limits and allow the connection to naturally terminate once remaining
streams are consumed. However, the period of time it takes to do so is dependent
on the peer, and an unpredictable closing period might not fit application or
operational needs. Applications using QUIC can be conservative with open stream
limits in order to reduce the commitment and indeterminism. However, being
overly conservative with stream limits affects stream concurrency. Balancing
these aspects can be specific to applications and their deployments.Instead of
relying on stream limits to avoid abrupt closure, an application layer's graceful
close mechanism can be used to communicate the intention to explicitly close the
connection at some future point. HTTP/3 provides such a mechanism using the
GOAWAY frame. In HTTP/3, when the GOAWAY frame is received by a client, it
stops opening new streams even if the cumulative stream limit would allow.
Instead, the client would create a new connection on which to open further
streams. Once all streams are closed on the old connection, it can be
terminated safely by a connection close or after expiration of the idle timeout
(see ).Packetization and LatencyQUIC exposes an interface that provides multiple streams to the application;
however, the application usually cannot control how data transmitted over those
streams is mapped into frames or how those frames are bundled into packets.By default, many implementations will try to pack STREAM frames
from one or more streams into each QUIC packet, in order to minimize
bandwidth consumption and computational costs (see ). If there is not enough data
available to fill a packet, an implementation might wait for a short time to
optimize bandwidth efficiency instead of latency. This delay can either be
preconfigured or dynamically adjusted based on the observed sending pattern of
the application.If the application requires low latency, with only small chunks of data to
send, it may be valuable to indicate to QUIC that all data should be sent out
immediately. Alternatively, if the application expects to use a specific
sending pattern, it can also provide a suggested delay to QUIC for how long to
wait before bundling frames into a packet.Similarly, an application usually has no control over the length of a QUIC
packet on the wire. QUIC provides the ability to add a PADDING frame to
arbitrarily increase the size of packets. Padding is used by QUIC to ensure that
the path is capable of transferring datagrams of at least a certain size during
the handshake (see Sections and of ) and for path validation
after connection migration (see ) as well as for Datagram
Packetization Layer PMTU Discovery (DPLPMTUD) (see ).Padding can also be used by an application to reduce leakage of
information about the data that is sent. A QUIC implementation can expose an
interface that allows an application layer to specify how to apply padding.Error HandlingQUIC recommends that endpoints signal any detected errors to
the peer. Errors can occur at the transport layer and the application layer.
Transport errors, such as a protocol violation, affect the entire connection.
Applications that use QUIC can define their own error detection and signaling
(see, for example, ). Application errors can affect an
entire connection or a single stream.QUIC defines an error code space that is used for error handling at the
transport layer. QUIC encourages endpoints to use the most specific code,
although any applicable code is permitted, including generic ones.Applications using QUIC define an error
code space that is independent of QUIC or other applications (see, for
example, ). The values in an application error code
space can be reused across connection-level and stream-level errors.Connection errors lead to connection termination. They are signaled using a
CONNECTION_CLOSE frame, which contains an error code and a reason field that can
be zero length. Different types of CONNECTION_CLOSE frames are used to
signal transport and application errors.Stream errors lead to stream termination. These are signaled using
STOP_SENDING or
RESET_STREAM frames, which contain only an error code.Acknowledgment EfficiencyQUIC version 1 without extensions uses an acknowledgment strategy
adopted from TCP (see ).
That is, it recommends that every other packet is acknowledged.
However, generating and processing QUIC acknowledgments consumes resources
at a sender and receiver. Acknowledgments also incur forwarding costs and
contribute to link utilization, which can impact performance over some
types of network.
Applications might be able to improve overall performance
by using alternative strategies that reduce the rate of acknowledgments.
describes an extension to signal the desired
delay of acknowledgments and discusses use cases as well as implications for
congestion control and recovery.Port Selection and Application Endpoint DiscoveryIn general, port numbers serve two purposes: "first, they provide a
demultiplexing identifier to differentiate transport sessions between the same
pair of endpoints, and second, they may also identify the application protocol
and associated service to which processes connect" (). The assumption
that an application can be identified in the network based on the port number
is less true today due to encapsulation and mechanisms for dynamic port
assignments, as noted in .As QUIC is a general-purpose transport protocol, there are no requirements that
servers use a particular UDP port for QUIC. For an application with a fallback to
TCP that does not already have an alternate mapping to UDP, it is usually
appropriate to register (if necessary) and use the UDP port number corresponding to the TCP
port already registered for the application. For example,
the default port for HTTP/3 is UDP port 443, analogous to HTTP/1.1
or HTTP/2 over TLS over TCP.Given the prevalence of the assumption in network management
practice that a port number maps unambiguously to an application, the
use of ports that cannot easily be mapped to a registered service name
might lead to blocking or other changes to the forwarding behavior by network
elements such as firewalls that use the port number for application
identification.Applications could define an alternate endpoint discovery mechanism to allow
the usage of ports other than the default. For example, HTTP/3 (Sections and of ) specifies the use of HTTP Alternative Services
for an HTTP origin to advertise the availability of an equivalent
HTTP/3 endpoint on a certain UDP port by using "h3" as the Application-Layer
Protocol Negotiation (ALPN) token.ALPN permits the
client and server to negotiate which of several protocols will be used on a
given connection. Therefore, multiple applications might be supported on a
single UDP port based on the ALPN token offered. Applications using QUIC
are required to register an ALPN token for use in the TLS handshake.As QUIC version 1 deferred defining a complete version negotiation mechanism,
HTTP/3 requires QUIC version 1 and defines the
ALPN token ("h3") to only apply to that version.
So far, no single approach has been selected for
managing the use of different QUIC versions, neither in HTTP/3 nor in general.
Application protocols that use QUIC need to
consider how the protocol will manage different QUIC versions.
Decisions for those protocols might be informed by choices made by other
protocols, like HTTP/3.Source Port SelectionSome UDP protocols are vulnerable to reflection attacks, where an attacker is
able to direct traffic to a third party as a denial of service. For example,
these source ports are associated with applications known to be vulnerable to
reflection attacks, often due to server misconfiguration:
port 53 - DNS
port 123 - NTP
port 1900 - SSDP
port 5353 - mDNS
port 11211 - memcache
Services might block source ports associated with protocols known to be
vulnerable to reflection attacks to avoid the overhead of processing large
numbers of packets. However, this practice has negative effects on
clients -- not only does it require establishment of a new connection but in
some instances might cause the client to avoid using QUIC for that service for
a period of time and downgrade to a non-UDP protocol (see ).As a result, client implementations are encouraged to avoid using source ports
associated with protocols known to be vulnerable to reflection attacks. Note
that following the general guidance for client implementations given in
, to use ephemeral ports in the range 49152-65535, has the
effect of avoiding these ports. Note that other source ports might be
reflection vectors as well.Connection MigrationQUIC supports connection migration by the client. If the client's IP address
changes, a QUIC endpoint can still associate packets
with an existing transport connection using the Destination Connection ID
field (see ) in the QUIC header.
This supports cases where the address information changes, such as NAT rebinding, the
intentional change of the local interface, the expiration of a temporary
IPv6 address , or the indication from the server of a preferred
address ().Use of a non-zero-length connection ID for the server is strongly recommended if
any clients are or could be behind a NAT. A non-zero-length connection ID is
also strongly recommended when active migration is supported. If a connection
is intentionally migrated to a new path, a new connection ID is used to minimize
linkability by network observers. The other QUIC endpoint uses the
connection ID to link different addresses to the same connection
and entity if a non-zero-length connection ID is provided.The base specification of QUIC version 1 only supports the use of a single
network path at a time, which
enables failover use cases. Path validation is required so that endpoints
validate paths before use to avoid address spoofing attacks. Path validation
takes at least one RTT, and congestion control will also be reset after path
migration. Therefore, migration usually has a performance impact.QUIC probing packets, which can be sent on multiple paths at once, are used to
perform address validation as well as measure path characteristics. Probing
packets cannot carry application data but likely contain padding frames.
Endpoints can use information about their receipt as input to congestion control
for that path. Applications could use information learned from probing to inform
a decision to switch paths.Only the client can actively migrate in version 1 of QUIC. However, servers can
indicate during the handshake that they prefer to transfer the connection to a
different address after the handshake. For instance, this could be used to move
from an address that is shared by multiple servers to an address that is unique
to the server instance. The server can provide an IPv4 and an IPv6 address in a
transport parameter during the TLS handshake, and the client can select between
the two if both are provided. See .Connection TerminationQUIC connections are terminated in one of three ways: implicit idle timeout,
explicit immediate close, or explicit stateless reset.QUIC does not provide any mechanism for graceful connection termination;
applications using QUIC can define their own graceful termination process (see,
for example, ).QUIC idle timeout is enabled via transport parameters. The client and server
announce a timeout period, and the effective value for the connection is the
minimum of the two values. After the timeout period elapses, the connection is
silently closed. An application therefore should be able to configure its own
maximum value, as well as have access to the computed minimum value for this
connection. An application may adjust the maximum idle timeout for new
connections based on the number of open or expected connections since shorter
timeout values may free up resources more quickly.Application data exchanged on streams or in datagrams defers the QUIC idle
timeout. Applications that provide their own keep-alive mechanisms will
therefore keep a QUIC connection alive. Applications that do not provide their
own keep-alive can use transport-layer mechanisms (see and ). However, QUIC implementation
interfaces for controlling such transport behavior can vary, affecting the
robustness of such approaches.An immediate close is signaled by a CONNECTION_CLOSE frame (see
). Immediate close causes all streams to become immediately
closed, which may affect applications; see .A stateless reset is an option of last resort for an endpoint that does not have
access to connection state. Receiving a stateless reset is an indication of an
unrecoverable error distinct from connection errors in that there is no
application-layer information provided.Information Exposure and the Connection IDQUIC exposes some information to the network in the unencrypted part of the
header either before the encryption context is established or because the
information is intended to be used by the network. For more information on
manageability of QUIC, see .
QUIC has a long header that
exposes some additional information (the version and the source connection ID),
while the short header exposes only the destination connection ID.
In QUIC version 1, the long header is used during connection establishment,
while the short header is used for data transmission in an established
connection.The connection ID can be zero length. Zero-length connection IDs can be
chosen on each endpoint individually and on any packet except the first packets
sent by clients during connection establishment.An endpoint that selects a zero-length connection ID will receive packets with a
zero-length destination connection ID. The endpoint needs to use other
information, such as the source and destination IP address and port number to
identify which connection is referred to. This could mean that the endpoint is
unable to match datagrams to connections successfully if these values change,
making the connection effectively unable to survive NAT rebinding or migrate to
a new path.Server-Generated Connection IDQUIC supports a server-generated connection ID that is transmitted to the client during
connection establishment (see ). Servers behind load
balancers may need to change the connection ID during the handshake, encoding
the identity of the server or information about its load balancing pool, in
order to support stateless load balancing.Server deployments with load balancers and other routing infrastructure need to
ensure that this infrastructure consistently routes packets to the server
instance that has the connection state, even if addresses, ports, or
connection IDs change. This might require coordination between servers and
infrastructure. One method of achieving this involves encoding routing
information into the connection ID. For an example of this technique, see
.Mitigating Timing Linkability with Connection ID MigrationIf QUIC endpoints do not issue fresh connection IDs, then clients cannot
reduce the linkability of address migration by using them.
Choosing values that are unlinkable to an outside observer
ensures that activity on different paths cannot be trivially correlated
using the connection ID.While sufficiently robust connection ID generation schemes will mitigate
linkability issues, they do not provide full protection. Analysis of
the lifetimes of 6-tuples (source and destination addresses as well as the
migrated Connection ID) may expose these links anyway.In the case where connection migration in a server pool is rare, it is trivial
for an observer to associate two connection IDs. Conversely,
where every server handles multiple simultaneous migrations, even an
exposed server mapping may be insufficient information.The most efficient mitigations for these attacks are through network design
and/or operational practices, by using a load-balancing architecture that
loads more flows onto a single server-side address, by coordinating the
timing of migrations in an attempt to increase the number of simultaneous
migrations at a given time, or by using other means.Using Server Retry for RedirectionQUIC provides a Retry packet that can be sent by a server in response to
the client Initial packet. The server may choose a new connection ID in that
packet, and the client will retry by sending another client Initial packet with
the server-selected connection ID. This mechanism can be used to redirect a
connection to a different server, e.g., due to performance reasons or when
servers in a server pool are upgraded gradually and therefore may support
different versions of QUIC.In this case, it is assumed that all servers belonging to a certain pool are
served in cooperation with load balancers that forward the traffic based on the
connection ID. A server can choose the connection ID in the Retry packet such
that the load balancer will redirect the next Initial packet to a different
server in that pool. Alternatively, the load balancer can directly offer a Retry
offload as further described in .The approach described in for constructing
TLS resumption tickets provides an example that can be also applied to validation tokens.
However, the use of more modern cryptographic algorithms is highly recommended.Quality of Service (QoS) and Diffserv Code Point (DSCP)QUIC, as defined in , has a single congestion controller and
recovery handler. This design
assumes that all packets of a QUIC connection, or at least with the
same 5-tuple {dest addr, source addr, protocol, dest port, source port},
that have the same Diffserv Code Point (DSCP) will
receive similar network treatment since feedback about loss or delay
of each packet is used as input to the congestion controller. Therefore,
packets belonging to the same connection should use a single DSCP.
provides a discussion of Diffserv interactions
with datagram transport protocols (in this respect, the
interactions with QUIC resemble those of Stream Control Transmission Protocol (SCTP)).When multiplexing multiple flows
over a single QUIC connection, the selected DSCP value should be the one
associated with the highest priority requested for all multiplexed flows.If differential network treatment is desired,
e.g., by the use of different DSCPs, multiple QUIC
connections to the same server may be used. In general, it is
recommended to minimize the number of QUIC connections to the same server to
avoid increased overhead and, more importantly, competing congestion control.As in other uses of Diffserv,
when a packet enters a network segment that does not support the DSCP value,
this could result in the connection not receiving the network treatment
it expects. The DSCP value in this packet could also be remarked as the
packet travels along the network path, changing the requested treatment.Use of Versions and Cryptographic HandshakeVersioning in QUIC may change the protocol's behavior completely, except
for the meaning of a few header fields that have been declared to be invariant
. A version of QUIC
with a higher version number will not necessarily provide a better service
but might simply provide a different feature set. As such, an application needs
to be able to select which versions of QUIC it wants to use.A new version could use an encryption scheme other than TLS 1.3 or higher.
specifies requirements for the cryptographic handshake as currently
realized by TLS 1.3 and described in a separate specification
. This split is performed to enable
lightweight versioning with different cryptographic handshakes.The "QUIC Versions" registry established in allows for
provisional registrations for experimentation. Registration, also of
experimental versions, is important to avoid collision. Experimental
versions should not be used long-term or registered as permanent to minimize
the risk of fingerprinting based on the version number.Enabling Deployment of New VersionsQUIC version 1 does not specify a version negotiation mechanism in the base
specification, but proposes an
extension that provides compatible version negotiation.This approach uses a three-stage deployment mechanism, enabling
progressive rollout and experimentation with multiple versions across
a large server deployment. In this approach, all servers in the deployment
must accept connections using a new version (stage 1) before any server
advertises it (stage 2), and authentication of the new version (stage 3)
only proceeds after advertising of that version is completely deployed.See for details.Unreliable Datagram Service over QUIC specifies a QUIC extension to enable sending
and receiving unreliable datagrams over QUIC. Unlike operating directly over
UDP, applications that use the QUIC datagram service do not need to implement
their own congestion control, per , as QUIC datagrams are
congestion controlled.QUIC datagrams are not flow controlled, and as such data chunks may be dropped
if the receiver is overloaded. While the reliable transmission service of QUIC
provides a stream-based interface to send and receive data in order over
multiple QUIC streams, the datagram service has an unordered message-based
interface. If needed, an application-layer framing can be used on top to
allow separate flows of unreliable datagrams to be multiplexed on one QUIC
connection.IANA ConsiderationsThis document has no actions for IANA; however, note that
recommends that an application that has already registered a TCP port
but wants to specify QUIC as a transport should register
a UDP port analogous to their existing TCP registration.Security ConsiderationsSee the security considerations in and ; the security
considerations for the underlying transport protocol are relevant for
applications using QUIC. Considerations on linkability, replay attacks,
and randomness discussed in should be taken into account when
deploying and using QUIC.Further, migration to a new address exposes
a linkage between client addresses to the server and may expose this linkage
also to the path if the connection ID cannot be changed or flows can
otherwise be correlated. When migration is supported, this needs to be
considered with respective to user privacy.Application developers should note that any fallback they use when QUIC cannot
be used due to network blocking of UDP should guarantee the same security
properties as QUIC. If this is not possible, the connection should fail to
allow the application to explicitly handle fallback to a less-secure
alternative. See .Further, provides security considerations specific to HTTP.
However, discussions such as on cross-protocol attacks, traffic analysis
and padding, or migration might be relevant for other applications using QUIC
as well.ReferencesNormative ReferencesQUIC: A UDP-Based Multiplexed and Secure TransportThis document defines the core of the QUIC transport protocol. QUIC provides applications with flow-controlled streams for structured communication, low-latency connection establishment, and network path migration. QUIC includes security measures that ensure confidentiality, integrity, and availability in a range of deployment circumstances. Accompanying documents describe the integration of TLS for key negotiation, loss detection, and an exemplary congestion control algorithm.Version-Independent Properties of QUICThis document defines the properties of the QUIC transport protocol that are common to all versions of the protocol.Using TLS to Secure QUICThis document describes how Transport Layer Security (TLS) is used to secure QUIC.Informative ReferencesUsing UDP for Internet Transport EvolutionAn Experimental Study of Home Gateway CharacteristicsProc. ACM IMC 2010Using Early Data in HTTPUsing TLS early data creates an exposure to the possibility of a replay attack. This document defines mechanisms that allow clients to communicate with servers about HTTP requests that are sent in early data. Techniques are described that use these mechanisms to mitigate the risk of replay.Network support for TCP Fast OpenNANOG 67 PresentationQUIC Acknowledgement FrequencyFastlyGoogle This document describes a QUIC extension for an endpoint to control
its peer's delaying of acknowledgements.
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. Source
code and issues list for this draft can be found at
https://github.com/quicwg/ack-frequency.
Working Group information can be found at https://github.com/quicwg.
Work in ProgressHTTP/3The QUIC transport protocol has several features that are desirable in a transport for HTTP, such as stream multiplexing, per-stream flow control, and low-latency connection establishment. This document describes a mapping of HTTP semantics over QUIC. This document also identifies HTTP/2 features that are subsumed by QUIC and describes how HTTP/2 extensions can be ported to HTTP/3.QUIC-LB: Generating Routable QUIC Connection IDsGoogleMicrosoftPrivate Octopus Inc. QUIC address migration allows clients to change their IP address
while maintaining connection state. To reduce the ability of an
observer to link two IP addresses, clients and servers use new
connection IDs when they communicate via different client addresses.
This poses a problem for traditional "layer-4" load balancers that
route packets via the IP address and port 4-tuple. This
specification provides a standardized means of securely encoding
routing information in the server's connection IDs so that a properly
configured load balancer can route packets with migrated addresses
correctly. As it proposes a structured connection ID format, it also
provides a means of connection IDs self-encoding their length to aid
some hardware offloads.
Work in ProgressManageability of the QUIC Transport ProtocolEricssonGoogle Switzerland GmbHQUIC Retry OffloadGoogleMicrosoft QUIC uses Retry packets to reduce load on stressed servers, by
forcing the client to prove ownership of its address before the
server commits state. QUIC also has an anti-tampering mechanism to
prevent the unauthorized injection of Retry packets into a
connection. However, a server operator may want to offload
production of Retry packets to an anti-Denial-of-Service agent or
hardware accelerator. "Retry Offload" is a mechanism for
coordination between a server and an external generator of Retry
packets that can succeed despite the anti-tampering mechanism.
Work in ProgressCompatible Version Negotiation for QUICGoogle LLCMozilla QUIC does not provide a complete version negotiation mechanism but
instead only provides a way for the server to indicate that the
version the client chose is unacceptable. This document describes a
version negotiation mechanism that allows a client and server to
select a mutually supported version. Optionally, if the client's
chosen version and the negotiated version share a compatible first
flight format, the negotiation can take place without incurring an
extra round trip. This document updates RFC 8999.
Work in ProgressDomain names - concepts and facilitiesThis RFC is the revised basic definition of The Domain Name System. It obsoletes RFC-882. This memo describes the domain style names and their used for host address look up and electronic mail forwarding. It discusses the clients and servers in the domain name system and the protocol used between them.An Architecture for Differentiated ServicesThis document defines an architecture for implementing scalable service differentiation in the Internet. This memo provides information for the Internet community.Transport Layer Security (TLS) Session Resumption without Server-Side StateThis document describes a mechanism that enables the Transport Layer Security (TLS) server to resume sessions and avoid keeping per-client session state. The TLS server encapsulates the session state into a ticket and forwards it to the client. The client can subsequently resume a session using the obtained ticket. This document obsoletes RFC 4507. [STANDARDS-TRACK]NAT Behavioral Requirements for TCPThis document defines a set of requirements for NATs that handle TCP that would allow many applications, such as peer-to-peer applications and online games to work consistently. Developing NATs that meet this set of requirements will greatly increase the likelihood that these applications will function properly. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Network Time Protocol Version 4: Protocol and Algorithms SpecificationThe Network Time Protocol (NTP) is widely used to synchronize computer clocks in the Internet. This document describes NTP version 4 (NTPv4), which is backwards compatible with NTP version 3 (NTPv3), described in RFC 1305, as well as previous versions of the protocol. NTPv4 includes a modified protocol header to accommodate the Internet Protocol version 6 address family. NTPv4 includes fundamental improvements in the mitigation and discipline algorithms that extend the potential accuracy to the tens of microseconds with modern workstations and fast LANs. It includes a dynamic server discovery scheme, so that in many cases, specific server configuration is not required. It corrects certain errors in the NTPv3 design and implementation and includes an optional extension mechanism. [STANDARDS-TRACK]Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number RegistryThis document defines the procedures that the Internet Assigned Numbers Authority (IANA) uses when handling assignment and other requests related to the Service Name and Transport Protocol Port Number registry. It also discusses the rationale and principles behind these procedures and how they facilitate the long-term sustainability of the registry.This document updates IANA's procedures by obsoleting the previous UDP and TCP port assignment procedures defined in Sections 8 and 9.1 of the IANA Allocation Guidelines, and it updates the IANA service name and port assignment procedures for UDP-Lite, the Datagram Congestion Control Protocol (DCCP), and the Stream Control Transmission Protocol (SCTP). It also updates the DNS SRV specification to clarify what a service name is and how it is registered. This memo documents an Internet Best Current Practice.Multicast DNSAs networked devices become smaller, more portable, and more ubiquitous, the ability to operate with less configured infrastructure is increasingly important. In particular, the ability to look up DNS resource record data types (including, but not limited to, host names) in the absence of a conventional managed DNS server is useful.Multicast DNS (mDNS) provides the ability to perform DNS-like operations on the local link in the absence of any conventional Unicast DNS server. In addition, Multicast DNS designates a portion of the DNS namespace to be free for local use, without the need to pay any annual fee, and without the need to set up delegations or otherwise configure a conventional DNS server to answer for those names.The primary benefits of Multicast DNS names are that (i) they require little or no administration or configuration to set them up, (ii) they work when no infrastructure is present, and (iii) they work during infrastructure failures.Transport Layer Security (TLS) Application-Layer Protocol Negotiation ExtensionThis document describes a Transport Layer Security (TLS) extension for application-layer protocol negotiation within the TLS handshake. For instances in which multiple application protocols are supported on the same TCP or UDP port, this extension allows the application layer to negotiate which protocol will be used within the TLS connection.TCP Fast OpenThis document describes an experimental TCP mechanism called TCP Fast Open (TFO). TFO allows data to be carried in the SYN and SYN-ACK packets and consumed by the receiving end during the initial connection handshake, and saves up to one full round-trip time (RTT) compared to the standard TCP, which requires a three-way handshake (3WHS) to complete before data can be exchanged. However, TFO deviates from the standard TCP semantics, since the data in the SYN could be replayed to an application in some rare circumstances. Applications should not use TFO unless they can tolerate this issue, as detailed in the Applicability section.Differentiated Services (Diffserv) and Real-Time CommunicationThis memo describes the interaction between Differentiated Services (Diffserv) network quality-of-service (QoS) functionality and real- time network communication, including communication based on the Real-time Transport Protocol (RTP). Diffserv is based on network nodes applying different forwarding treatments to packets whose IP headers are marked with different Diffserv Codepoints (DSCPs). WebRTC applications, as well as some conferencing applications, have begun using the Session Description Protocol (SDP) bundle negotiation mechanism to send multiple traffic streams with different QoS requirements using the same network 5-tuple. The results of using multiple DSCPs to obtain different QoS treatments within a single network 5-tuple have transport protocol interactions, particularly with congestion control functionality (e.g., reordering). In addition, DSCP markings may be changed or removed between the traffic source and destination. This memo covers the implications of these Diffserv aspects for real-time network communication, including WebRTC.HTTP Alternative ServicesThis document specifies "Alternative Services" for HTTP, which allow an origin's resources to be authoritatively available at a separate network location, possibly accessed with a different protocol configuration.UDP Usage GuidelinesThe User Datagram Protocol (UDP) provides a minimal message-passing transport that has no inherent congestion control mechanisms. This document provides guidelines on the use of UDP for the designers of applications, tunnels, and other protocols that use UDP. Congestion control guidelines are a primary focus, but the document also provides guidance on other topics, including message sizes, reliability, checksums, middlebox traversal, the use of Explicit Congestion Notification (ECN), Differentiated Services Code Points (DSCPs), and ports.Because congestion control is critical to the stable operation of the Internet, applications and other protocols that choose to use UDP as an Internet transport must employ mechanisms to prevent congestion collapse and to establish some degree of fairness with concurrent traffic. They may also need to implement additional mechanisms, depending on how they use UDP.Some guidance is also applicable to the design of other protocols (e.g., protocols layered directly on IP or via IP-based tunnels), especially when these protocols do not themselves provide congestion control.This document obsoletes RFC 5405 and adds guidelines for multicast UDP usage.Temporary Address Extensions for Stateless Address Autoconfiguration in IPv6This document describes an extension to IPv6 Stateless Address Autoconfiguration that causes hosts to generate temporary addresses with randomized interface identifiers for each prefix advertised with autoconfiguration enabled. Changing addresses over time limits the window of time during which eavesdroppers and other information collectors may trivially perform address-based network-activity correlation when the same address is employed for multiple transactions by the same host. Additionally, it reduces the window of exposure of a host as being accessible via an address that becomes revealed as a result of active communication. This document obsoletes RFC 4941.Extensible Prioritization Scheme for HTTPThis document describes a scheme that allows an HTTP client to communicate its preferences for how the upstream server prioritizes responses to its requests, and also allows a server to hint to a downstream intermediary how its responses should be prioritized when they are forwarded. This document defines the Priority header field for communicating the initial priority in an HTTP version-independent manner, as well as HTTP/2 and HTTP/3 frames for reprioritizing responses. These share a common format structure that is designed to provide future extensibility.An Unreliable Datagram Extension to QUICThis document defines an extension to the QUIC transport protocol to add support for sending and receiving unreliable datagrams over a QUIC connection.UPnP Device Architecture 2.0IBMIntelPhillipsPioneerSamsungSamsungSonySonyQUIC Deployment Experience @GoogleIETF96 QUIC BoF PresentationAn Architecture for Transport ServicesApple Inc.Google Switzerland GmbHKarlstad UniversityUniversity of AberdeenUniversity of Glasgow This document describes an architecture for exposing transport
protocol features to applications for network communication, a
Transport Services system. The Transport Services Application
Programming Interface (API) is based on an asynchronous, event-driven
interaction pattern. This API uses messages for representing data
transfer to applications, and describes how implementations can use
multiple IP addresses, multiple protocols, and multiple paths, and
provide multiple application streams. This document further defines
common terminology and concepts to be used in definitions of a
Transport Service API and a Transport Services implementation.
Work in ProgressThe Transport Layer Security (TLS) Protocol Version 1.3This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.Internet Path Transparency Measurements using RIPE AtlasRIPE 72 MAT PresentationAcknowledgmentsSpecial thanks to Last Call reviewers and .This work was partially supported by the European Commission under Horizon 2020
grant agreement no. 688421 Measurement and Architecture for a Middleboxed
Internet (MAMI) and by the Swiss State Secretariat for Education, Research, and
Innovation under contract no. 15.0268. This support does not imply endorsement.ContributorsThe following people have contributed significant text to or feedback
on this document:Authors' AddressesEricssonmirja.kuehlewind@ericsson.comGoogle Switzerland GmbHGustav-Gull-Platz 1Zurich8004Switzerlandietf@trammell.ch