Internet-Draft | Aggregated_SynOpt | February 2023 |
Nishida | Expires 1 September 2023 | [Page] |
TCP option space is scarce resource as its max 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 1 September 2023.¶
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 max length is limited to 40 bytes. This limitation is a nominal issue especially for SYN segment. This is because although a TCP endpoint can send only one SYN segment to the peer, SYN segments need to contain all options expected to be used for the connection. 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 (10 + 4 + 3 + 2). In addition to them, 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 have at least 4 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] [I-D.allman-tcpx2-hack]. These proposals have adopted one or both of the following two types of approach.¶
o Extending TCP header in SYN segment: This approach tries to accommodate more options in a SYN segment by using payload. (E.g override Data Offset field in TCP header)¶
o Using Multiple SYN or SYN-like segment: This approach tries to use multiple SYN segment or additional segment that can be treated as a SYN segment. (E.g sending another SYN with wrong checksum or from different source port)¶
However, these approach require a certain complexity as it needs to update fundamental design of TCP and have potential risks for middlebox interventions because of it. Instead, we propose a very simple approach that can aggregate multiple TCP options into a single options. As this approach does not require drastic changes in TCP SYN negotiation scheme, the risk for middlebox interventions will be minimized. [I-D.boucadair-tcpm-capability-option] also propose a scheme to aggregate multiple options. However, our approach requires less option space in order to aggregate more options and to save option sapce for other options.¶
One limitations of this approach is that it cannot aggregate all kinds of options. However, we believe it still will be useful especially for newly defined experimental options. One example use case is [I-D.gomez-tcpm-ack-rate-request]. In order to use the feature proposed in the draft, endpoints need to exchange a 4 bytes TCP option during 3 way handshake so that it can confirm the peer is capable of the feature. However, whether an endpoint supports the feature or not is just 1 bit information. Using 4 bytes field to carry 1 bit information looks redundant. On the other hand, Aggregated Option can accommodate up to 24 TCP options like this example 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 this kind of cases, an endpoint can confirm that the peer supports the feature it wants to use by using 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 beleive 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 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 use 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 bytes 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 is split into 4 groups, 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.¶
GID field in Aggregated Block indicate the group ID that option bits in the block belongs to. Aggregated Blocks are appeared 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 is 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 maximum number of options that can be used with Aggregated Option will be limited to 24. We believe this is sufficient number for the time being based on the current usage of option code points.¶
Aggregated Option MUST be only used in SYN segments. When an endpoint received SYN segments with Aggregated Option, it checks Aggregated Blocks in the option. Otherwise, he 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 SYN ACK to the initiator, it SHOULD send back its response with Aggregated Option. But, it MAY uses original formats of the options for the response as long as there is enough option space.¶
As described in Section 3, Aggregated Option has 24 Option bits space and each bit represents a single option ID. 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 a 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 24 records which are mapped to the TCP Option Kind Number Records in [TCPParameters] The 24 records are divided into 4 groups so that each group contains 6 records.¶
The contents in this documents are the individual contributions from the authors and do not relate to the authors' positions at their affilications.¶