draft-ietf-tcpm-rfc793bis-15.txt   draft-ietf-tcpm-rfc793bis-16.txt 
Internet Engineering Task Force W. Eddy, Ed. Internet Engineering Task Force W. Eddy, Ed.
Internet-Draft MTI Systems Internet-Draft MTI Systems
Obsoletes: 793, 879, 2873, 6093, 6429, December 20, 2019 Obsoletes: 793, 879, 2873, 6093, 6429, March 24, 2020
6528, 6691 (if approved) 6528, 6691 (if approved)
Updates: 5961, 1122 (if approved) Updates: 5961, 1122 (if approved)
Intended status: Standards Track Intended status: Standards Track
Expires: June 22, 2020 Expires: September 25, 2020
Transmission Control Protocol Specification Transmission Control Protocol Specification
draft-ietf-tcpm-rfc793bis-15 draft-ietf-tcpm-rfc793bis-16
Abstract Abstract
This document specifies the Internet's Transmission Control Protocol This document specifies the Internet's Transmission Control Protocol
(TCP). TCP is an important transport layer protocol in the Internet (TCP). TCP is an important transport layer protocol in the Internet
stack, and has continuously evolved over decades of use and growth of stack, and has continuously evolved over decades of use and growth of
the Internet. Over this time, a number of changes have been made to the Internet. Over this time, a number of changes have been made to
TCP as it was specified in RFC 793, though these have only been TCP as it was specified in RFC 793, though these have only been
documented in a piecemeal fashion. This document collects and brings documented in a piecemeal fashion. This document collects and brings
those changes together with the protocol specification from RFC 793. those changes together with the protocol specification from RFC 793.
skipping to change at page 2, line 10 skipping to change at page 2, line 10
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on June 22, 2020. This Internet-Draft will expire on September 25, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 50 skipping to change at page 2, line 50
1. Purpose and Scope . . . . . . . . . . . . . . . . . . . . . . 3 1. Purpose and Scope . . . . . . . . . . . . . . . . . . . . . . 3
2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. Key TCP Concepts . . . . . . . . . . . . . . . . . . . . 5 2.1. Key TCP Concepts . . . . . . . . . . . . . . . . . . . . 5
3. Functional Specification . . . . . . . . . . . . . . . . . . 6 3. Functional Specification . . . . . . . . . . . . . . . . . . 6
3.1. Header Format . . . . . . . . . . . . . . . . . . . . . . 6 3.1. Header Format . . . . . . . . . . . . . . . . . . . . . . 6
3.2. Terminology Overview . . . . . . . . . . . . . . . . . . 11 3.2. Terminology Overview . . . . . . . . . . . . . . . . . . 11
3.2.1. Key Connection State Variables . . . . . . . . . . . 11 3.2.1. Key Connection State Variables . . . . . . . . . . . 11
3.2.2. State Machine Overview . . . . . . . . . . . . . . . 13 3.2.2. State Machine Overview . . . . . . . . . . . . . . . 13
3.3. Sequence Numbers . . . . . . . . . . . . . . . . . . . . 16 3.3. Sequence Numbers . . . . . . . . . . . . . . . . . . . . 16
3.4. Establishing a connection . . . . . . . . . . . . . . . . 22 3.4. Establishing a connection . . . . . . . . . . . . . . . . 23
3.5. Closing a Connection . . . . . . . . . . . . . . . . . . 29 3.5. Closing a Connection . . . . . . . . . . . . . . . . . . 29
3.5.1. Half-Closed Connections . . . . . . . . . . . . . . . 31 3.5.1. Half-Closed Connections . . . . . . . . . . . . . . . 32
3.6. Segmentation . . . . . . . . . . . . . . . . . . . . . . 32 3.6. Segmentation . . . . . . . . . . . . . . . . . . . . . . 32
3.6.1. Maximum Segment Size Option . . . . . . . . . . . . . 33 3.6.1. Maximum Segment Size Option . . . . . . . . . . . . . 34
3.6.2. Path MTU Discovery . . . . . . . . . . . . . . . . . 35 3.6.2. Path MTU Discovery . . . . . . . . . . . . . . . . . 35
3.6.3. Interfaces with Variable MTU Values . . . . . . . . . 35 3.6.3. Interfaces with Variable MTU Values . . . . . . . . . 36
3.6.4. Nagle Algorithm . . . . . . . . . . . . . . . . . . . 36 3.6.4. Nagle Algorithm . . . . . . . . . . . . . . . . . . . 36
3.6.5. IPv6 Jumbograms . . . . . . . . . . . . . . . . . . . 36 3.6.5. IPv6 Jumbograms . . . . . . . . . . . . . . . . . . . 37
3.7. Data Communication . . . . . . . . . . . . . . . . . . . 36 3.7. Data Communication . . . . . . . . . . . . . . . . . . . 37
3.7.1. Retransmission Timeout . . . . . . . . . . . . . . . 37 3.7.1. Retransmission Timeout . . . . . . . . . . . . . . . 38
3.7.2. TCP Congestion Control . . . . . . . . . . . . . . . 37 3.7.2. TCP Congestion Control . . . . . . . . . . . . . . . 38
3.7.3. TCP Connection Failures . . . . . . . . . . . . . . . 38 3.7.3. TCP Connection Failures . . . . . . . . . . . . . . . 38
3.7.4. TCP Keep-Alives . . . . . . . . . . . . . . . . . . . 39 3.7.4. TCP Keep-Alives . . . . . . . . . . . . . . . . . . . 39
3.7.5. The Communication of Urgent Information . . . . . . . 39 3.7.5. The Communication of Urgent Information . . . . . . . 40
3.7.6. Managing the Window . . . . . . . . . . . . . . . . . 40 3.7.6. Managing the Window . . . . . . . . . . . . . . . . . 41
3.8. Interfaces . . . . . . . . . . . . . . . . . . . . . . . 45 3.8. Interfaces . . . . . . . . . . . . . . . . . . . . . . . 46
3.8.1. User/TCP Interface . . . . . . . . . . . . . . . . . 45 3.8.1. User/TCP Interface . . . . . . . . . . . . . . . . . 46
3.8.2. TCP/Lower-Level Interface . . . . . . . . . . . . . . 54 3.8.2. TCP/Lower-Level Interface . . . . . . . . . . . . . . 55
3.9. Event Processing . . . . . . . . . . . . . . . . . . . . 57 3.9. Event Processing . . . . . . . . . . . . . . . . . . . . 57
3.10. Glossary . . . . . . . . . . . . . . . . . . . . . . . . 82 3.10. Glossary . . . . . . . . . . . . . . . . . . . . . . . . 82
4. Changes from RFC 793 . . . . . . . . . . . . . . . . . . . . 87 4. Changes from RFC 793 . . . . . . . . . . . . . . . . . . . . 87
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 92 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 92
6. Security and Privacy Considerations . . . . . . . . . . . . . 92 6. Security and Privacy Considerations . . . . . . . . . . . . . 92
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 93 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 93
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 94 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 94
8.1. Normative References . . . . . . . . . . . . . . . . . . 94 8.1. Normative References . . . . . . . . . . . . . . . . . . 94
8.2. Informative References . . . . . . . . . . . . . . . . . 95 8.2. Informative References . . . . . . . . . . . . . . . . . 95
Appendix A. Other Implementation Notes . . . . . . . . . . . . . 99 Appendix A. Other Implementation Notes . . . . . . . . . . . . . 99
A.1. IP Security Compartment and Precedence . . . . . . . . . 99 A.1. IP Security Compartment and Precedence . . . . . . . . . 100
A.1.1. Precedence . . . . . . . . . . . . . . . . . . . . . 100 A.1.1. Precedence . . . . . . . . . . . . . . . . . . . . . 100
A.1.2. MLS Systems . . . . . . . . . . . . . . . . . . . . . 100 A.1.2. MLS Systems . . . . . . . . . . . . . . . . . . . . . 101
A.2. Sequence Number Validation . . . . . . . . . . . . . . . 101 A.2. Sequence Number Validation . . . . . . . . . . . . . . . 101
A.3. Nagle Modification . . . . . . . . . . . . . . . . . . . 101 A.3. Nagle Modification . . . . . . . . . . . . . . . . . . . 101
A.4. Low Water Mark Settings . . . . . . . . . . . . . . . . . 101 A.4. Low Water Mark Settings . . . . . . . . . . . . . . . . . 102
Appendix B. TCP Requirement Summary . . . . . . . . . . . . . . 102 Appendix B. TCP Requirement Summary . . . . . . . . . . . . . . 102
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 106 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 106
1. Purpose and Scope 1. Purpose and Scope
In 1981, RFC 793 [12] was released, documenting the Transmission In 1981, RFC 793 [12] was released, documenting the Transmission
Control Protocol (TCP), and replacing earlier specifications for TCP Control Protocol (TCP), and replacing earlier specifications for TCP
that had been published in the past. that had been published in the past.
Since then, TCP has been implemented many times, and has been used as Since then, TCP has been implemented many times, and has been used as
a transport protocol for numerous applications on the Internet. a transport protocol for numerous applications on the Internet.
For several decades, RFC 793 plus a number of other documents have For several decades, RFC 793 plus a number of other documents have
combined to serve as the specification for TCP [39]. Over time, a combined to serve as the specification for TCP [41]. Over time, a
number of errata have been identified on RFC 793, as well as number of errata have been identified on RFC 793, as well as
deficiencies in security, performance, and other aspects. The number deficiencies in security, performance, and other aspects. The number
of enhancements has grown over time across many separate documents. of enhancements has grown over time across many separate documents.
These were never accumulated together into an update to the base These were never accumulated together into an update to the base
specification. specification.
The purpose of this document is to bring together all of the IETF The purpose of this document is to bring together all of the IETF
Standards Track changes that have been made to the basic TCP Standards Track changes that have been made to the basic TCP
functional specification and unify them into an update of the RFC 793 functional specification and unify them into an update of the RFC 793
protocol specification. Some companion documents are referenced for protocol specification. Some companion documents are referenced for
skipping to change at page 5, line 5 skipping to change at page 5, line 5
This document describes the basic functionality expected in modern This document describes the basic functionality expected in modern
implementations of TCP, and replaces the protocol specification in implementations of TCP, and replaces the protocol specification in
RFC 793. It does not replicate or attempt to update the introduction RFC 793. It does not replicate or attempt to update the introduction
and philosophy content in RFC 793 (sections 1 and 2 of that and philosophy content in RFC 793 (sections 1 and 2 of that
document). Other documents are referenced to provide explanation of document). Other documents are referenced to provide explanation of
the theory of operation, rationale, and detailed discussion of design the theory of operation, rationale, and detailed discussion of design
decisions. This document only focuses on the normative behavior of decisions. This document only focuses on the normative behavior of
the protocol. the protocol.
The "TCP Roadmap" [39] provides a more extensive guide to the RFCs The "TCP Roadmap" [41] provides a more extensive guide to the RFCs
that define TCP and describe various important algorithms. The TCP that define TCP and describe various important algorithms. The TCP
Roadmap contains sections on strongly encouraged enhancements that Roadmap contains sections on strongly encouraged enhancements that
improve performance and other aspects of TCP beyond the basic improve performance and other aspects of TCP beyond the basic
operation specified in this document. As one example, implementing operation specified in this document. As one example, implementing
congestion control (e.g. [27]) is a TCP requirement, but is a complex congestion control (e.g. [28]) is a TCP requirement, but is a complex
topic on its own, and not described in detail in this document, as topic on its own, and not described in detail in this document, as
there are many options and possibilities that do not impact basic there are many options and possibilities that do not impact basic
interoperability. Similarly, most common TCP implementations today interoperability. Similarly, most common TCP implementations today
include the high-performance extensions in [37], but these are not include the high-performance extensions in [39], but these are not
strictly required or discussed in this document. strictly required or discussed in this document.
A list of changes from RFC 793 is contained in Section 4. A list of changes from RFC 793 is contained in Section 4.
Each use of RFC 2119 keywords in the document is individually labeled Each use of RFC 2119 keywords in the document is individually labeled
and referenced in Appendix B that summarizes implementation and referenced in Appendix B that summarizes implementation
requirements. Sentences using "MUST" are labeled as "MUST-X" with X requirements. Sentences using "MUST" are labeled as "MUST-X" with X
being a numeric identifier enabling the requirement to be located being a numeric identifier enabling the requirement to be located
easily when referenced from Appendix B. Similarly, sentences using easily when referenced from Appendix B. Similarly, sentences using
"SHOULD" are labeled with "SHLD-X", "MAY" with "MAY-X", and "SHOULD" are labeled with "SHLD-X", "MAY" with "MAY-X", and
skipping to change at page 6, line 9 skipping to change at page 6, line 9
liveness detection capability. liveness detection capability.
Data flow is supported bidirectionally over TCP connections, though Data flow is supported bidirectionally over TCP connections, though
applications are free to send data only unidirectionally, if they so applications are free to send data only unidirectionally, if they so
choose. choose.
TCP uses port numbers to identify application services and to TCP uses port numbers to identify application services and to
multiplex multiple flows between hosts. multiplex multiple flows between hosts.
A more detailed description of TCP's features compared to other A more detailed description of TCP's features compared to other
transport protocols can be found in Section 3.1 of [42]. Further transport protocols can be found in Section 3.1 of [44]. Further
description of the motivations for developing TCP and its role in the description of the motivations for developing TCP and its role in the
Internet stack can be found in Section 2 of [12] and earlier versions Internet stack can be found in Section 2 of [12] and earlier versions
of the TCP specification. of the TCP specification.
3. Functional Specification 3. Functional Specification
3.1. Header Format 3.1. Header Format
TCP segments are sent as internet datagrams. The Internet Protocol TCP segments are sent as internet datagrams. The Internet Protocol
(IP) header carries several information fields, including the source (IP) header carries several information fields, including the source
skipping to change at page 7, line 46 skipping to change at page 7, line 46
ECE: ECN-Echo (see [8]) ECE: ECN-Echo (see [8])
URG: Urgent Pointer field significant URG: Urgent Pointer field significant
ACK: Acknowledgment field significant ACK: Acknowledgment field significant
PSH: Push Function (see the Send Call description in PSH: Push Function (see the Send Call description in
Section 3.8.1) Section 3.8.1)
RST: Reset the connection RST: Reset the connection
SYN: Synchronize sequence numbers SYN: Synchronize sequence numbers
FIN: No more data from sender FIN: No more data from sender
The control bits are also know as "flags". Assignment is managed The control bits are also know as "flags". Assignment is managed
by IANA from the "TCP Header Flags" registry [46]. by IANA from the "TCP Header Flags" registry [48].
Window: 16 bits Window: 16 bits
The number of data octets beginning with the one indicated in the The number of data octets beginning with the one indicated in the
acknowledgment field that the sender of this segment is willing to acknowledgment field that the sender of this segment is willing to
accept. accept.
The window size MUST be treated as an unsigned number, or else The window size MUST be treated as an unsigned number, or else
large window sizes will appear like negative windows and TCP will large window sizes will appear like negative windows and TCP will
now work (MUST-1). It is RECOMMENDED that implementations will now work (MUST-1). It is RECOMMENDED that implementations will
skipping to change at page 9, line 47 skipping to change at page 9, line 47
Case 2: An octet of option-kind, an octet of option-length, and Case 2: An octet of option-kind, an octet of option-length, and
the actual option-data octets. the actual option-data octets.
The option-length counts the two octets of option-kind and option- The option-length counts the two octets of option-kind and option-
length as well as the option-data octets. length as well as the option-data octets.
Note that the list of options may be shorter than the data offset Note that the list of options may be shorter than the data offset
field might imply. The content of the header beyond the End-of- field might imply. The content of the header beyond the End-of-
Option option must be header padding (i.e., zero). Option option must be header padding (i.e., zero).
The list of all currently defined options is managed by IANA [45], The list of all currently defined options is managed by IANA [47],
and each option is defined in other RFCs, as indicated there. That and each option is defined in other RFCs, as indicated there. That
set includes experimental options that can be extended to support set includes experimental options that can be extended to support
multiple concurrent usages [36]. multiple concurrent usages [38].
A given TCP implementation can support any currently defined A given TCP implementation can support any currently defined
options, but the following options MUST be supported (MUST-4) (kind options, but the following options MUST be supported (MUST-4) (kind
indicated in octal): indicated in octal):
Kind Length Meaning Kind Length Meaning
---- ------ ------- ---- ------ -------
0 - End of option list. 0 - End of option list.
1 - No-Operation. 1 - No-Operation.
2 4 Maximum Segment Size. 2 4 Maximum Segment Size.
skipping to change at page 11, line 25 skipping to change at page 11, line 25
If this option is present, then it communicates the maximum If this option is present, then it communicates the maximum
receive segment size at the TCP endpoint that sends this receive segment size at the TCP endpoint that sends this
segment. This value is limited by the IP reassembly limit. segment. This value is limited by the IP reassembly limit.
This field may be sent in the initial connection request (i.e., This field may be sent in the initial connection request (i.e.,
in segments with the SYN control bit set) and MUST NOT be sent in segments with the SYN control bit set) and MUST NOT be sent
in other segments (MUST-65). If this option is not used, any in other segments (MUST-65). If this option is not used, any
segment size is allowed. A more complete description of this segment size is allowed. A more complete description of this
option is in Section 3.6.1. option is in Section 3.6.1.
Experimental TCP option values are defined in [20], and [36] Experimental TCP option values are defined in [21], and [38]
describes the current recommended usage for these experimental describes the current recommended usage for these experimental
values. values.
Note: There is ongoing work to extend the space available for Note: There is ongoing work to extend the space available for
TCP options, such as [50]. TCP options, such as [52].
Padding: variable Padding: variable
The TCP header padding is used to ensure that the TCP header ends The TCP header padding is used to ensure that the TCP header ends
and data begins on a 32 bit boundary. The padding is composed of and data begins on a 32 bit boundary. The padding is composed of
zeros. zeros.
3.2. Terminology Overview 3.2. Terminology Overview
This section includes an overview of key terms needed to understand This section includes an overview of key terms needed to understand
skipping to change at page 19, line 20 skipping to change at page 19, line 20
created, an initial sequence number (ISN) generator is employed that created, an initial sequence number (ISN) generator is employed that
selects a new 32 bit ISN. There are security issues that result if selects a new 32 bit ISN. There are security issues that result if
an off-path attacker is able to predict or guess ISN values. an off-path attacker is able to predict or guess ISN values.
The recommended ISN generator is based on the combination of a The recommended ISN generator is based on the combination of a
(possibly fictitious) 32 bit clock whose low order bit is incremented (possibly fictitious) 32 bit clock whose low order bit is incremented
roughly every 4 microseconds, and a pseudorandom hash function (PRF). roughly every 4 microseconds, and a pseudorandom hash function (PRF).
The clock component is intended to insure that with a Maximum Segment The clock component is intended to insure that with a Maximum Segment
Lifetime (MSL), generated ISNs will be unique, since it cycles Lifetime (MSL), generated ISNs will be unique, since it cycles
approximately every 4.55 hours, which is much longer than the MSL. approximately every 4.55 hours, which is much longer than the MSL.
This recommended algorithm is further described in RFC 6528 [34] and This recommended algorithm is further described in RFC 6528 [35] and
builds on the basic clock-driven algorithm from RFC 793. builds on the basic clock-driven algorithm from RFC 793.
A TCP implementation MUST use a clock-driven selection of initial A TCP implementation MUST use a clock-driven selection of initial
sequence numbers (MUST-8), and SHOULD generate its Initial Sequence sequence numbers (MUST-8), and SHOULD generate its Initial Sequence
Numbers with the expression: Numbers with the expression:
ISN = M + F(localip, localport, remoteip, remoteport, secretkey) ISN = M + F(localip, localport, remoteip, remoteport, secretkey)
where M is the 4 microsecond timer, and F() is a pseudorandom where M is the 4 microsecond timer, and F() is a pseudorandom
function (PRF) of the connection's identifying parameters ("localip, function (PRF) of the connection's identifying parameters ("localip,
localport, remoteip, remoteport") and a secret key ("secretkey") localport, remoteip, remoteport") and a secret key ("secretkey")
(SHLD-1). F() MUST NOT be computable from the outside (MUST-9), or (SHLD-1). F() MUST NOT be computable from the outside (MUST-9), or
an attacker could still guess at sequence numbers from the ISN used an attacker could still guess at sequence numbers from the ISN used
for some other connection. The PRF could be implemented as a for some other connection. The PRF could be implemented as a
cryptographic hash of the concatenation of the TCP connection cryptographic hash of the concatenation of the TCP connection
parameters and some secret data. For discussion of the selection of parameters and some secret data. For discussion of the selection of
a specific hash algorithm and management of the secret key data, a specific hash algorithm and management of the secret key data,
please see Section 3 of [34]. please see Section 3 of [35].
For each connection there is a send sequence number and a receive For each connection there is a send sequence number and a receive
sequence number. The initial send sequence number (ISS) is chosen by sequence number. The initial send sequence number (ISS) is chosen by
the data sending TCP peer, and the initial receive sequence number the data sending TCP peer, and the initial receive sequence number
(IRS) is learned during the connection establishing procedure. (IRS) is learned during the connection establishing procedure.
For a connection to be established or initialized, the two TCP peers For a connection to be established or initialized, the two TCP peers
must synchronize on each other's initial sequence numbers. This is must synchronize on each other's initial sequence numbers. This is
done in an exchange of connection establishing segments carrying a done in an exchange of connection establishing segments carrying a
control bit called "SYN" (for synchronize) and the initial sequence control bit called "SYN" (for synchronize) and the initial sequence
skipping to change at page 20, line 25 skipping to change at page 20, line 25
Because steps 2 and 3 can be combined in a single message this is Because steps 2 and 3 can be combined in a single message this is
called the three way (or three message) handshake. called the three way (or three message) handshake.
A three way handshake is necessary because sequence numbers are not A three way handshake is necessary because sequence numbers are not
tied to a global clock in the network, and TCP implementations may tied to a global clock in the network, and TCP implementations may
have different mechanisms for picking the ISN's. The receiver of the have different mechanisms for picking the ISN's. The receiver of the
first SYN has no way of knowing whether the segment was an old first SYN has no way of knowing whether the segment was an old
delayed one or not, unless it remembers the last sequence number used delayed one or not, unless it remembers the last sequence number used
on the connection (which is not always possible), and so it must ask on the connection (which is not always possible), and so it must ask
the sender to verify this SYN. The three way handshake and the the sender to verify this SYN. The three way handshake and the
advantages of a clock-driven scheme are discussed in [52]. advantages of a clock-driven scheme are discussed in [54].
Knowing When to Keep Quiet Knowing When to Keep Quiet
A theoretical problem exists where data could be corrupted due to
confusion between old segments in the network and new ones after a
host reboots, if the same port numbers and sequence space are reused.
The "Quiet Time" concept discussed below addresses this and the
discussion of it is included for situations where it might be
relevant, although it is not felt to be necessary in most current
implementations. The problem have been more relevant earlier in the
history of TCP. In practical use on the Internet today, the error-
prone conditions are sufficiently unlikely that it is felt safe to
ignore. Reasons why it is now negligible include: (a) ISS and
ephemeral port randomization have reduced likelihood of reuse of
ports and sequency numbers after reboots, (b) the effective MSL of
the Internet has declined as links have become faster, and (c)
reboots often taking longer than an MSL anyways.
To be sure that a TCP implementation does not create a segment To be sure that a TCP implementation does not create a segment
carrying a sequence number that may be duplicated by an old segment carrying a sequence number that may be duplicated by an old segment
remaining in the network, the TCP endpoint must keep quiet for an MSL remaining in the network, the TCP endpoint must keep quiet for an MSL
before assigning any sequence numbers upon starting up or recovering before assigning any sequence numbers upon starting up or recovering
from a situation where memory of sequence numbers in use was lost. from a situation where memory of sequence numbers in use was lost.
For this specification the MSL is taken to be 2 minutes. This is an For this specification the MSL is taken to be 2 minutes. This is an
engineering choice, and may be changed if experience indicates it is engineering choice, and may be changed if experience indicates it is
desirable to do so. Note that if a TCP endpoint is reinitialized in desirable to do so. Note that if a TCP endpoint is reinitialized in
some sense, yet retains its memory of sequence numbers in use, then some sense, yet retains its memory of sequence numbers in use, then
it need not wait at all; it must only be sure to use sequence numbers it need not wait at all; it must only be sure to use sequence numbers
skipping to change at page 24, line 29 skipping to change at page 24, line 50
2. SYN-SENT --> <SEQ=100><CTL=SYN> ... 2. SYN-SENT --> <SEQ=100><CTL=SYN> ...
3. SYN-RECEIVED <-- <SEQ=300><CTL=SYN> <-- SYN-SENT 3. SYN-RECEIVED <-- <SEQ=300><CTL=SYN> <-- SYN-SENT
4. ... <SEQ=100><CTL=SYN> --> SYN-RECEIVED 4. ... <SEQ=100><CTL=SYN> --> SYN-RECEIVED
5. SYN-RECEIVED --> <SEQ=100><ACK=301><CTL=SYN,ACK> ... 5. SYN-RECEIVED --> <SEQ=100><ACK=301><CTL=SYN,ACK> ...
6. ESTABLISHED <-- <SEQ=300><ACK=101><CTL=SYN,ACK> <-- SYN-RECEIVED 6. ESTABLISHED <-- <SEQ=300><ACK=101><CTL=SYN,ACK> <-- SYN-RECEIVED
7. ... <SEQ=100><ACK=301><CTL=SYN,ACK> --> ESTABLISHED 7. ... <SEQ=100><ACK=301><CTL=SYN,ACK> --> ESTABLISHED
Figure 6: Simultaneous Connection Synchronization Figure 6: Simultaneous Connection Synchronization
A TCP implementation MUST support simultaneous open attempts (MUST- A TCP implementation MUST support simultaneous open attempts (MUST-
10). 10).
Note that a TCP implementation MUST keep track of whether a Note that a TCP implementation MUST keep track of whether a
connection has reached SYN-RECEIVED state as the result of a passive connection has reached SYN-RECEIVED state as the result of a passive
OPEN or an active OPEN (MUST-11). OPEN or an active OPEN (MUST-11).
skipping to change at page 27, line 36 skipping to change at page 28, line 4
2. ... <SEQ=Z><CTL=SYN> --> SYN-RECEIVED 2. ... <SEQ=Z><CTL=SYN> --> SYN-RECEIVED
3. (??) <-- <SEQ=X><ACK=Z+1><CTL=SYN,ACK> <-- SYN-RECEIVED 3. (??) <-- <SEQ=X><ACK=Z+1><CTL=SYN,ACK> <-- SYN-RECEIVED
4. --> <SEQ=Z+1><CTL=RST> --> (return to LISTEN!) 4. --> <SEQ=Z+1><CTL=RST> --> (return to LISTEN!)
5. LISTEN LISTEN 5. LISTEN LISTEN
Figure 10: Old Duplicate SYN Initiates a Reset on two Passive Sockets Figure 10: Old Duplicate SYN Initiates a Reset on two Passive Sockets
A variety of other cases are possible, all of which are accounted for A variety of other cases are possible, all of which are accounted for
by the following rules for RST generation and processing. by the following rules for RST generation and processing.
Reset Generation Reset Generation
As a general rule, reset (RST) must be sent whenever a segment As a general rule, reset (RST) is sent whenever a segment arrives
arrives that apparently is not intended for the current connection. that apparently is not intended for the current connection. A reset
A reset must not be sent if it is not clear that this is the case. must not be sent if it is not clear that this is the case.
There are three groups of states: There are three groups of states:
1. If the connection does not exist (CLOSED) then a reset is sent 1. If the connection does not exist (CLOSED) then a reset is sent
in response to any incoming segment except another reset. In in response to any incoming segment except another reset. A SYN
particular, SYNs addressed to a non-existent connection are segment that does not match an existing connection is rejected by
rejected by this means. this means.
If the incoming segment has the ACK bit set, the reset takes its If the incoming segment has the ACK bit set, the reset takes its
sequence number from the ACK field of the segment, otherwise the sequence number from the ACK field of the segment, otherwise the
reset has sequence number zero and the ACK field is set to the sum reset has sequence number zero and the ACK field is set to the sum
of the sequence number and segment length of the incoming segment. of the sequence number and segment length of the incoming segment.
The connection remains in the CLOSED state. The connection remains in the CLOSED state.
2. If the connection is in any non-synchronized state (LISTEN, 2. If the connection is in any non-synchronized state (LISTEN,
SYN-SENT, SYN-RECEIVED), and the incoming segment acknowledges SYN-SENT, SYN-RECEIVED), and the incoming segment acknowledges
something not yet sent (the segment carries an unacceptable ACK), something not yet sent (the segment carries an unacceptable ACK),
skipping to change at page 28, line 29 skipping to change at page 28, line 42
If the incoming segment has an ACK field, the reset takes its If the incoming segment has an ACK field, the reset takes its
sequence number from the ACK field of the segment, otherwise the sequence number from the ACK field of the segment, otherwise the
reset has sequence number zero and the ACK field is set to the sum reset has sequence number zero and the ACK field is set to the sum
of the sequence number and segment length of the incoming segment. of the sequence number and segment length of the incoming segment.
The connection remains in the same state. The connection remains in the same state.
3. If the connection is in a synchronized state (ESTABLISHED, 3. If the connection is in a synchronized state (ESTABLISHED,
FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK, TIME-WAIT), FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK, TIME-WAIT),
any unacceptable segment (out of window sequence number or any unacceptable segment (out of window sequence number or
unacceptable acknowledgment number) must elicit only an empty unacceptable acknowledgment number) must be responded to with an
acknowledgment segment containing the current send-sequence number empty acknowledgment segment (without any user data) containing
and an acknowledgment indicating the next sequence number expected the current send-sequence number and an acknowledgment indicating
to be received, and the connection remains in the same state. the next sequence number expected to be received, and the
connection remains in the same state.
If an incoming segment has a security level, or compartment that If an incoming segment has a security level, or compartment that
does not exactly match the level and compartment requested for the does not exactly match the level and compartment requested for the
connection, a reset is sent and the connection goes to the CLOSED connection, a reset is sent and the connection goes to the CLOSED
state. The reset takes its sequence number from the ACK field of state. The reset takes its sequence number from the ACK field of
the incoming segment. the incoming segment.
Reset Processing Reset Processing
In all states except SYN-SENT, all reset (RST) segments are validated In all states except SYN-SENT, all reset (RST) segments are validated
skipping to change at page 32, line 13 skipping to change at page 32, line 35
reopen the connection directly from TIME-WAIT state (MAY-2), if it: reopen the connection directly from TIME-WAIT state (MAY-2), if it:
(1) assigns its initial sequence number for the new connection to (1) assigns its initial sequence number for the new connection to
be larger than the largest sequence number it used on the previous be larger than the largest sequence number it used on the previous
connection incarnation, and connection incarnation, and
(2) returns to TIME-WAIT state if the SYN turns out to be an old (2) returns to TIME-WAIT state if the SYN turns out to be an old
duplicate. duplicate.
When the TCP Timestamp options are available, an improved algorithm When the TCP Timestamp options are available, an improved algorithm
is described in [32] in order to support higher connection is described in [33] in order to support higher connection
establishment rates. This algorithm for reducing TIME-WAIT is a Best establishment rates. This algorithm for reducing TIME-WAIT is a Best
Current Practice that SHOULD be implemented, since timestamp options Current Practice that SHOULD be implemented, since timestamp options
are commonly used, and using them to reduce TIME-WAIT provides are commonly used, and using them to reduce TIME-WAIT provides
benefits for busy Internet servers (SHLD-4). benefits for busy Internet servers (SHLD-4).
3.6. Segmentation 3.6. Segmentation
The term "segmentation" refers to the activity TCP performs when The term "segmentation" refers to the activity TCP performs when
ingesting a stream of bytes from a sending application and ingesting a stream of bytes from a sending application and
packetizing that stream of bytes into TCP segments. Individual TCP packetizing that stream of bytes into TCP segments. Individual TCP
segments often do not correspond one-for-one to individual send (or segments often do not correspond one-for-one to individual send (or
socket write) calls from the application. Applications may perform socket write) calls from the application. Applications may perform
writes at the granularity of messages in the upper layer protocol, writes at the granularity of messages in the upper layer protocol,
but TCP guarantees no boundary coherence between the TCP segments but TCP guarantees no boundary coherence between the TCP segments
sent and received versus user application data read or write buffer sent and received versus user application data read or write buffer
boundaries. In some specific protocols, such as RDMA using DDP and boundaries. In some specific protocols, such as RDMA using DDP and
MPA [24], there are performance optimizations possible when the MPA [25], there are performance optimizations possible when the
relation between TCP segments and application data units can be relation between TCP segments and application data units can be
controlled, and MPA includes a specific mechanism for detecting and controlled, and MPA includes a specific mechanism for detecting and
verifying this relationship between TCP segments and application verifying this relationship between TCP segments and application
message data strcutures, but this is specific to applications like message data strcutures, but this is specific to applications like
RDMA. In general, multiple goals influence the sizing of TCP RDMA. In general, multiple goals influence the sizing of TCP
segments created by a TCP implementation. segments created by a TCP implementation.
Goals driving the sending of larger segments include: Goals driving the sending of larger segments include:
o Reducing the number of packets in flight within the network. o Reducing the number of packets in flight within the network.
skipping to change at page 34, line 31 skipping to change at page 35, line 5
o IPoptionsize is the size of any IP options associated with a TCP o IPoptionsize is the size of any IP options associated with a TCP
connection. Note that some options may not be included on all connection. Note that some options may not be included on all
packets, but that for each segment sent, the sender should adjust packets, but that for each segment sent, the sender should adjust
the data length accordingly, within the Eff.snd.MSS. the data length accordingly, within the Eff.snd.MSS.
The MSS value to be sent in an MSS option should be equal to the The MSS value to be sent in an MSS option should be equal to the
effective MTU minus the fixed IP and TCP headers. By ignoring both effective MTU minus the fixed IP and TCP headers. By ignoring both
IP and TCP options when calculating the value for the MSS option, if IP and TCP options when calculating the value for the MSS option, if
there are any IP or TCP options to be sent in a packet, then the there are any IP or TCP options to be sent in a packet, then the
sender must decrease the size of the TCP data accordingly. RFC 6691 sender must decrease the size of the TCP data accordingly. RFC 6691
[35] discusses this in greater detail. [36] discusses this in greater detail.
The MSS value to be sent in an MSS option must be less than or equal The MSS value to be sent in an MSS option must be less than or equal
to: to:
MMS_R - 20 MMS_R - 20
where MMS_R is the maximum size for a transport-layer message that where MMS_R is the maximum size for a transport-layer message that
can be received (and reassembled at the IP layer) (MUST-67). TCP can be received (and reassembled at the IP layer) (MUST-67). TCP
obtains MMS_R and MMS_S from the IP layer; see the generic call obtains MMS_R and MMS_S from the IP layer; see the generic call
GET_MAXSIZES in Section 3.4 of RFC 1122. These are defined in terms GET_MAXSIZES in Section 3.4 of RFC 1122. These are defined in terms
skipping to change at page 35, line 26 skipping to change at page 35, line 45
avoid both on-path (for IPv4) and source fragmentation (IPv4 and avoid both on-path (for IPv4) and source fragmentation (IPv4 and
IPv6). IPv6).
PMTUD for IPv4 [2] or IPv6 [3] is implemented in conjunction between PMTUD for IPv4 [2] or IPv6 [3] is implemented in conjunction between
TCP, IP, and ICMP protocols. It relies both on avoiding source TCP, IP, and ICMP protocols. It relies both on avoiding source
fragmentation and setting the IPv4 DF (don't fragment) flag, the fragmentation and setting the IPv4 DF (don't fragment) flag, the
latter to inhibit on-path fragmentation. It relies on ICMP errors latter to inhibit on-path fragmentation. It relies on ICMP errors
from routers along the path, whenever a segment is too large to from routers along the path, whenever a segment is too large to
traverse a link. Several adjustments to a TCP implementation with traverse a link. Several adjustments to a TCP implementation with
PMTUD are described in RFC 2923 in order to deal with problems PMTUD are described in RFC 2923 in order to deal with problems
experienced in practice [7]. PLPMTUD [21] is a Standards Track experienced in practice [7]. PLPMTUD [22] is a Standards Track
improvement to PMTUD that relaxes the requirement for ICMP support improvement to PMTUD that relaxes the requirement for ICMP support
across a path, and improves performance in cases where ICMP is not across a path, and improves performance in cases where ICMP is not
consistently conveyed, but still tries to avoid source fragmentation. consistently conveyed, but still tries to avoid source fragmentation.
The mechanisms in all four of these RFCs are recommended to be The mechanisms in all four of these RFCs are recommended to be
included in TCP implementations. included in TCP implementations.
The TCP MSS option specifies an upper bound for the size of packets The TCP MSS option specifies an upper bound for the size of packets
that can be received. Hence, setting the value in the MSS option too that can be received. Hence, setting the value in the MSS option too
small can impact the ability for PMTUD or PLPMTUD to find a larger small can impact the ability for PMTUD or PLPMTUD to find a larger
path MTU. RFC 1191 discusses this implication of many older TCP path MTU. RFC 1191 discusses this implication of many older TCP
implementations setting MSS to 536 for non-local destinations, rather implementations setting MSS to 536 for non-local destinations, rather
than deriving it from the MTUs of connected interfaces as than deriving it from the MTUs of connected interfaces as
recommended. recommended.
3.6.3. Interfaces with Variable MTU Values 3.6.3. Interfaces with Variable MTU Values
The effective MTU can sometimes vary, as when used with variable The effective MTU can sometimes vary, as when used with variable
compression, e.g., RObust Header Compression (ROHC) [28]. It is compression, e.g., RObust Header Compression (ROHC) [29]. It is
tempting for a TCP implementation to want to advertise the largest tempting for a TCP implementation to want to advertise the largest
possible MSS, to support the most efficient use of compressed possible MSS, to support the most efficient use of compressed
payloads. Unfortunately, some compression schemes occasionally need payloads. Unfortunately, some compression schemes occasionally need
to transmit full headers (and thus smaller payloads) to resynchronize to transmit full headers (and thus smaller payloads) to resynchronize
state at their endpoint compressors/decompressors. If the largest state at their endpoint compressors/decompressors. If the largest
MTU is used to calculate the value to advertise in the MSS option, MTU is used to calculate the value to advertise in the MSS option,
TCP retransmission may interfere with compressor resynchronization. TCP retransmission may interfere with compressor resynchronization.
As a result, when the effective MTU of an interface varies, TCP As a result, when the effective MTU of an interface varies packet-to-
implementations SHOULD use the smallest effective MTU of the packet, TCP implementations SHOULD use the smallest effective MTU of
interface to calculate the value to advertise in the MSS option the interface to calculate the value to advertise in the MSS option
(SHLD-6). (SHLD-6).
3.6.4. Nagle Algorithm 3.6.4. Nagle Algorithm
The "Nagle algorithm" was described in RFC 896 [13] and was The "Nagle algorithm" was described in RFC 896 [13] and was
recommended in RFC 1122 [14] for mitigation of an early problem of recommended in RFC 1122 [14] for mitigation of an early problem of
too many small packets being generated. It has been implemented in too many small packets being generated. It has been implemented in
most current TCP code bases, sometimes with minor variations (see most current TCP code bases, sometimes with minor variations (see
Appendix A.3). Appendix A.3).
If there is unacknowledged data (i.e., SND.NXT > SND.UNA), then the If there is unacknowledged data (i.e., SND.NXT > SND.UNA), then the
sending TCP endpoint buffers all user data (regardless of the PSH sending TCP endpoint buffers all user data (regardless of the PSH
bit), until the outstanding data has been acknowledged or until the bit), until the outstanding data has been acknowledged or until the
TCP endpoint can send a full-sized segment (Eff.snd.MSS bytes). TCP endpoint can send a full-sized segment (Eff.snd.MSS bytes).
A TCP implementation SHOULD implement the Nagle Algorithm to coalesce A TCP implementation SHOULD implement the Nagle Algorithm to coalesce
short segments (SHLD-7). However, there MUST be a way for an short segments (SHLD-7). However, there MUST be a way for an
application to disable the Nagle algorithm on an individual application to disable the Nagle algorithm on an individual
connection (MUST-17). In all cases, sending data is also subject to connection (MUST-17). In all cases, sending data is also subject to
the limitation imposed by the Slow Start algorithm [27]. the limitation imposed by the Slow Start algorithm [28].
3.6.5. IPv6 Jumbograms 3.6.5. IPv6 Jumbograms
In order to support TCP over IPv6 jumbograms, implementations need to In order to support TCP over IPv6 jumbograms, implementations need to
be able to send TCP segments larger than the 64KB limit that the MSS be able to send TCP segments larger than the 64KB limit that the MSS
option can convey. RFC 2675 [6] defines that an MSS value of 65,535 option can convey. RFC 2675 [6] defines that an MSS value of 65,535
bytes is to be treated as infinity, and Path MTU Discovery [3] is bytes is to be treated as infinity, and Path MTU Discovery [3] is
used to determine the actual MSS. used to determine the actual MSS.
The Jumbo Payload option need not be implemented or understood by The Jumbo Payload option need not be implemented or understood by
IPv6 nodes that do not support attachment to links with a MTU greater IPv6 nodes that do not support attachment to links with a MTU greater
than 65,575 [6], and the present IPv6 Node Requiements does not than 65,575 [6], and the present IPv6 Node Requiements does not
include support for Jumbograms [44]. include support for Jumbograms [46].
3.7. Data Communication 3.7. Data Communication
Once the connection is established data is communicated by the Once the connection is established data is communicated by the
exchange of segments. Because segments may be lost due to errors exchange of segments. Because segments may be lost due to errors
(checksum test failure), or network congestion, TCP uses (checksum test failure), or network congestion, TCP uses
retransmission to ensure delivery of every segment. Duplicate retransmission to ensure delivery of every segment. Duplicate
segments may arrive due to network or TCP retransmission. As segments may arrive due to network or TCP retransmission. As
discussed in the section on sequence numbers the TCP implementation discussed in the section on sequence numbers the TCP implementation
performs certain tests on the sequence and acknowledgment numbers in performs certain tests on the sequence and acknowledgment numbers in
skipping to change at page 37, line 38 skipping to change at page 38, line 18
internetwork system and the wide range of uses of TCP connections the internetwork system and the wide range of uses of TCP connections the
retransmission timeout (RTO) must be dynamically determined. retransmission timeout (RTO) must be dynamically determined.
The RTO MUST be computed according to the algorithm in [9], including The RTO MUST be computed according to the algorithm in [9], including
Karn's algorithm for taking RTT samples (MUST-18). Karn's algorithm for taking RTT samples (MUST-18).
RFC 793 contains an early example procedure for computing the RTO. RFC 793 contains an early example procedure for computing the RTO.
This was then replaced by the algorithm described in RFC 1122, and This was then replaced by the algorithm described in RFC 1122, and
subsequently updated in RFC 2988, and then again in RFC 6298. subsequently updated in RFC 2988, and then again in RFC 6298.
If a retransmitted packet is identical to the original packet (which RFC 1122 allows that if a retransmitted packet is identical to the
implies not only that the data boundaries have not changed, but also original packet (which implies not only that the data boundaries have
that none of the headers have not changed), then the same IPv4 not changed, but also that none of the headers have changed), then
Identification field MAY be used (see Section 3.2.1.5 of RFC 1122) the same IPv4 Identification field MAY be used (see Section 3.2.1.5
(MAY-4). of RFC 1122) (MAY-4). The same IP identification field may be reused
anyways, since it is only meaningful when a datagram is fragmented
[37]. TCP implementations should not rely on or typically interact
with this IPv4 header field in any way. It is not a reasonable way
to either indicate duplicate sent segments, nor to identify duplicate
received segments.
3.7.2. TCP Congestion Control 3.7.2. TCP Congestion Control
RFC 1122 required implementation of Van Jacobson's congestion control RFC 1122 required implementation of Van Jacobson's congestion control
algorithm combining slow start with congestion avoidance. RFC 2581 algorithm combining slow start with congestion avoidance. RFC 2581
provided IETF Standards Track description of this, along with fast provided IETF Standards Track description of this, along with fast
retransmit and fast recovery. RFC 5681 is the current description of retransmit and fast recovery. RFC 5681 is the current description of
these algorithms and is the current standard for TCP congestion these algorithms and is the current standard for TCP congestion
control. control.
A TCP endpoint MUST implement RFC 5681 (MUST-19). A TCP endpoint MUST implement RFC 5681 (MUST-19).
Explicit Congestion Notification (ECN) was defined in RFC 3168 and is Explicit Congestion Notification (ECN) was defined in RFC 3168 and is
an IETF Standards Track enhancement that has many benefits [41]. an IETF Standards Track enhancement that has many benefits [43].
A TCP endpoint SHOULD implement ECN as described in RFC 3168 (SHLD- A TCP endpoint SHOULD implement ECN as described in RFC 3168 (SHLD-
8). 8).
3.7.3. TCP Connection Failures 3.7.3. TCP Connection Failures
Excessive retransmission of the same segment by a TCP endpoint Excessive retransmission of the same segment by a TCP endpoint
indicates some failure of the remote host or the Internet path. This indicates some failure of the remote host or the Internet path. This
failure may be of short or long duration. The following procedure failure may be of short or long duration. The following procedure
MUST be used to handle excessive retransmissions of data segments MUST be used to handle excessive retransmissions of data segments
skipping to change at page 39, line 44 skipping to change at page 40, line 28
An implementation SHOULD send a keep-alive segment with no data An implementation SHOULD send a keep-alive segment with no data
(SHLD-12); however, it MAY be configurable to send a keep-alive (SHLD-12); however, it MAY be configurable to send a keep-alive
segment containing one garbage octet (MAY-6), for compatibility with segment containing one garbage octet (MAY-6), for compatibility with
erroneous TCP implementations. erroneous TCP implementations.
3.7.5. The Communication of Urgent Information 3.7.5. The Communication of Urgent Information
As a result of implementation differences and middlebox interactions, As a result of implementation differences and middlebox interactions,
new applications SHOULD NOT employ the TCP urgent mechanism (SHLD- new applications SHOULD NOT employ the TCP urgent mechanism (SHLD-
13). However, TCP implementations MUST still include support for the 13). However, TCP implementations MUST still include support for the
urgent mechanism (MUST-30). Details can be found in RFC 6093 [31]. urgent mechanism (MUST-30). Details can be found in RFC 6093 [32].
The objective of the TCP urgent mechanism is to allow the sending The objective of the TCP urgent mechanism is to allow the sending
user to stimulate the receiving user to accept some urgent data and user to stimulate the receiving user to accept some urgent data and
to permit the receiving TCP endpoint to indicate to the receiving to permit the receiving TCP endpoint to indicate to the receiving
user when all the currently known urgent data has been received by user when all the currently known urgent data has been received by
the user. the user.
This mechanism permits a point in the data stream to be designated as This mechanism permits a point in the data stream to be designated as
the end of urgent information. Whenever this point is in advance of the end of urgent information. Whenever this point is in advance of
the receive sequence number (RCV.NXT) at the receiving TCP endpoint, the receive sequence number (RCV.NXT) at the receiving TCP endpoint,
skipping to change at page 42, line 16 skipping to change at page 42, line 47
Probing of zero (offered) windows MUST be supported (MUST-36). Probing of zero (offered) windows MUST be supported (MUST-36).
A TCP implementation MAY keep its offered receive window closed A TCP implementation MAY keep its offered receive window closed
indefinitely (MAY-8). As long as the receiving TCP peer continues to indefinitely (MAY-8). As long as the receiving TCP peer continues to
send acknowledgments in response to the probe segments, the sending send acknowledgments in response to the probe segments, the sending
TCP peer MUST allow the connection to stay open (MUST-37). This TCP peer MUST allow the connection to stay open (MUST-37). This
enables TCP to function in scenarios such as the "printer ran out of enables TCP to function in scenarios such as the "printer ran out of
paper" situation described in Section 4.2.2.17 of RFC1122. The paper" situation described in Section 4.2.2.17 of RFC1122. The
behavior is subject to the implementation's resource management behavior is subject to the implementation's resource management
concerns, as noted in [33]. concerns, as noted in [34].
When the receiving TCP peer has a zero window and a segment arrives When the receiving TCP peer has a zero window and a segment arrives
it must still send an acknowledgment showing its next expected it must still send an acknowledgment showing its next expected
sequence number and current window (zero). sequence number and current window (zero).
The transmitting host SHOULD send the first zero-window probe when a The transmitting host SHOULD send the first zero-window probe when a
zero window has existed for the retransmission timeout period (SHLD- zero window has existed for the retransmission timeout period (SHLD-
29) (see Section 3.7.1), and SHOULD increase exponentially the 29) (see Section 3.7.1), and SHOULD increase exponentially the
interval between successive probes (SHLD-30). interval between successive probes (SHLD-30).
skipping to change at page 45, line 27 skipping to change at page 45, line 48
A host that is receiving a stream of TCP data segments can increase A host that is receiving a stream of TCP data segments can increase
efficiency in both the Internet and the hosts by sending fewer than efficiency in both the Internet and the hosts by sending fewer than
one ACK (acknowledgment) segment per data segment received; this is one ACK (acknowledgment) segment per data segment received; this is
known as a "delayed ACK". known as a "delayed ACK".
A TCP endpoint SHOULD implement a delayed ACK (SHLD-18), but an ACK A TCP endpoint SHOULD implement a delayed ACK (SHLD-18), but an ACK
should not be excessively delayed; in particular, the delay MUST be should not be excessively delayed; in particular, the delay MUST be
less than 0.5 seconds (MUST-40), and in a stream of full-sized less than 0.5 seconds (MUST-40), and in a stream of full-sized
segments there SHOULD be an ACK for at least every second segment segments there SHOULD be an ACK for at least every second segment
(SHLD-19). Excessive delays on ACK's can disturb the round-trip (SHLD-19). Excessive delays on ACK's can disturb the round-trip
timing and packet "clocking" algorithms. timing and packet "clocking" algorithms. More complete discussion of
delayed ACK behavior is in Section 4.2 of RFC 5681 [28], including
rules for streams of segments that are not full-sized. Note that
there are several current practices that further lead to a reduced
number of ACKs, including generic receive offload (GRO), ACK
compression, and ACK decimation [19].
3.8. Interfaces 3.8. Interfaces
There are of course two interfaces of concern: the user/TCP interface There are of course two interfaces of concern: the user/TCP interface
and the TCP/lower-level interface. We have a fairly elaborate model and the TCP/lower-level interface. We have a fairly elaborate model
of the user/TCP interface, but the interface to the lower level of the user/TCP interface, but the interface to the lower level
protocol module is left unspecified here, since it will be specified protocol module is left unspecified here, since it will be specified
in detail by the specification of the lower level protocol. For the in detail by the specification of the lower level protocol. For the
case that the lower level is IP we note some of the parameter values case that the lower level is IP we note some of the parameter values
that TCP implementations might use. that TCP implementations might use.
skipping to change at page 45, line 50 skipping to change at page 46, line 30
The following functional description of user commands to the TCP The following functional description of user commands to the TCP
implementation is, at best, fictional, since every operating system implementation is, at best, fictional, since every operating system
will have different facilities. Consequently, we must warn readers will have different facilities. Consequently, we must warn readers
that different TCP implementations may have different user that different TCP implementations may have different user
interfaces. However, all TCP implementations must provide a certain interfaces. However, all TCP implementations must provide a certain
minimum set of services to guarantee that all TCP implementations can minimum set of services to guarantee that all TCP implementations can
support the same protocol hierarchy. This section specifies the support the same protocol hierarchy. This section specifies the
functional interfaces required of all TCP implementations. functional interfaces required of all TCP implementations.
Section 3.1 of [43] also identifies primitives provided by TCP, and Section 3.1 of [45] also identifies primitives provided by TCP, and
could be used as an additional reference for implementers. could be used as an additional reference for implementers.
TCP User Commands TCP User Commands
The following sections functionally characterize a USER/TCP The following sections functionally characterize a USER/TCP
interface. The notation used is similar to most procedure or interface. The notation used is similar to most procedure or
function calls in high level languages, but this usage is not function calls in high level languages, but this usage is not
meant to rule out trap type service calls. meant to rule out trap type service calls.
The user commands described below specify the basic functions the The user commands described below specify the basic functions the
skipping to change at page 46, line 36 skipping to change at page 47, line 17
(b) replies to specific user commands indicating success or (b) replies to specific user commands indicating success or
various types of failure. various types of failure.
Open Open
Format: OPEN (local port, remote socket, active/passive [, Format: OPEN (local port, remote socket, active/passive [,
timeout] [, DiffServ field] [, security/compartment] [local IP timeout] [, DiffServ field] [, security/compartment] [local IP
address,] [, options]) -> local connection name address,] [, options]) -> local connection name
We assume that the local TCP endpoint is aware of the identity
of the processes it serves and will check the authority of the
process to use the connection specified. Depending upon the
implementation of the TCP endpoint, the local network and TCP
identifiers for the source address will either be supplied by
the TCP endpoint or the lower level protocol (e.g., IP). These
considerations are the result of concern about security, to the
extent that no TCP peer be able to masquerade as another one,
and so on. Similarly, no process can masquerade as another
without the collusion of the TCP implementation.
If the active/passive flag is set to passive, then this is a If the active/passive flag is set to passive, then this is a
call to LISTEN for an incoming connection. A passive open may call to LISTEN for an incoming connection. A passive open may
have either a fully specified remote socket to wait for a have either a fully specified remote socket to wait for a
particular connection or an unspecified remote socket to wait particular connection or an unspecified remote socket to wait
for any call. A fully specified passive call can be made for any call. A fully specified passive call can be made
active by the subsequent execution of a SEND. active by the subsequent execution of a SEND.
A transmission control block (TCB) is created and partially A transmission control block (TCB) is created and partially
filled in with data from the OPEN command parameters. filled in with data from the OPEN command parameters.
skipping to change at page 49, line 30 skipping to change at page 49, line 49
buffer the data before sending, without regard to the PUSH flag buffer the data before sending, without regard to the PUSH flag
(see Section 3.6.4). (see Section 3.6.4).
An application program is logically required to set the PUSH An application program is logically required to set the PUSH
flag in a SEND call whenever it needs to force delivery of the flag in a SEND call whenever it needs to force delivery of the
data to avoid a communication deadlock. However, a TCP data to avoid a communication deadlock. However, a TCP
implementation SHOULD send a maximum-sized segment whenever implementation SHOULD send a maximum-sized segment whenever
possible (SHLD-28), to improve performance (see possible (SHLD-28), to improve performance (see
Section 3.7.6.2.1). Section 3.7.6.2.1).
New applications SHOULD NOT set the URGENT flag [31] due to New applications SHOULD NOT set the URGENT flag [32] due to
implementation differences and middlebox issues (SHLD-13). implementation differences and middlebox issues (SHLD-13).
If the URGENT flag is set, segments sent to the destination TCP If the URGENT flag is set, segments sent to the destination TCP
peer will have the urgent pointer set. The receiving TCP peer peer will have the urgent pointer set. The receiving TCP peer
will signal the urgent condition to the receiving process if will signal the urgent condition to the receiving process if
the urgent pointer indicates that data preceding the urgent the urgent pointer indicates that data preceding the urgent
pointer has not been consumed by the receiving process. The pointer has not been consumed by the receiving process. The
purpose of urgent is to stimulate the receiver to process the purpose of urgent is to stimulate the receiver to process the
urgent data and to indicate to the receiver when all the urgent data and to indicate to the receiver when all the
currently known urgent data has been received. The number of currently known urgent data has been received. The number of
skipping to change at page 55, line 21 skipping to change at page 55, line 41
that a segment be destroyed if it cannot be delivered by the that a segment be destroyed if it cannot be delivered by the
internet system within one minute. RFC 1122 changed this internet system within one minute. RFC 1122 changed this
specification to require that the TTL be configurable. specification to require that the TTL be configurable.
Note that the DiffServ field is permitted to change during a Note that the DiffServ field is permitted to change during a
connection (section 4.2.4.2 of RFC 1122). However, the connection (section 4.2.4.2 of RFC 1122). However, the
application interface might not support this ability, and the application interface might not support this ability, and the
application does not have knowledge about individual TCP application does not have knowledge about individual TCP
segments, so this can only be done on a coarse granularity, at segments, so this can only be done on a coarse granularity, at
best. This limitation is further discussed in RFC 7657 (sec best. This limitation is further discussed in RFC 7657 (sec
5.1, 5.3, and 6) [40]. Generally, an application SHOULD NOT 5.1, 5.3, and 6) [42]. Generally, an application SHOULD NOT
change the DiffServ field value during the course of a change the DiffServ field value during the course of a
connection (SHLD-23). connection (SHLD-23).
Any lower level protocol will have to provide the source address, Any lower level protocol will have to provide the source address,
destination address, and protocol fields, and some way to determine destination address, and protocol fields, and some way to determine
the "TCP length", both to provide the functional equivalent service the "TCP length", both to provide the functional equivalent service
of IP and to be used in the TCP checksum. of IP and to be used in the TCP checksum.
When received options are passed up to TCP from the IP layer, TCP When received options are passed up to TCP from the IP layer, TCP
implementations MUST ignore options that it does not understand implementations MUST ignore options that it does not understand
skipping to change at page 56, line 17 skipping to change at page 56, line 41
3.8.2.2. ICMP Messages 3.8.2.2. ICMP Messages
TCP implementations MUST act on an ICMP error message passed up from TCP implementations MUST act on an ICMP error message passed up from
the IP layer, directing it to the connection that created the error the IP layer, directing it to the connection that created the error
(MUST-54). The necessary demultiplexing information can be found in (MUST-54). The necessary demultiplexing information can be found in
the IP header contained within the ICMP message. the IP header contained within the ICMP message.
This applies to ICMPv6 in addition to IPv4 ICMP. This applies to ICMPv6 in addition to IPv4 ICMP.
[25] contains discussion of specific ICMP and ICMPv6 messages [26] contains discussion of specific ICMP and ICMPv6 messages
classified as either "soft" or "hard" errors that may bear different classified as either "soft" or "hard" errors that may bear different
responses. Treatment for classes of ICMP messages is described responses. Treatment for classes of ICMP messages is described
below: below:
Source Quench Source Quench
TCP implementations MUST silently discard any received ICMP Source TCP implementations MUST silently discard any received ICMP Source
Quench messages (MUST-55). See [10] for discussion. Quench messages (MUST-55). See [10] for discussion.
Soft Errors Soft Errors
For ICMP these include: Destination Unreachable -- codes 0, 1, 5, For ICMP these include: Destination Unreachable -- codes 0, 1, 5,
skipping to change at page 56, line 29 skipping to change at page 57, line 4
responses. Treatment for classes of ICMP messages is described responses. Treatment for classes of ICMP messages is described
below: below:
Source Quench Source Quench
TCP implementations MUST silently discard any received ICMP Source TCP implementations MUST silently discard any received ICMP Source
Quench messages (MUST-55). See [10] for discussion. Quench messages (MUST-55). See [10] for discussion.
Soft Errors Soft Errors
For ICMP these include: Destination Unreachable -- codes 0, 1, 5, For ICMP these include: Destination Unreachable -- codes 0, 1, 5,
Time Exceeded -- codes 0, 1, and Parameter Problem. Time Exceeded -- codes 0, 1, and Parameter Problem.
For ICMPv6 these include: Destination Unreachable -- codes 0 and 3, For ICMPv6 these include: Destination Unreachable -- codes 0 and 3,
Time Exceeded -- codes 0, 1, and Parameter Problem -- codes 0, 1, 2 Time Exceeded -- codes 0, 1, and Parameter Problem -- codes 0, 1, 2
Since these Unreachable messages indicate soft error conditions, Since these Unreachable messages indicate soft error conditions,
TCP implementations MUST NOT abort the connection (MUST-56), and it TCP implementations MUST NOT abort the connection (MUST-56), and it
SHOULD make the information available to the application (SHLD-25). SHOULD make the information available to the application (SHLD-25).
Hard Errors Hard Errors
For ICMP these include Destination Unreachable -- codes 2-4"> For ICMP these include Destination Unreachable -- codes 2-4">
These are hard error conditions, so TCP implementations SHOULD These are hard error conditions, so TCP implementations SHOULD
abort the connection (SHLD-26). [25] notes that some abort the connection (SHLD-26). [26] notes that some
implementations do not abort connections when an ICMP hard error is implementations do not abort connections when an ICMP hard error is
received for a connection that is in any of the synchronized received for a connection that is in any of the synchronized
states. states.
Note that [25] section 4 describes widespread implementation behavior Note that [26] section 4 describes widespread implementation behavior
that treats soft errors as hard errors during connection that treats soft errors as hard errors during connection
establishment. establishment.
3.8.2.3. Remote Address Validation 3.8.2.3. Remote Address Validation
RFC 1122 requires addresses to be validated in incoming SYN packets: RFC 1122 requires addresses to be validated in incoming SYN packets:
An incoming SYN with an invalid source address MUST be ignored An incoming SYN with an invalid source address MUST be ignored
either by TCP or by the IP layer (MUST-63) (see Section 3.2.1.3 of either by TCP or by the IP layer (MUST-63) (see Section 3.2.1.3 of
[14]). [14]).
skipping to change at page 70, line 5 skipping to change at page 70, line 5
acceptable. Some deployed TCP code has used the check acceptable. Some deployed TCP code has used the check
SEG.ACK == SND.NXT (using "==" rather than "=<", but this SEG.ACK == SND.NXT (using "==" rather than "=<", but this
is not appropriate when the stack is capable of sending is not appropriate when the stack is capable of sending
data on the SYN, because the TCP peer may not accept and data on the SYN, because the TCP peer may not accept and
acknowledge all of the data on the SYN. acknowledge all of the data on the SYN.
second check the RST bit second check the RST bit
If the RST bit is set If the RST bit is set
A potential blind reset attack is described in RFC 5961 A potential blind reset attack is described in RFC 5961
[30], with the mitigation that a TCP implementation [31], with the mitigation that a TCP implementation
SHOULD first check that the sequence number exactly SHOULD first check that the sequence number exactly
matches RCV.NXT prior to executing the action in the next matches RCV.NXT prior to executing the action in the next
paragraph. paragraph.
If the ACK was acceptable then signal the user "error: If the ACK was acceptable then signal the user "error:
connection reset", drop the segment, enter CLOSED state, connection reset", drop the segment, enter CLOSED state,
delete TCB, and return. Otherwise (no ACK) drop the delete TCB, and return. Otherwise (no ACK) drop the
segment and return. segment and return.
third check the security third check the security
skipping to change at page 71, line 22 skipping to change at page 71, line 22
If there are other controls or text in the segment, queue If there are other controls or text in the segment, queue
them for processing after the ESTABLISHED state has been them for processing after the ESTABLISHED state has been
reached, return. reached, return.
Note that it is legal to send and receive application data Note that it is legal to send and receive application data
on SYN segments (this is the "text in the segment" mentioned on SYN segments (this is the "text in the segment" mentioned
above. There has been significant misinformation and above. There has been significant misinformation and
misunderstanding of this topic historically. Some firewalls misunderstanding of this topic historically. Some firewalls
and security devices consider this suspicious. However, the and security devices consider this suspicious. However, the
capability was used in T/TCP [16] and is used in TCP Fast capability was used in T/TCP [16] and is used in TCP Fast
Open (TFO) [38], so is important for implementations and Open (TFO) [40], so is important for implementations and
network devices to permit. network devices to permit.
fifth, if neither of the SYN or RST bits is set then drop the fifth, if neither of the SYN or RST bits is set then drop the
segment and return. segment and return.
Otherwise, Otherwise,
first check sequence number first check sequence number
SYN-RECEIVED STATE SYN-RECEIVED STATE
skipping to change at page 72, line 38 skipping to change at page 72, line 38
If an incoming segment is not acceptable, an acknowledgment If an incoming segment is not acceptable, an acknowledgment
should be sent in reply (unless the RST bit is set, if so should be sent in reply (unless the RST bit is set, if so
drop the segment and return): drop the segment and return):
<SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK> <SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK>
After sending the acknowledgment, drop the unacceptable After sending the acknowledgment, drop the unacceptable
segment and return. segment and return.
Note that for the TIME-WAIT state, there is an improved Note that for the TIME-WAIT state, there is an improved
algorithm described in [32] for handling incoming SYN algorithm described in [33] for handling incoming SYN
segments, that utilizes timestamps rather than relying on segments, that utilizes timestamps rather than relying on
the sequence number check described here. When the improved the sequence number check described here. When the improved
algorithm is implemented, the logic above is not applicable algorithm is implemented, the logic above is not applicable
for incoming SYN segments with timestamp options, received for incoming SYN segments with timestamp options, received
on a connection in the TIME-WAIT state. on a connection in the TIME-WAIT state.
In the following it is assumed that the segment is the In the following it is assumed that the segment is the
idealized segment that begins at RCV.NXT and does not exceed idealized segment that begins at RCV.NXT and does not exceed
the window. One could tailor actual segments to fit this the window. One could tailor actual segments to fit this
assumption by trimming off any portions that lie outside the assumption by trimming off any portions that lie outside the
skipping to change at page 75, line 26 skipping to change at page 75, line 26
FIN-WAIT STATE-2 FIN-WAIT STATE-2
CLOSE-WAIT STATE CLOSE-WAIT STATE
CLOSING STATE CLOSING STATE
LAST-ACK STATE LAST-ACK STATE
TIME-WAIT STATE TIME-WAIT STATE
If the SYN bit is set in these synchronized states, it If the SYN bit is set in these synchronized states, it
may be either a legitimate new connection attempt (e.g. may be either a legitimate new connection attempt (e.g.
in the case of TIME-WAIT), an error where the connection in the case of TIME-WAIT), an error where the connection
should be reset, or the result of an attack attempt, as should be reset, or the result of an attack attempt, as
described in RFC 5961 [30]. For the TIME-WAIT state, new described in RFC 5961 [31]. For the TIME-WAIT state, new
connections can be accepted if the timestamp option is connections can be accepted if the timestamp option is
used and meets expectations (per [32]). For all other used and meets expectations (per [33]). For all other
caess, RFC 5961 provides a mitigation that SHOULD be caess, RFC 5961 provides a mitigation that SHOULD be
implemented, though there are alternatives (see implemented, though there are alternatives (see
Section 6). RFC 5961 recommends that in these Section 6). RFC 5961 recommends that in these
synchronized states, if the SYN bit is set, irrespective synchronized states, if the SYN bit is set, irrespective
of the sequence number, TCP endpoints MUST send a of the sequence number, TCP endpoints MUST send a
"challenge ACK" to the remote peer: "challenge ACK" to the remote peer:
<SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK> <SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK>
After sending the acknowledgement, TCP implementations After sending the acknowledgement, TCP implementations
skipping to change at page 91, line 38 skipping to change at page 91, line 38
from the mailing list, including editorial fixes, adding IANA from the mailing list, including editorial fixes, adding IANA
considerations for the header flags, improving figure title considerations for the header flags, improving figure title
placement, and breaking up the "Terminology" section into more placement, and breaking up the "Terminology" section into more
appropriately titled subsections. appropriately titled subsections.
The -15 revision has many technical and editorial corrections from The -15 revision has many technical and editorial corrections from
Gorry Fairhurst's review, and subsequent discussion on the TCPM list, Gorry Fairhurst's review, and subsequent discussion on the TCPM list,
as well as some other collected clarifications and improvements from as well as some other collected clarifications and improvements from
mailing list discussion. mailing list discussion.
The -16 revision addresses several discussions that rose from
additional reviews and follow-up on some of Gorry Fairhurst's
comments from revision 14.
Some other suggested changes that will not be incorporated in this Some other suggested changes that will not be incorporated in this
793 update unless TCPM consensus changes with regard to scope are: 793 update unless TCPM consensus changes with regard to scope are:
1. Tony Sabatini's suggestion for describing DO field 1. Tony Sabatini's suggestion for describing DO field
2. Per discussion with Joe Touch (TAPS list, 6/20/2015), the 2. Per discussion with Joe Touch (TAPS list, 6/20/2015), the
description of the API could be revisited description of the API could be revisited
Early in the process of updating RFC 793, Scott Brim mentioned that Early in the process of updating RFC 793, Scott Brim mentioned that
this should include a PERPASS/privacy review. This may be something this should include a PERPASS/privacy review. This may be something
for the chairs or AD to request during WGLC or IETF LC. for the chairs or AD to request during WGLC or IETF LC.
skipping to change at page 92, line 35 skipping to change at page 92, line 35
under the global "Transmission Control Protocol (TCP) Parameters under the global "Transmission Control Protocol (TCP) Parameters
registry (https://www.iana.org/assignments/tcp-parameters/tcp- registry (https://www.iana.org/assignments/tcp-parameters/tcp-
parameters.xhtml). parameters.xhtml).
6. Security and Privacy Considerations 6. Security and Privacy Considerations
The TCP design includes only rudimentary security features that The TCP design includes only rudimentary security features that
improve the robustness and reliability of connections and application improve the robustness and reliability of connections and application
data transfer, but there are no built-in cryptographic capabilities data transfer, but there are no built-in cryptographic capabilities
to support any form of privacy, authentication, or other typical to support any form of privacy, authentication, or other typical
security functions. Non-cryptographic enhancements (e.g. [30]) have security functions. Non-cryptographic enhancements (e.g. [31]) have
been developed to improve robustness of TCP connections to particular been developed to improve robustness of TCP connections to particular
types of attacks, but the applicability and protections of non- types of attacks, but the applicability and protections of non-
cryptographic enhancements are limited (e.g. see section 1.1 of cryptographic enhancements are limited (e.g. see section 1.1 of
[30]). Applications typically utilize lower-layer (e.g. IPsec) and [31]). Applications typically utilize lower-layer (e.g. IPsec) and
upper-layer (e.g. TLS) protocols to provide security and privacy for upper-layer (e.g. TLS) protocols to provide security and privacy for
TCP connections and application data carried in TCP. Methods based TCP connections and application data carried in TCP. Methods based
on TCP options have been developed as well, to support some security on TCP options have been developed as well, to support some security
capabilities. capabilities.
In order to fully protect TCP connections (including their control In order to fully protect TCP connections (including their control
flags) IPsec or the TCP Authentication Option (TCP-AO) [29] are the flags) IPsec or the TCP Authentication Option (TCP-AO) [30] are the
only current effective methods. Other methods discussed in this only current effective methods. Other methods discussed in this
section may protect the payload, but either only a subset of the section may protect the payload, but either only a subset of the
fields (e.g. tcpcrypt) or none at all (e.g. TLS). Other security fields (e.g. tcpcrypt) or none at all (e.g. TLS). Other security
features that have been added to TCP (e.g. ISN generation, sequence features that have been added to TCP (e.g. ISN generation, sequence
number checks, etc.) are only capable of partially hindering attacks. number checks, etc.) are only capable of partially hindering attacks.
Applications using long-lived TCP flows have been vulnerable to Applications using long-lived TCP flows have been vulnerable to
attacks that exploit the processing of control flags described in attacks that exploit the processing of control flags described in
earlier TCP specifications [23]. TCP-MD5 was a commonly implemented earlier TCP specifications [24]. TCP-MD5 was a commonly implemented
TCP option to support authentication for some of these connections, TCP option to support authentication for some of these connections,
but had flaws and is now deprecated. TCP-AO provides a capability to but had flaws and is now deprecated. TCP-AO provides a capability to
protect long-lived TCP connections from attacks, and has superior protect long-lived TCP connections from attacks, and has superior
properties to TCP-MD5. It does not provide any privacy for properties to TCP-MD5. It does not provide any privacy for
application data, nor for the TCP headers. application data, nor for the TCP headers.
The "tcpcrypt" [49] Experimental extension to TCP provides the The "tcpcrypt" [51] Experimental extension to TCP provides the
ability to cryptographically protect connection data. Metadata ability to cryptographically protect connection data. Metadata
aspects of the TCP flow are still visible, but the application stream aspects of the TCP flow are still visible, but the application stream
is well-protected. Within the TCP header, only the urgent pointer is well-protected. Within the TCP header, only the urgent pointer
and FIN flag are protected through tcpcrypt. and FIN flag are protected through tcpcrypt.
The TCP Roadmap [39] includes notes about several RFCs related to TCP The TCP Roadmap [41] includes notes about several RFCs related to TCP
security. Many of the enhancements provided by these RFCs have been security. Many of the enhancements provided by these RFCs have been
integrated into the present document, including ISN generation, integrated into the present document, including ISN generation,
mitigating blind in-window attacks, and improving handling of soft mitigating blind in-window attacks, and improving handling of soft
errors and ICMP packets. These are all discussed in greater detail errors and ICMP packets. These are all discussed in greater detail
in the referenced RFCs that originally described the changes needed in the referenced RFCs that originally described the changes needed
to earlier TCP specifications. Additionally, see RFC 6093 [31] for to earlier TCP specifications. Additionally, see RFC 6093 [32] for
discussion of security considerations related to the urgent pointer discussion of security considerations related to the urgent pointer
field, that has been deprecated. field, that has been deprecated.
Since TCP is often used for bulk transfer flows, some attacks are Since TCP is often used for bulk transfer flows, some attacks are
possible that abuse the TCP congestion control logic. An example is possible that abuse the TCP congestion control logic. An example is
"ACK-division" attacks. Updates that have been made to the TCP "ACK-division" attacks. Updates that have been made to the TCP
congestion control specifications include mechanisms like Appropriate congestion control specifications include mechanisms like Appropriate
Byte Counting (ABC) [19] that act as mitigations to these attacks. Byte Counting (ABC) [20] that act as mitigations to these attacks.
Other attacks are focused on exhausting the resources of a TCP Other attacks are focused on exhausting the resources of a TCP
server. Examples include SYN flooding [22] or wasting resources on server. Examples include SYN flooding [23] or wasting resources on
non-progressing connections [33]. Operating systems commonly non-progressing connections [34]. Operating systems commonly
implement mitigations for these attacks. Some common defenses also implement mitigations for these attacks. Some common defenses also
utilize proxies, stateful firewalls, and other technologies outside utilize proxies, stateful firewalls, and other technologies outside
of the end-host TCP implementation. of the end-host TCP implementation.
7. Acknowledgements 7. Acknowledgements
This document is largely a revision of RFC 793, which Jon Postel was This document is largely a revision of RFC 793, which Jon Postel was
the editor of. Due to his excellent work, it was able to last for the editor of. Due to his excellent work, it was able to last for
three decades before we felt the need to revise it. three decades before we felt the need to revise it.
skipping to change at page 94, line 13 skipping to change at page 94, line 13
revision of this document. revision of this document.
We are thankful for the assistance of the IETF TCPM working group We are thankful for the assistance of the IETF TCPM working group
chairs, over the course of work on this document: chairs, over the course of work on this document:
Michael Scharf Michael Scharf
Yoshifumi Nishida Yoshifumi Nishida
Pasi Sarolahti Pasi Sarolahti
Michael Tuexen Michael Tuexen
During early discussion of this work on the TCPM mailing list, and at During the discussions of this work on the TCPM mailing list and in
the IETF 88 meeting in Vancouver, and following adoption by the TCPM working group meetings, helpful comments, critiques, and reviews were
working group, helpful comments, critiques, and reviews were received received from (listed alphabetically): David Borman, Mohamed
from (listed alphabetically): David Borman, Mohamed Boucadair, Bob Boucadair, Bob Briscoe, Neal Cardwell, Yuchung Cheng, Martin Duke,
Briscoe, Neal Cardwell, Yuchung Cheng, Martin Duke, Ted Faber, Gorry Ted Faber, Gorry Fairhurst, Fernando Gont, Rodney Grimes, Mike Kosek,
Fairhurst, Rodney Grimes, Mike Kosek, Kevin Lahey, Kevin Mason, Matt Kevin Lahey, Kevin Mason, Matt Mathis, Jonathan Morton, Tommy Pauly,
Mathis, Jonathan Morton, Tommy Pauly, Hagen Paul Pfeifer, Anthony Hagen Paul Pfeifer, Anthony Sabatini, Michael Scharf, Greg Skinner,
Sabatini, Michael Scharf, Greg Skinner, Joe Touch, Reji Varghese, Tim Joe Touch, Michael Tuexen, Reji Varghese, Tim Wicinski, Lloyd Wood,
Wicinski, Lloyd Wood, and Alex Zimmermann. Joe Touch provided and Alex Zimmermann. Joe Touch provided additional help in
additional help in clarifying the description of segment size clarifying the description of segment size parameters and PMTUD/
parameters and PMTUD/PLPMTUD recommendations. PLPMTUD recommendations.
This document includes content from errata that were reported by This document includes content from errata that were reported by
(listed chronologically): Yin Shuming, Bob Braden, Morris M. Keesan, (listed chronologically): Yin Shuming, Bob Braden, Morris M. Keesan,
Pei-chun Cheng, Constantin Hagemeier, Vishwas Manral, Mykyta Pei-chun Cheng, Constantin Hagemeier, Vishwas Manral, Mykyta
Yevstifeyev, EungJun Yi, Botong Huang. Yevstifeyev, EungJun Yi, Botong Huang.
8. References 8. References
8.1. Normative References 8.1. Normative References
skipping to change at page 96, line 24 skipping to change at page 96, line 24
J., Heavens, I., Lahey, K., Semke, J., and B. Volz, "Known J., Heavens, I., Lahey, K., Semke, J., and B. Volz, "Known
TCP Implementation Problems", RFC 2525, TCP Implementation Problems", RFC 2525,
DOI 10.17487/RFC2525, March 1999, DOI 10.17487/RFC2525, March 1999,
<https://www.rfc-editor.org/info/rfc2525>. <https://www.rfc-editor.org/info/rfc2525>.
[18] Xiao, X., Hannan, A., Paxson, V., and E. Crabbe, "TCP [18] Xiao, X., Hannan, A., Paxson, V., and E. Crabbe, "TCP
Processing of the IPv4 Precedence Field", RFC 2873, Processing of the IPv4 Precedence Field", RFC 2873,
DOI 10.17487/RFC2873, June 2000, DOI 10.17487/RFC2873, June 2000,
<https://www.rfc-editor.org/info/rfc2873>. <https://www.rfc-editor.org/info/rfc2873>.
[19] Allman, M., "TCP Congestion Control with Appropriate Byte [19] Balakrishnan, H., Padmanabhan, V., Fairhurst, G., and M.
Sooriyabandara, "TCP Performance Implications of Network
Path Asymmetry", BCP 69, RFC 3449, DOI 10.17487/RFC3449,
December 2002, <https://www.rfc-editor.org/info/rfc3449>.
[20] Allman, M., "TCP Congestion Control with Appropriate Byte
Counting (ABC)", RFC 3465, DOI 10.17487/RFC3465, February Counting (ABC)", RFC 3465, DOI 10.17487/RFC3465, February
2003, <https://www.rfc-editor.org/info/rfc3465>. 2003, <https://www.rfc-editor.org/info/rfc3465>.
[20] Fenner, B., "Experimental Values In IPv4, IPv6, ICMPv4, [21] Fenner, B., "Experimental Values In IPv4, IPv6, ICMPv4,
ICMPv6, UDP, and TCP Headers", RFC 4727, ICMPv6, UDP, and TCP Headers", RFC 4727,
DOI 10.17487/RFC4727, November 2006, DOI 10.17487/RFC4727, November 2006,
<https://www.rfc-editor.org/info/rfc4727>. <https://www.rfc-editor.org/info/rfc4727>.
[21] Mathis, M. and J. Heffner, "Packetization Layer Path MTU [22] Mathis, M. and J. Heffner, "Packetization Layer Path MTU
Discovery", RFC 4821, DOI 10.17487/RFC4821, March 2007, Discovery", RFC 4821, DOI 10.17487/RFC4821, March 2007,
<https://www.rfc-editor.org/info/rfc4821>. <https://www.rfc-editor.org/info/rfc4821>.
[22] Eddy, W., "TCP SYN Flooding Attacks and Common [23] Eddy, W., "TCP SYN Flooding Attacks and Common
Mitigations", RFC 4987, DOI 10.17487/RFC4987, August 2007, Mitigations", RFC 4987, DOI 10.17487/RFC4987, August 2007,
<https://www.rfc-editor.org/info/rfc4987>. <https://www.rfc-editor.org/info/rfc4987>.
[23] Touch, J., "Defending TCP Against Spoofing Attacks", [24] Touch, J., "Defending TCP Against Spoofing Attacks",
RFC 4953, DOI 10.17487/RFC4953, July 2007, RFC 4953, DOI 10.17487/RFC4953, July 2007,
<https://www.rfc-editor.org/info/rfc4953>. <https://www.rfc-editor.org/info/rfc4953>.
[24] Culley, P., Elzur, U., Recio, R., Bailey, S., and J. [25] Culley, P., Elzur, U., Recio, R., Bailey, S., and J.
Carrier, "Marker PDU Aligned Framing for TCP Carrier, "Marker PDU Aligned Framing for TCP
Specification", RFC 5044, DOI 10.17487/RFC5044, October Specification", RFC 5044, DOI 10.17487/RFC5044, October
2007, <https://www.rfc-editor.org/info/rfc5044>. 2007, <https://www.rfc-editor.org/info/rfc5044>.
[25] Gont, F., "TCP's Reaction to Soft Errors", RFC 5461, [26] Gont, F., "TCP's Reaction to Soft Errors", RFC 5461,
DOI 10.17487/RFC5461, February 2009, DOI 10.17487/RFC5461, February 2009,
<https://www.rfc-editor.org/info/rfc5461>. <https://www.rfc-editor.org/info/rfc5461>.
[26] StJohns, M., Atkinson, R., and G. Thomas, "Common [27] StJohns, M., Atkinson, R., and G. Thomas, "Common
Architecture Label IPv6 Security Option (CALIPSO)", Architecture Label IPv6 Security Option (CALIPSO)",
RFC 5570, DOI 10.17487/RFC5570, July 2009, RFC 5570, DOI 10.17487/RFC5570, July 2009,
<https://www.rfc-editor.org/info/rfc5570>. <https://www.rfc-editor.org/info/rfc5570>.
[27] Allman, M., Paxson, V., and E. Blanton, "TCP Congestion [28] Allman, M., Paxson, V., and E. Blanton, "TCP Congestion
Control", RFC 5681, DOI 10.17487/RFC5681, September 2009, Control", RFC 5681, DOI 10.17487/RFC5681, September 2009,
<https://www.rfc-editor.org/info/rfc5681>. <https://www.rfc-editor.org/info/rfc5681>.
[28] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust [29] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust
Header Compression (ROHC) Framework", RFC 5795, Header Compression (ROHC) Framework", RFC 5795,
DOI 10.17487/RFC5795, March 2010, DOI 10.17487/RFC5795, March 2010,
<https://www.rfc-editor.org/info/rfc5795>. <https://www.rfc-editor.org/info/rfc5795>.
[29] Touch, J., Mankin, A., and R. Bonica, "The TCP [30] Touch, J., Mankin, A., and R. Bonica, "The TCP
Authentication Option", RFC 5925, DOI 10.17487/RFC5925, Authentication Option", RFC 5925, DOI 10.17487/RFC5925,
June 2010, <https://www.rfc-editor.org/info/rfc5925>. June 2010, <https://www.rfc-editor.org/info/rfc5925>.
[30] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's [31] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's
Robustness to Blind In-Window Attacks", RFC 5961, Robustness to Blind In-Window Attacks", RFC 5961,
DOI 10.17487/RFC5961, August 2010, DOI 10.17487/RFC5961, August 2010,
<https://www.rfc-editor.org/info/rfc5961>. <https://www.rfc-editor.org/info/rfc5961>.
[31] Gont, F. and A. Yourtchenko, "On the Implementation of the [32] Gont, F. and A. Yourtchenko, "On the Implementation of the
TCP Urgent Mechanism", RFC 6093, DOI 10.17487/RFC6093, TCP Urgent Mechanism", RFC 6093, DOI 10.17487/RFC6093,
January 2011, <https://www.rfc-editor.org/info/rfc6093>. January 2011, <https://www.rfc-editor.org/info/rfc6093>.
[32] Gont, F., "Reducing the TIME-WAIT State Using TCP [33] Gont, F., "Reducing the TIME-WAIT State Using TCP
Timestamps", BCP 159, RFC 6191, DOI 10.17487/RFC6191, Timestamps", BCP 159, RFC 6191, DOI 10.17487/RFC6191,
April 2011, <https://www.rfc-editor.org/info/rfc6191>. April 2011, <https://www.rfc-editor.org/info/rfc6191>.
[33] Bashyam, M., Jethanandani, M., and A. Ramaiah, "TCP Sender [34] Bashyam, M., Jethanandani, M., and A. Ramaiah, "TCP Sender
Clarification for Persist Condition", RFC 6429, Clarification for Persist Condition", RFC 6429,
DOI 10.17487/RFC6429, December 2011, DOI 10.17487/RFC6429, December 2011,
<https://www.rfc-editor.org/info/rfc6429>. <https://www.rfc-editor.org/info/rfc6429>.
[34] Gont, F. and S. Bellovin, "Defending against Sequence [35] Gont, F. and S. Bellovin, "Defending against Sequence
Number Attacks", RFC 6528, DOI 10.17487/RFC6528, February Number Attacks", RFC 6528, DOI 10.17487/RFC6528, February
2012, <https://www.rfc-editor.org/info/rfc6528>. 2012, <https://www.rfc-editor.org/info/rfc6528>.
[35] Borman, D., "TCP Options and Maximum Segment Size (MSS)", [36] Borman, D., "TCP Options and Maximum Segment Size (MSS)",
RFC 6691, DOI 10.17487/RFC6691, July 2012, RFC 6691, DOI 10.17487/RFC6691, July 2012,
<https://www.rfc-editor.org/info/rfc6691>. <https://www.rfc-editor.org/info/rfc6691>.
[36] Touch, J., "Shared Use of Experimental TCP Options", [37] Touch, J., "Updated Specification of the IPv4 ID Field",
RFC 6864, DOI 10.17487/RFC6864, February 2013,
<https://www.rfc-editor.org/info/rfc6864>.
[38] Touch, J., "Shared Use of Experimental TCP Options",
RFC 6994, DOI 10.17487/RFC6994, August 2013, RFC 6994, DOI 10.17487/RFC6994, August 2013,
<https://www.rfc-editor.org/info/rfc6994>. <https://www.rfc-editor.org/info/rfc6994>.
[37] Borman, D., Braden, B., Jacobson, V., and R. [39] Borman, D., Braden, B., Jacobson, V., and R.
Scheffenegger, Ed., "TCP Extensions for High Performance", Scheffenegger, Ed., "TCP Extensions for High Performance",
RFC 7323, DOI 10.17487/RFC7323, September 2014, RFC 7323, DOI 10.17487/RFC7323, September 2014,
<https://www.rfc-editor.org/info/rfc7323>. <https://www.rfc-editor.org/info/rfc7323>.
[38] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP [40] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP
Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014,
<https://www.rfc-editor.org/info/rfc7413>. <https://www.rfc-editor.org/info/rfc7413>.
[39] Duke, M., Braden, R., Eddy, W., Blanton, E., and A. [41] Duke, M., Braden, R., Eddy, W., Blanton, E., and A.
Zimmermann, "A Roadmap for Transmission Control Protocol Zimmermann, "A Roadmap for Transmission Control Protocol
(TCP) Specification Documents", RFC 7414, (TCP) Specification Documents", RFC 7414,
DOI 10.17487/RFC7414, February 2015, DOI 10.17487/RFC7414, February 2015,
<https://www.rfc-editor.org/info/rfc7414>. <https://www.rfc-editor.org/info/rfc7414>.
[40] Black, D., Ed. and P. Jones, "Differentiated Services [42] Black, D., Ed. and P. Jones, "Differentiated Services
(Diffserv) and Real-Time Communication", RFC 7657, (Diffserv) and Real-Time Communication", RFC 7657,
DOI 10.17487/RFC7657, November 2015, DOI 10.17487/RFC7657, November 2015,
<https://www.rfc-editor.org/info/rfc7657>. <https://www.rfc-editor.org/info/rfc7657>.
[41] Fairhurst, G. and M. Welzl, "The Benefits of Using [43] Fairhurst, G. and M. Welzl, "The Benefits of Using
Explicit Congestion Notification (ECN)", RFC 8087, Explicit Congestion Notification (ECN)", RFC 8087,
DOI 10.17487/RFC8087, March 2017, DOI 10.17487/RFC8087, March 2017,
<https://www.rfc-editor.org/info/rfc8087>. <https://www.rfc-editor.org/info/rfc8087>.
[42] Fairhurst, G., Ed., Trammell, B., Ed., and M. Kuehlewind, [44] Fairhurst, G., Ed., Trammell, B., Ed., and M. Kuehlewind,
Ed., "Services Provided by IETF Transport Protocols and Ed., "Services Provided by IETF Transport Protocols and
Congestion Control Mechanisms", RFC 8095, Congestion Control Mechanisms", RFC 8095,
DOI 10.17487/RFC8095, March 2017, DOI 10.17487/RFC8095, March 2017,
<https://www.rfc-editor.org/info/rfc8095>. <https://www.rfc-editor.org/info/rfc8095>.
[43] Welzl, M., Tuexen, M., and N. Khademi, "On the Usage of [45] Welzl, M., Tuexen, M., and N. Khademi, "On the Usage of
Transport Features Provided by IETF Transport Protocols", Transport Features Provided by IETF Transport Protocols",
RFC 8303, DOI 10.17487/RFC8303, February 2018, RFC 8303, DOI 10.17487/RFC8303, February 2018,
<https://www.rfc-editor.org/info/rfc8303>. <https://www.rfc-editor.org/info/rfc8303>.
[44] Chown, T., Loughney, J., and T. Winters, "IPv6 Node [46] Chown, T., Loughney, J., and T. Winters, "IPv6 Node
Requirements", BCP 220, RFC 8504, DOI 10.17487/RFC8504, Requirements", BCP 220, RFC 8504, DOI 10.17487/RFC8504,
January 2019, <https://www.rfc-editor.org/info/rfc8504>. January 2019, <https://www.rfc-editor.org/info/rfc8504>.
[45] IANA, "Transmission Control Protocol (TCP) Parameters, [47] IANA, "Transmission Control Protocol (TCP) Parameters,
https://www.iana.org/assignments/tcp-parameters/tcp- https://www.iana.org/assignments/tcp-parameters/tcp-
parameters.xhtml", 2019. parameters.xhtml", 2019.
[46] IANA, "Transmission Control Protocol (TCP) Header Flags, [48] IANA, "Transmission Control Protocol (TCP) Header Flags,
https://www.iana.org/assignments/tcp-header-flags/tcp- https://www.iana.org/assignments/tcp-header-flags/tcp-
header-flags.xhtml", 2019. header-flags.xhtml", 2019.
[47] Gont, F., "Processing of IP Security/Compartment and [49] Gont, F., "Processing of IP Security/Compartment and
Precedence Information by TCP", draft-gont-tcpm-tcp- Precedence Information by TCP", draft-gont-tcpm-tcp-
seccomp-prec-00 (work in progress), March 2012. seccomp-prec-00 (work in progress), March 2012.
[48] Gont, F. and D. Borman, "On the Validation of TCP Sequence [50] Gont, F. and D. Borman, "On the Validation of TCP Sequence
Numbers", draft-gont-tcpm-tcp-seq-validation-02 (work in Numbers", draft-gont-tcpm-tcp-seq-validation-02 (work in
progress), March 2015. progress), March 2015.
[49] Bittau, A., Giffin, D., Handley, M., Mazieres, D., Slack, [51] Bittau, A., Giffin, D., Handley, M., Mazieres, D., Slack,
Q., and E. Smith, "Cryptographic protection of TCP Streams Q., and E. Smith, "Cryptographic protection of TCP Streams
(tcpcrypt)", draft-ietf-tcpinc-tcpcrypt-09 (work in (tcpcrypt)", draft-ietf-tcpinc-tcpcrypt-09 (work in
progress), November 2017. progress), November 2017.
[50] Touch, J. and W. Eddy, "TCP Extended Data Offset Option", [52] Touch, J. and W. Eddy, "TCP Extended Data Offset Option",
draft-ietf-tcpm-tcp-edo-10 (work in progress), July 2018. draft-ietf-tcpm-tcp-edo-10 (work in progress), July 2018.
[51] Minshall, G., "A Proposed Modification to Nagle's [53] Minshall, G., "A Proposed Modification to Nagle's
Algorithm", draft-minshall-nagle-01 (work in progress), Algorithm", draft-minshall-nagle-01 (work in progress),
June 1999. June 1999.
[52] Dalal, Y. and C. Sunshine, "Connection Management in [54] Dalal, Y. and C. Sunshine, "Connection Management in
Transport Protocols", Computer Networks Vol. 2, No. 6, pp. Transport Protocols", Computer Networks Vol. 2, No. 6, pp.
454-473, December 1978. 454-473, December 1978.
Appendix A. Other Implementation Notes Appendix A. Other Implementation Notes
This section includes additional notes and references on TCP This section includes additional notes and references on TCP
implementation decisions that are currently not a part of the RFC implementation decisions that are currently not a part of the RFC
series or included within the TCP standard. These items can be series or included within the TCP standard. These items can be
considered by implementers, but there was not yet a consensus to considered by implementers, but there was not yet a consensus to
include them in the standard. include them in the standard.
skipping to change at page 100, line 9 skipping to change at page 100, line 25
on incoming TCP segments for consistency within a connection, and on incoming TCP segments for consistency within a connection, and
with application requests. Each of these aspects of IP have become with application requests. Each of these aspects of IP have become
outdated, without specific updates to RFC 793. The issues with outdated, without specific updates to RFC 793. The issues with
precedence were fixed by [18], which is Standards Track, and so this precedence were fixed by [18], which is Standards Track, and so this
present TCP specification includes those changes. However, the state present TCP specification includes those changes. However, the state
of IP security options that may be used by MLS systems is not as of IP security options that may be used by MLS systems is not as
clean. clean.
Reseting connections when incoming packets do not meet expected Reseting connections when incoming packets do not meet expected
security compartment or precedence expectations has been recognized security compartment or precedence expectations has been recognized
as a possible attack vector [47], and there has been discussion about as a possible attack vector [49], and there has been discussion about
ammending the TCP specification to prevent connections from being ammending the TCP specification to prevent connections from being
aborted due to non-matching IP security compartment and DiffServ aborted due to non-matching IP security compartment and DiffServ
codepoint values. codepoint values.
A.1.1. Precedence A.1.1. Precedence
In DiffServ the former precedence values are treated as Class In DiffServ the former precedence values are treated as Class
Selector codepoints, and methods for compatible treatment are Selector codepoints, and methods for compatible treatment are
described in the DiffServ architecture. The RFC 793/1122 TCP described in the DiffServ architecture. The RFC 793/1122 TCP
specification includes logic intending to have connections use the specification includes logic intending to have connections use the
highest precedence requested by either endpoint application, and to highest precedence requested by either endpoint application, and to
keep the precedence consistent throughout a connection. This logic keep the precedence consistent throughout a connection. This logic
from the obsolete TOS is not applicable for DiffServ, and should not from the obsolete TOS is not applicable for DiffServ, and should not
be included in TCP implementations, though changes to DiffServ values be included in TCP implementations, though changes to DiffServ values
within a connection are discouraged. For discussion of this, see RFC within a connection are discouraged. For discussion of this, see RFC
7657 (sec 5.1, 5.3, and 6) [40]. 7657 (sec 5.1, 5.3, and 6) [42].
The obsoleted TOS processing rules in TCP assumed bidirectional (or The obsoleted TOS processing rules in TCP assumed bidirectional (or
symmetric) precedence values used on a connection, but the DiffServ symmetric) precedence values used on a connection, but the DiffServ
architecture is asymmetric. Problems with the old TCP logic in this architecture is asymmetric. Problems with the old TCP logic in this
regard were described in [18] and the solution described is to ignore regard were described in [18] and the solution described is to ignore
IP precedence in TCP. Since RFC 2873 is a Standards Track document IP precedence in TCP. Since RFC 2873 is a Standards Track document
(although not marked as updating RFC 793), current implementations (although not marked as updating RFC 793), current implementations
are expected to be robust to these conditions. Note that the are expected to be robust to these conditions. Note that the
DiffServ field value used in each direction is a part of the DiffServ field value used in each direction is a part of the
interface between TCP and the network layer, and values in use can be interface between TCP and the network layer, and values in use can be
indicated both ways between TCP and the application. indicated both ways between TCP and the application.
A.1.2. MLS Systems A.1.2. MLS Systems
The IP security option (IPSO) and compartment defined in [1] was The IP security option (IPSO) and compartment defined in [1] was
refined in RFC 1038 that was later obsoleted by RFC 1108. The refined in RFC 1038 that was later obsoleted by RFC 1108. The
Commercial IP Security Option (CIPSO) is defined in FIPS-188, and is Commercial IP Security Option (CIPSO) is defined in FIPS-188, and is
supported by some vendors and operating systems. RFC 1108 is now supported by some vendors and operating systems. RFC 1108 is now
Historic, though RFC 791 itself has not been updated to remove the IP Historic, though RFC 791 itself has not been updated to remove the IP
security option. For IPv6, a similar option (CALIPSO) has been security option. For IPv6, a similar option (CALIPSO) has been
defined [26]. RFC 793 includes logic that includes the IP security/ defined [27]. RFC 793 includes logic that includes the IP security/
compartment information in treatment of TCP segments. References to compartment information in treatment of TCP segments. References to
the IP "security/compartment" in this document may be relevant for the IP "security/compartment" in this document may be relevant for
Multi-Level Secure (MLS) system implementers, but can be ignored for Multi-Level Secure (MLS) system implementers, but can be ignored for
non-MLS implementations, consistent with running code on the non-MLS implementations, consistent with running code on the
Internet. See Appendix A.1 for further discussion. Note that RFC Internet. See Appendix A.1 for further discussion. Note that RFC
5570 describes some MLS networking scenarios where IPSO, CIPSO, or 5570 describes some MLS networking scenarios where IPSO, CIPSO, or
CALIPSO may be used. In these special cases, TCP implementers should CALIPSO may be used. In these special cases, TCP implementers should
see section 7.3.1 of RFC 5570, and follow the guidance in that see section 7.3.1 of RFC 5570, and follow the guidance in that
document. document.
A.2. Sequence Number Validation A.2. Sequence Number Validation
There are cases where the TCP sequence number validation rules can There are cases where the TCP sequence number validation rules can
prevent ACK fields from being processed. This can result in prevent ACK fields from being processed. This can result in
connection issues, as described in [48], which includes descriptions connection issues, as described in [50], which includes descriptions
of potential problems in conditions of simultaneous open, self- of potential problems in conditions of simultaneous open, self-
connects, simultaneous close, and simultaneous window probes. The connects, simultaneous close, and simultaneous window probes. The
document also describes potential changes to the TCP specification to document also describes potential changes to the TCP specification to
mitigate the issue by expanding the acceptable sequence numbers. mitigate the issue by expanding the acceptable sequence numbers.
In Internet usage of TCP, these conditions are rarely occuring. In Internet usage of TCP, these conditions are rarely occuring.
Common operating systems include different alternative mitigations, Common operating systems include different alternative mitigations,
and the standard has not been updated yet to codify one of them, but and the standard has not been updated yet to codify one of them, but
implementers should consider the problems described in [48]. implementers should consider the problems described in [50].
A.3. Nagle Modification A.3. Nagle Modification
In common operating systems, both the Nagle algorithm and delayed In common operating systems, both the Nagle algorithm and delayed
acknowledgements are implemented and enabled by default. TCP is used acknowledgements are implemented and enabled by default. TCP is used
by many applications that have a request-response style of by many applications that have a request-response style of
communication, where the combination of the Nagle algorithm and communication, where the combination of the Nagle algorithm and
delayed acknowledgements can result in poor application performance. delayed acknowledgements can result in poor application performance.
A modification to the Nagle algorithm is described in [51] that A modification to the Nagle algorithm is described in [53] that
improves the situation for these applications. improves the situation for these applications.
This modification is implemented in some common operating systems, This modification is implemented in some common operating systems,
and does not impact TCP interoperability. Additionally, many and does not impact TCP interoperability. Additionally, many
applications simply disable Nagle, since this is generally supported applications simply disable Nagle, since this is generally supported
by a socket option. The TCP standard has not been updated to include by a socket option. The TCP standard has not been updated to include
this Nagle modification, but implementers may find it beneficial to this Nagle modification, but implementers may find it beneficial to
consider. consider.
A.4. Low Water Mark Settings A.4. Low Water Mark Settings
 End of changes. 110 change blocks. 
148 lines changed or deleted 176 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/