Internet-Draft | Aggregated_SynOpt | July 2023 |
Nishida | Expires 6 January 2024 | [Page] |
TCP option space is scarce resource as its maximum length is limited to 40 bytes. This limitation becomes more significant in SYN segments as all options used in a connection should be exchanged during SYN negotiations. This document proposes a new SYN option negotiation scheme that can aggregate multiple TCP options in SYN segments into a single option so that more options can be negotiate during 3-way handshake. With its simple design, the approach does not require fundamental changes in TCP.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 6 January 2024.¶
Copyright (c) 2023 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 (https://trustee.ietf.org/license-info) 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.¶
TCP option space is scarce resource as its maximum length is limited to 40 bytes because the length of the Data Offset field in the TCP header is 4 bits [RFC9293].¶
This limitation is a critical issue especially for SYN segments. Because SYN segments need to contain all options expected to be used for the connection, although a TCP endpoint can send only one SYN segment to its peer in a connection. The only exception in the current standards is User Timeout Option [RFC5482]. However, this is because this option provides only advisory information and does not need to be exchanged reliably.¶
As a result, the current SYN option space tends to be congested. Many TCP connections use MSS [RFC9293], Timestamp and Window Scale [RFC7323], SACK Permitted options [RFC2018] which already consume 19 bytes (4 + 10 + 3 + 2). In addition to these options, if a connection wants to use Multipath TCP [RFC8684], it requires additional 4-12 bytes for MP_CAPABLE or 12-16 bytes for MP_JOIN option. Similarly, TCP Fast Open [RFC7413] and TCP AO [RFC5925] require additional 6-18 bytes and 16 bytes respectively. Moreover, Experimental Option Format defined in [RFC6994] requires 16 bits or 32 bits ExID, which means the length of any experimental options will be 4 bytes or 6 bytes.¶
If an endpoint is willing to add some of extra options in addition to commonly used options, 40 bytes space may not be sufficient. If a SYN segment cannot accommodate all options that an endpoint wants to use, the endpoint needs to give up using some of them. This problem affects the extensibility of TCP.¶
There have been various proposals in order to extend option space in SYN Segments such as [I-D.eddy-tcp-loo], [I-D.yourtchenko-tcp-loic], [I-D.touch-tcpm-tcp-syn-ext-opt], [I-D.briscoe-tcpm-inner-space] and [I-D.allman-tcpx2-hack]. These proposals have adopted one or both of the following two types of approach.¶
However, these kinds of approach induce some complexity as it needs to update fundamental TCP design and have potential risks for middlebox interventions because of it. Instead, we propose a simple alternate approach that can aggregate multiple TCP options into a single options. As this approach does not require drastic changes to TCP SYN negotiation scheme, the risk for middlebox interventions will be minimized. [I-D.boucadair-tcpm-capability-option] also proposes a scheme to aggregate multiple options as many of these options are basically about negotiating support with the peer before actual use of the option. However, our approach requires less option space as it can aggregate and condense some TCP options to create more option space for others. Note that [I-D.boucadair-tcpm-capability-option] specifically target controlled domains to nullify the implications of the presence of middleboxes.¶
The proposed approach in the draft cannot aggregate all kinds of options. However, we believe it still will be useful especially for newly defined experimental options as it requires at least 4 bytes space in the option field. Also, the proposed approach can be combined with EDO [I-D.draft-ietf-tcpm-tcp-edo] extension or utilize 3rd segments and 4th segments like the feature negotiation scheme for MPTCP if needed.¶
One example use case for the proposed approach is [I-D.gomez-tcpm-ack-rate-request]. In order to use the feature proposed in the document, endpoints need to exchange a 4-byte TCP option during 3-way handshake so that they can check if the peer is capable of the feature. However, whether an endpoint supports the feature or not is just 1-bit information. Using 4-byte field to carry 1-bit information looks redundant. On the other hand, Aggregated Option can accommodate up to 18 new TCP options + 3 existing options like into a single TCP option.¶
Also, even if more than 1-bit information needs to be carried in a TCP option for a certain feature, it is still possible to utilize aggregated options in some cases. In such cases, an endpoint can confirm that the peer supports the feature it wants to use by using the aggregated option. After that, it can continue to negotiate required parameters through 3rd segment and 4th segment. This type of approach is already used in MPTCP [RFC8684]. Hence, we believe this scheme can be applicable to many other TCP extensions.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This document uses the following terms:¶
The aggregated option can be used to indicate that an endpoint wants to enable the specified features during SYN segment exchanges. This option uses one bit in the option field for one TCP option. The receiver of the option also uses this option to indicate that it agrees to use the requested features or not. The format of aggregated option format is shown in Figure 1. The option contains 1-byte field named called "Aggregated Block". Aggregated Option can accommodate 1-3 Aggregated Blocks.¶
Figure 2 shows the format of Aggregated block. Aggregated block has 1 byte length which consists of 2 bits "Group ID" (GID) field and 6 bits "Option Bits" field. The options supported by Aggregated Option are split into 4 groups. The Group ID field is used to identify the group identifier of the option bits in the Aggregated Option and each single bit in Option Bits field represent a option in the group.¶
If all options that an endpoint wants to aggregate belong to the same Group ID, the aggregated option needs to contain only one Aggregated Block. Otherwise, it needs to contain multiple blocks as needed.¶
GID field in Aggregated Block indicate the group ID that option bits in the block belongs to. Aggregated Blocks appear in SYN and SYN ACK segments, however, different mappings between GID value in the option and Group ID are used for these two segments. This is because some implementations may copy back unknown options in SYN/ACK segments. These mappings are used not to be confused by such cases. Figure 3 shows the mapping between GID value in the option and Group ID. For example, GID value 1 in SYN represents group 2, while GID value 1 in ACK segment for SYN ACK represents group 1.¶
The allocation of the bit in Option Bits field in each group will be managed by the registry provided by IANA. Since an aggregated block has 6-bits field to indicate options, one group can have 6 options at most. As a result, the possible maximum number of options with this format will be 4 * 6 = 24. We believe this is sufficient number for the time being based on the current usage of option code points.¶
The Aggregated Option MUST be only used in SYN segments. When an endpoint receives SYN segments with Aggregated Option, it checks Aggregated Blocks in the option. Otherwise, the segment MUST be silently discarded. If it contains Aggregated Blocks, the options specified in the blocks MUST be processed as well as options in original formats. When a responder sends back a SYN ACK to the initiator, it SHOULD send back its response with Aggregated Option. But, it MAY uses original format of the options for the response as long as there is enough option space.¶
In this proposal, group 1 is used to aggregate commonly used options as predefined aggregated options. Hence, when new aggregated options are registered, they will belong to the rest of groups. Figure 4 shows aggregated option format when group 1 is specified.¶
In order to specify group id, the GID field of this format is 0 in SYN and 1 in SYN/ACK. The first 4 bits of 6 bytes Option Bits are used for Window Scale Option. As the value of the shift.cnt in Window Scale Option is 0-14. The shift.cnt values can be stored in the 4 bits as the same format in the original option. When this value is 15 (all 4 bits are 1), it specifies the window scale option is not aggregated in the segment.¶
The 5th bit in Option Bits field is used for SACK options. If the bit is set, it indicate the sending endpoint supports Selective Acknowledgement. If the bit is not set, it specifies SACK option is not aggregated in the segment.¶
The 6th bit in Option Bits field is used for MSS options. If the bit is set, it indicates that the sending endpoint uses 1460 as send MSS which is the most common value used for MSS option. If the bit is not set, it specifies MSS option is not aggregated in the segment.¶
The allocation of the Option Bits in Aggregated Option is maintained by IANA. If a new option can be aggregatable, one can request Option Bit in addition to the current procedure, requesting TCP Option Kind Number in [TCPParameters] . If an option already has assigned TCP Option Kind Number, one can request Option bit only which will represent the assigned option kind.¶
Aggregated Option is designed to exchange 1-bit information for each TCP extension that indicate the willingness to use the feature. Hence, if a TCP extension wants to carry more information in the TCP option for the extension, Aggregated Option is basically not applicable for it.¶
However, it is still possible for these TCP extensions to utilize Aggregated Option in some situations. It is based on the fact that not all TCP extensions will be used right after SYN exchanges. For example, SACK options are only used when there are packet losses. If a TCP extension is not used right after SYN exchange, it is possible to exchange additional parameters by using utilizing 3rd segments and 4th segments. This approach is already used in MPTCP [RFC8684]. As we have a solid precedence, we believe it will not be difficult to implement similar negotiation schemes for other features. However, discussing negotiation schemes with 3rd and 4th segments is out of scope of the document.¶
We believe Aggregated Option maintains the same level of security as other TCP options does.¶
This document requests new TCP option codepoint. In addition, this document requires new registry for the option. They are described in the following subsections.¶
This document requests to add new option: Aggregated Option to the TCP option space registry which points to this document as follows:¶
This document also requests to create a "Aggregated Option Identifiers" registry in IANA registries. The registry maintains records which are mapped to the TCP Option Kind Number Records in [TCPParameters] These records are divided into 4 groups so that each group contains 6 records.¶
The authors would like to appreciate Mohamed Boucadair for his insightful comments on this document.¶
The contents in this document are the individual contributions from the authors and do not relate to the authors' positions at their affiliations.¶