@@ -345,9 +345,9 @@ Payload Length:
345
345
Packet Number :
346
346
347
347
: The packet number field is 1, 2, or 4 octets long. The packet number has
348
- confidentiality protection separate from packet protection, as described in
349
- Section 5.6 of {{QUIC-TLS}}. The length of the packet number field is encoded
350
- in the plaintext packet number. See {{packet-numbers}} for details.
348
+ confidentiality protection separate from packet protection, as described
349
+ in Section 5.6 of {{QUIC-TLS}}. The length of the packet number field is
350
+ encoded in the plaintext packet number. See {{packet-numbers}} for details.
351
351
352
352
Payload :
353
353
@@ -1140,6 +1140,7 @@ language from Section 3 of {{!I-D.ietf-tls-tls13}}.
1140
1140
initial_max_data(1),
1141
1141
initial_max_bidi_streams(2),
1142
1142
idle_timeout(3),
1143
+ preferred_address(4),
1143
1144
max_packet_size(5),
1144
1145
stateless_reset_token(6),
1145
1146
ack_delay_exponent(7),
@@ -1163,6 +1164,14 @@ language from Section 3 of {{!I-D.ietf-tls-tls13}}.
1163
1164
};
1164
1165
TransportParameter parameters<22..2^16-1>;
1165
1166
} TransportParameters;
1167
+
1168
+ struct {
1169
+ enum { IPv4(4), IPv6(6), (15)} ipVersion;
1170
+ opaque ipAddress<4..2^8-1>;
1171
+ uint16 port;
1172
+ opaque connectionId<0..18>;
1173
+ opaque statelessResetToken[16];
1174
+ } PreferredAddress;
1166
1175
~~~
1167
1176
{: # figure-transport-parameters title="Definition of TransportParameters"}
1168
1177
@@ -1262,9 +1271,14 @@ stateless_reset_token (0x0006):
1262
1271
: The Stateless Reset Token is used in verifying a stateless reset, see
1263
1272
{{stateless-reset}}. This parameter is a sequence of 16 octets.
1264
1273
1265
- A client MUST NOT include a stateless reset token. A server MUST treat receipt
1266
- of a stateless_reset_token transport parameter as a connection error of type
1267
- TRANSPORT_PARAMETER_ERROR.
1274
+ preferred_address (0x0004) :
1275
+
1276
+ : The server's Preferred Address is used to effect a change in server address at
1277
+ the end of the handshake, as described in {{preferred-address}}.
1278
+
1279
+ A client MUST NOT include a stateless reset token or a preferred address. A
1280
+ server MUST treat receipt of either transport parameter as a connection error of
1281
+ type TRANSPORT_PARAMETER_ERROR.
1268
1282
1269
1283
1270
1284
# ## Values of Transport Parameters for 0-RTT {#zerortt-parameters}
@@ -1295,6 +1309,10 @@ Omitting or setting a zero value for certain transport parameters can result in
1295
1309
SHOULD be set to non-zero values for 0-RTT : initial_max_bidi_streams,
1296
1310
initial_max_uni_streams, initial_max_data, initial_max_stream_data.
1297
1311
1312
+ The value of the server's previous preferred_address MUST NOT be used when
1313
+ establishing a new connection; rather, the client should wait to observe the
1314
+ server's new preferred_address value in the handshake.
1315
+
1298
1316
A server MUST reject 0-RTT data or even abort a handshake if the implied values
1299
1317
for transport parameters cannot be supported.
1300
1318
@@ -1382,7 +1400,7 @@ a different codepoint.
1382
1400
1383
1401
A server can process an initial cryptographic handshake messages from a client
1384
1402
without committing any state. This allows a server to perform address validation
1385
- ({{address-validation}}, or to defer connection establishment costs.
1403
+ ({{address-validation}}) , or to defer connection establishment costs.
1386
1404
1387
1405
A server that generates a response to an initial packet without retaining
1388
1406
connection state MUST use the Retry packet ({{packet-retry}}). This packet
@@ -1485,9 +1503,10 @@ therefore unlikely to be successful.
1485
1503
This token can be provided to the cryptographic handshake immediately after
1486
1504
establishing a connection. QUIC might also generate an updated token if
1487
1505
significant time passes or the client address changes for any reason (see
1488
- {{migration}}). The cryptographic handshake is responsible for providing the
1489
- client with the token. In TLS the token is included in the ticket that is used
1490
- for resumption and 0-RTT, which is carried in a NewSessionTicket message.
1506
+ {{migration}}). The cryptographic handshake is responsible for
1507
+ providing the client with the token. In TLS the token is included in the ticket
1508
+ that is used for resumption and 0-RTT, which is carried in a NewSessionTicket
1509
+ message.
1491
1510
1492
1511
1493
1512
# ## Address Validation Token Integrity {#token-integrity}
@@ -1520,12 +1539,12 @@ and a specific peer address, where an address is the two-tuple of IP address and
1520
1539
port. Path validation tests that packets can be both sent to and received from
1521
1540
a peer.
1522
1541
1523
- Path validation is used during connection migration (see {{migration}}) by the
1524
- migrating endpoint to verify reachability of a peer from a new local address.
1525
- Path validation is also used by the peer to verify that the migrating endpoint
1526
- is able to receive packets sent to its new address. That is, that the
1527
- packets received from the migrating endpoint do not carry a spoofed source
1528
- address.
1542
+ Path validation is used during connection migration (see {{migration}} and
1543
+ {{preferred-address}}) by the migrating endpoint to verify reachability of a
1544
+ peer from a new local address. Path validation is also used by the peer to
1545
+ verify that the migrating endpoint is able to receive packets sent to the its
1546
+ new address. That is, that the packets received from the migrating endpoint do
1547
+ not carry a spoofed source address.
1529
1548
1530
1549
Path validation can be used at any time by either endpoint. For instance, an
1531
1550
endpoint might check that a peer is still in possession of its address after a
@@ -1626,12 +1645,12 @@ new address.
1626
1645
An endpoint MUST NOT initiate connection migration before the handshake is
1627
1646
finished and the endpoint has 1-RTT keys.
1628
1647
1629
- This document limits migration of connections to new client addresses.
1630
- Clients are responsible for initiating all migrations. Servers do not send
1631
- non-probing packets (see {{probing}}) toward a client address until it sees a
1632
- non-probing packet from that address. If a client receives packets from an
1633
- unknown server address, the client MAY discard these packets. Migrating a
1634
- connection to a new server address is left for future work .
1648
+ This document limits migration of connections to new client addresses, except as
1649
+ described in {{preferred-address}}. Clients are responsible for initiating all
1650
+ migrations. Servers do not send non-probing packets (see {{probing}}) toward a
1651
+ client address until it sees a non-probing packet from that address. If a
1652
+ client receives packets from an unknown server address, the client MAY discard
1653
+ these packets .
1635
1654
1636
1655
1637
1656
# ## Probing a New Path {#probing}
@@ -1835,6 +1854,78 @@ need to move to a new connection ID if the address of a peer changes without
1835
1854
also changing the connection ID.
1836
1855
1837
1856
1857
+ # # Server's Preferred Address {#preferred-address}
1858
+
1859
+ QUIC allows servers to accept connections on one IP address and attempt to
1860
+ transfer these connections to a more preferred address shortly after the
1861
+ handshake. This is particularly useful when clients initially connect to an
1862
+ address shared by multiple servers but would prefer to use a unicast address to
1863
+ ensure connection stability. This section describes the protocol for migrating a
1864
+ connection to a preferred server address.
1865
+
1866
+ Migrating a connection to a new server address mid-connection is left for future
1867
+ work. If a client receives packets from a new server address not indicated by
1868
+ the preferred_address transport parameter, the client SHOULD discard these
1869
+ packets.
1870
+
1871
+ # ## Communicating A Preferred Address
1872
+
1873
+ A server conveys a preferred address by including the preferred_address
1874
+ transport parameter in the TLS handshake.
1875
+
1876
+ Once the handshake is finished, the client SHOULD initiate path validation (see
1877
+ {{migrate-validate}}) of the server's preferred address using the connection ID
1878
+ provided in the preferred_address transport parameter.
1879
+
1880
+ If path validation succeeds, the client SHOULD immediately begin sending all
1881
+ future packets to the new server address using the new connection ID and
1882
+ discontinue use of the old server address. If path validation fails, the client
1883
+ MUST continue sending all future packets to the server's original IP address.
1884
+
1885
+
1886
+ # ## Responding to Connection Migration
1887
+
1888
+ A server might receive a packet addressed to its preferred IP address at any
1889
+ time after the handshake is completed. If this packet contains a PATH_CHALLENGE
1890
+ frame, the server sends a PATH_RESPONSE frame as per {{migrate-validate}}, but
1891
+ the server MUST continue sending all other packets from its original IP address.
1892
+
1893
+ The server SHOULD also initiate path validation of the client using its
1894
+ preferred address and the address from which it received the client probe. This
1895
+ helps to guard against spurious migration initiated by an attacker.
1896
+
1897
+ Once the server has completed its path validation and has received a non-probing
1898
+ packet with a new largest packet number on its preferred address, the server
1899
+ begins sending to the client exclusively from its preferred IP address. It
1900
+ SHOULD drop packets for this connection received on the old IP address, but MAY
1901
+ continue to process delayed packets.
1902
+
1903
+
1904
+ # ## Interaction of Client Migration and Preferred Address
1905
+
1906
+ A client might need to perform a connection migration before it has migrated to
1907
+ the server's preferred address. In this case, the client SHOULD perform path
1908
+ validation to both the original and preferred server address from the client's
1909
+ new address concurrently.
1910
+
1911
+ If path validation of the server's preferred address succeeds, the client MUST
1912
+ abandon validation of the original address and migrate to using the server's
1913
+ preferred address. If path validation of the server's preferred address fails,
1914
+ but validation of the server's original address succeeds, the client MAY migrate
1915
+ to using the original address from the client's new address.
1916
+
1917
+ If the connection to the server's preferred address is not from the same client
1918
+ address, the server MUST protect against potential attacks as described in
1919
+ {{address-spoofing}} and {{on-path-spoofing}}. In addition to intentional
1920
+ simultaneous migration, this might also occur because the client's access
1921
+ network used a different NAT binding for the server's preferred address.
1922
+
1923
+ Servers SHOULD initiate path validation to the client's new address upon
1924
+ receiving a probe packet from a different address. Servers MUST NOT send more
1925
+ than a minimum congestion window's worth of non-probing packets to the new
1926
+ address before path validation is complete.
1927
+
1928
+
1838
1929
# # Connection Termination {#termination}
1839
1930
1840
1931
Connections should remain open until they become idle for a pre-negotiated
@@ -2095,7 +2186,7 @@ describes the format and semantics of the core QUIC frame types.
2095
2186
2096
2187
# # Variable-Length Integer Encoding {#integer-encoding}
2097
2188
2098
- QUIC frames use a common variable-length encoding for all non-negative integer
2189
+ QUIC frames commonly use a variable-length encoding for non-negative integer
2099
2190
values. This encoding ensures that smaller integer values need fewer octets to
2100
2191
encode.
2101
2192
@@ -3108,12 +3199,11 @@ actually lost.
3108
3199
# ## Special Considerations for Packetization Layer PMTU Discovery
3109
3200
3110
3201
3111
- The PADDING frame provides a useful option for PMTU probe packets that does not
3112
- exist in other transports. PADDING frames generate acknowledgements, but their
3113
- content need not be delivered reliably. PADDING frames may delay the delivery of
3114
- application data, as they consume the congestion window. However, by definition
3115
- their likely loss in a probe packet does not require delay-inducing
3116
- retransmission of application data.
3202
+ The PADDING frame provides a useful option for PMTU probe packets. PADDING
3203
+ frames generate acknowledgements, but they need not be delivered reliably. As a
3204
+ result, the loss of PADDING frames in probe packets does not require
3205
+ delay-inducing retransmission. However, PADDING frames do consume congestion
3206
+ window, which may delay the transmission of subsequent application data.
3117
3207
3118
3208
When implementing the algorithm in Section 7.2 of {{!PLPMTUD}}, the initial
3119
3209
value of search_low SHOULD be consistent with the IPv6 minimum packet size.
@@ -4173,6 +4263,10 @@ thanks to all.
4173
4263
4174
4264
Issue and pull request numbers are listed with a leading octothorp.
4175
4265
4266
+ # # Since draft-ietf-quic-transport-11
4267
+
4268
+ - Enable server to transition connections to a preferred address (#560,#1251).
4269
+
4176
4270
# # Since draft-ietf-quic-transport-10
4177
4271
4178
4272
- Swap payload length and packed number fields in long header (#1294)
0 commit comments