draft-ietf-tcpm-1323bis-06.txt   draft-ietf-tcpm-1323bis-07.txt 
TCP Maintenance (TCPM) D. Borman TCP Maintenance (TCPM) D. Borman
Internet-Draft Quantum Corporation Internet-Draft Quantum Corporation
Intended status: Standards Track B. Braden Intended status: Standards Track B. Braden
Expires: August 29, 2013 University of Southern Expires: September 22, 2013 University of Southern
California California
V. Jacobson V. Jacobson
Packet Design Packet Design
R. Scheffenegger, Ed. R. Scheffenegger, Ed.
NetApp, Inc. NetApp, Inc.
February 25, 2013 March 21, 2013
TCP Extensions for High Performance TCP Extensions for High Performance
draft-ietf-tcpm-1323bis-06 draft-ietf-tcpm-1323bis-07
Abstract Abstract
This document specifies a set of TCP extensions to improve This document specifies a set of TCP extensions to improve
performance over paths with a large bandwidth*delay product and to performance over paths with a large bandwidth * delay product and to
provide reliable operation over very high-speed paths. It defines provide reliable operation over very high-speed paths. It defines
TCP options for scaled windows and timestamps. The timestamps are TCP options for scaled windows and timestamps. The timestamps are
used for two distinct mechanisms, RTTM (Round Trip Time Measurement) used for two distinct mechanisms, RTTM (Round Trip Time Measurement)
and PAWS (Protection Against Wrapped Sequences). and PAWS (Protection Against Wrapped Sequences).
This document updates and obsoletes RFC 1323. This document updates and obsoletes RFC 1323.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
skipping to change at page 1, line 43 skipping to change at page 1, line 43
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 http://datatracker.ietf.org/drafts/current/. Drafts is at http://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 August 29, 2013. This Internet-Draft will expire on September 22, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://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
skipping to change at page 3, line 11 skipping to change at page 3, line 11
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
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. TCP Performance . . . . . . . . . . . . . . . . . . . . . 4 1.1. TCP Performance . . . . . . . . . . . . . . . . . . . . . 4
1.2. TCP Reliability . . . . . . . . . . . . . . . . . . . . . 5 1.2. TCP Reliability . . . . . . . . . . . . . . . . . . . . . 5
1.3. Using TCP options . . . . . . . . . . . . . . . . . . . . 6 1.3. Using TCP options . . . . . . . . . . . . . . . . . . . . 6
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4. Terminology . . . . . . . . . . . . . . . . . . . . . . . 7
3. TCP Window Scale Option . . . . . . . . . . . . . . . . . . . 7 2. TCP Window Scale Option . . . . . . . . . . . . . . . . . . . 8
3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 7 2.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 8
3.2. Window Scale Option . . . . . . . . . . . . . . . . . . . 7 2.2. Window Scale Option . . . . . . . . . . . . . . . . . . . 8
3.3. Using the Window Scale Option . . . . . . . . . . . . . . 8 2.3. Using the Window Scale Option . . . . . . . . . . . . . . 9
3.4. Addressing Window Retraction . . . . . . . . . . . . . . . 10 2.4. Addressing Window Retraction . . . . . . . . . . . . . . . 10
4. RTTM -- Round-Trip Time Measurement . . . . . . . . . . . . . 11 3. RTTM -- Round-Trip Time Measurement . . . . . . . . . . . . . 12
4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 11 3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 12
4.2. TCP Timestamps Option . . . . . . . . . . . . . . . . . . 12 3.2. TCP Timestamps Option . . . . . . . . . . . . . . . . . . 13
4.3. The RTTM Mechanism . . . . . . . . . . . . . . . . . . . . 13 3.3. The RTTM Mechanism . . . . . . . . . . . . . . . . . . . . 14
4.4. Which Timestamp to Echo . . . . . . . . . . . . . . . . . 14 3.4. Which Timestamp to Echo . . . . . . . . . . . . . . . . . 15
5. PAWS -- Protection Against Wrapped Sequence Numbers . . . . . 17 4. PAWS -- Protection Against Wrapped Sequence Numbers . . . . . 18
5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 17 4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 18
5.2. The PAWS Mechanism . . . . . . . . . . . . . . . . . . . . 17 4.2. The PAWS Mechanism . . . . . . . . . . . . . . . . . . . . 18
5.2.1. Basic PAWS Algorithm . . . . . . . . . . . . . . . . . 18 4.3. Basic PAWS Algorithm . . . . . . . . . . . . . . . . . . . 19
5.2.2. Timestamp Clock . . . . . . . . . . . . . . . . . . . 20 4.4. Timestamp Clock . . . . . . . . . . . . . . . . . . . . . 21
5.2.3. Outdated Timestamps . . . . . . . . . . . . . . . . . 22 4.5. Outdated Timestamps . . . . . . . . . . . . . . . . . . . 23
5.2.4. Header Prediction . . . . . . . . . . . . . . . . . . 22 4.6. Header Prediction . . . . . . . . . . . . . . . . . . . . 23
5.2.5. IP Fragmentation . . . . . . . . . . . . . . . . . . . 24 4.7. IP Fragmentation . . . . . . . . . . . . . . . . . . . . . 25
5.3. Duplicates from Earlier Incarnations of Connection . . . . 24 4.8. Duplicates from Earlier Incarnations of Connection . . . . 25
6. Conclusions and Acknowledgements . . . . . . . . . . . . . . . 24 5. Conclusions and Acknowledgements . . . . . . . . . . . . . . . 25
7. Security Considerations . . . . . . . . . . . . . . . . . . . 25 6. Security Considerations . . . . . . . . . . . . . . . . . . . 26
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 27
9.1. Normative References . . . . . . . . . . . . . . . . . . . 26 8.1. Normative References . . . . . . . . . . . . . . . . . . . 27
9.2. Informative References . . . . . . . . . . . . . . . . . . 26 8.2. Informative References . . . . . . . . . . . . . . . . . . 27
Appendix A. Implementation Suggestions . . . . . . . . . . . . . 28 Appendix A. Implementation Suggestions . . . . . . . . . . . . . 29
Appendix B. Duplicates from Earlier Connection Incarnations . . . 29 Appendix B. Duplicates from Earlier Connection Incarnations . . . 30
B.1. System Crash with Loss of State . . . . . . . . . . . . . 30 B.1. System Crash with Loss of State . . . . . . . . . . . . . 31
B.2. Closing and Reopening a Connection . . . . . . . . . . . . 30 B.2. Closing and Reopening a Connection . . . . . . . . . . . . 31
Appendix C. Summary of Notation . . . . . . . . . . . . . . . . . 31 Appendix C. Summary of Notation . . . . . . . . . . . . . . . . . 32
Appendix D. Pseudo-code Summary . . . . . . . . . . . . . . . . . 32 Appendix D. Event Processing Summary . . . . . . . . . . . . . . 33
Appendix E. Event Processing Summary . . . . . . . . . . . . . . 34 Appendix E. Timestamps Edge Cases . . . . . . . . . . . . . . . . 39
Appendix F. Timestamps Edge Cases . . . . . . . . . . . . . . . . 40 Appendix F. Changes from RFC 1323 . . . . . . . . . . . . . . . . 40
Appendix G. Changes from RFC 1072, RFC 1185, and RFC 1323 . . . . 40 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 41
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 43
1. Introduction 1. Introduction
The TCP protocol [RFC0793] was designed to operate reliably over The TCP protocol [RFC0793] was designed to operate reliably over
almost any transmission medium regardless of transmission rate, almost any transmission medium regardless of transmission rate,
delay, corruption, duplication, or reordering of segments. Over the delay, corruption, duplication, or reordering of segments. Over the
years, advances in networking technology has resulted in ever-higher years, advances in networking technology has resulted in ever-higher
transmission speeds, and the fastest paths are well beyond the domain transmission speeds, and the fastest paths are well beyond the domain
for which TCP was originally engineered. for which TCP was originally engineered.
This document defines a set of modest extensions to TCP to extend the This document defines a set of modest extensions to TCP to extend the
domain of its application to match the increasing network capability. domain of its application to match the increasing network capability.
It is an update to and obsoletes [RFC1323], which in turn is based It is an update to and obsoletes [RFC1323], which in turn is based
upon and obsoletes [RFC1072] and [RFC1185]. upon and obsoletes [RFC1072] and [RFC1185].
For brevity, the full discussions of the merits and history behind For brevity, the full discussions of the merits and history behind
the TCP options defined within this document have been omitted. the TCP options defined within this document have been omitted.
[RFC1323] should be consulted for reference. A modern TCP [RFC1323] should be consulted for reference. It is recommended that
implementation SHOULD implement and make use of the extensions a modern TCP stack implements and make use of the extensions
described in this document. described in this document.
1.1. TCP Performance 1.1. TCP Performance
TCP performance problems arise when the bandwidth*delay product is TCP performance problems arise when the bandwidth * delay product is
large. A network having such paths is referred to as "long, fat large. A network having such paths is referred to as "long, fat
network" (LFN). network" (LFN).
There are three fundamental performance problems with the current TCP There are three fundamental performance problems with basic TCP over
over LFN paths: LFN paths:
(1) Window Size Limit (1) Window Size Limit
The TCP header uses a 16 bit field to report the receive window The TCP header uses a 16 bit field to report the receive window
size to the sender. Therefore, the largest window that can be size to the sender. Therefore, the largest window that can be
used is 2^16 = 65K bytes. used is 2^16 = 65K bytes.
To circumvent this problem, Section 2 of this memo defines a new To circumvent this problem, Section 2 of this memo defines a TCP
TCP option, "Window Scale", to allow windows larger than 2^16. option, "Window Scale", to allow windows larger than 2^16. This
This option defines an implicit scale factor, which is used to option defines an implicit scale factor, which is used to
multiply the window size value found in a TCP header to obtain multiply the window size value found in a TCP header to obtain
the true window size. the true window size.
(2) Recovery from Losses (2) Recovery from Losses
Packet losses in an LFN can have a catastrophic effect on Packet losses in an LFN can have a catastrophic effect on
throughput. throughput.
To generalize the Fast Retransmit/Fast Recovery mechanism to To generalize the Fast Retransmit/Fast Recovery mechanism to
handle multiple packets dropped per window, selective handle multiple packets dropped per window, selective
skipping to change at page 5, line 24 skipping to change at page 5, line 24
(3) Round-Trip Measurement (3) Round-Trip Measurement
TCP implements reliable data delivery by retransmitting segments TCP implements reliable data delivery by retransmitting segments
that are not acknowledged within some retransmission timeout that are not acknowledged within some retransmission timeout
(RTO) interval. Accurate dynamic determination of an (RTO) interval. Accurate dynamic determination of an
appropriate RTO is essential to TCP performance. RTO is appropriate RTO is essential to TCP performance. RTO is
determined by estimating the mean and variance of the measured determined by estimating the mean and variance of the measured
round-trip time (RTT), i.e., the time interval between sending a round-trip time (RTT), i.e., the time interval between sending a
segment and receiving an acknowledgment for it [Jacobson88a]. segment and receiving an acknowledgment for it [Jacobson88a].
Section 4.2 introduces a new TCP option, "Timestamps", and then Section 3.2 defines a TCP option, "Timestamps", and then
defines a mechanism using this option that allows nearly every specifies a mechanism using this option that allows nearly every
segment, including retransmissions, to be timed at negligible segment, including retransmissions, to be timed at negligible
computational cost. We use the mnemonic RTTM (Round Trip Time computational cost. We use the mnemonic RTTM (Round Trip Time
Measurement) for this mechanism, to distinguish it from other Measurement) for this mechanism, to distinguish it from other
uses of the Timestamps option. uses of the Timestamps option.
1.2. TCP Reliability 1.2. TCP Reliability
An especially serious kind of error may result from an accidental An especially serious kind of error may result from an accidental
reuse of TCP sequence numbers in data segments. TCP reliability reuse of TCP sequence numbers in data segments. TCP reliability
depends upon the existence of a bound on the lifetime of a segment: depends upon the existence of a bound on the lifetime of a segment:
skipping to change at page 6, line 7 skipping to change at page 6, line 7
(2) Earlier incarnation of the connection (2) Earlier incarnation of the connection
Suppose that a connection terminates, either by a proper close Suppose that a connection terminates, either by a proper close
sequence or due to a host crash, and the same connection (i.e., sequence or due to a host crash, and the same connection (i.e.,
using the same pair of port numbers) is immediately reopened. A using the same pair of port numbers) is immediately reopened. A
delayed segment from the terminated connection could fall within delayed segment from the terminated connection could fall within
the current window for the new incarnation and be accepted as the current window for the new incarnation and be accepted as
valid. valid.
Duplicates from earlier incarnations, Case (2), are avoided by Duplicates from earlier incarnations, case (2), are avoided by
enforcing the current fixed MSL of the TCP spec, as explained in enforcing the current fixed MSL of the TCP specification, as
Section 5.3 and Appendix B. However, case (1), avoiding the reuse of explained in Section 4.8 and Appendix B. However, case (1), avoiding
sequence numbers within the same connection, requires an MSL bound the reuse of sequence numbers within the same connection, requires an
that depends upon the transfer rate, and at high enough rates, a new upper bound on MSL that depends upon the transfer rate, and at high
mechanism is required. enough rates, a dedicated mechanism is required.
A possible fix for the problem of cycling the sequence space would be A possible fix for the problem of cycling the sequence space would be
to increase the size of the TCP sequence number field. For example, to increase the size of the TCP sequence number field. For example,
the sequence number field (and also the acknowledgment field) could the sequence number field (and also the acknowledgment field) could
be expanded to 64 bits. This could be done either by changing the be expanded to 64 bits. This could be done either by changing the
TCP header or by means of an additional option. TCP header or by means of an additional option.
Section 5 presents a different mechanism, which we call PAWS Section 4 presents a different mechanism, which we call PAWS
(Protection Against Wrapped Sequence numbers), to extend TCP (Protection Against Wrapped Sequence numbers), to extend TCP
reliability to transfer rates well beyond the foreseeable upper limit reliability to transfer rates well beyond the foreseeable upper limit
of network bandwidths. PAWS uses the TCP Timestamps option defined of network bandwidths. PAWS uses the TCP timestamp option defined in
in Section 4.2 to protect against old duplicates from the same Section 3.2 to protect against old duplicates from the same
connection. connection.
1.3. Using TCP options 1.3. Using TCP options
The extensions defined in this document all use new TCP options. The extensions defined in this document all use TCP options.
When RFC 1323 was published, there was concern that some buggy TCP When [RFC1323] was published, there was concern that some buggy TCP
implementation might be crashed by the first appearance of an option implementation might be crashed by the first appearance of an option
on a non-SYN segment. However, bugs like that can lead to DOS on a non-<SYN> segment. However, bugs like that can lead to DOS
attacks against a TCP, so it is now expected that most TCP attacks against a TCP, so it is now expected that most TCP
implementations will properly handle unknown options on non-SYN implementations will properly handle unknown options on non-<SYN>
segments. But it is still prudent to be conservative in what you segments. But it is still prudent to be conservative in what you
send, and avoiding buggy TCP implementation is not the only reason send, and avoiding buggy TCP implementation is not the only reason
for negotiating TCP options on SYN segments. Therefore, for each of for negotiating TCP options on <SYN> segments.
the extensions defined below, it is recommended that TCP options will
be sent on non-SYN segments only after an exchange of options on the
SYN segments has indicated that both sides understand the extension.
Furthermore, an extension option will be sent in a <SYN,ACK> segment
only if the corresponding option was received in the initial <SYN>
segment.
The timestamps option may appear in any data or ACK segment, adding The window scale option negotiates fundamental parameters of the TCP
12 bytes to the 20-byte TCP header. We believe that the bandwidth session. Therefore, it is only sent during the initial handshake.
saved by reducing unnecessary retransmission timeouts will more than Furthermore, the window scale option will be sent in a <SYN,ACK>
pay for the extra header bandwidth. segment only if the corresponding option was received in the initial
<SYN> segment.
The timestamp option may appear in any data or <ACK> segment, adding
12 bytes to the 20-byte TCP header. We recognize there is a trade-
off between the bandwidth saved by reducing unnecessary
retransmission timeouts, and the extra header bandwidth used by this
option. It is required that this TCP option will be sent on non-
<SYN> segments only after an exchange of options on the <SYN>
segments has indicated that both sides understand this extension.
Appendix A contains a recommended layout of the options in TCP Appendix A contains a recommended layout of the options in TCP
headers to achieve reasonable data field alignment. headers to achieve reasonable data field alignment.
Finally, we observe that most of the mechanisms defined in this memo Finally, we observe that most of the mechanisms defined in this memo
are important for LFN's and/or very high-speed networks. For low- are important for LFN's and/or very high-speed networks. For low-
speed networks, it might be a performance optimization to NOT use speed networks, it might be a performance optimization to NOT use
these mechanisms. A TCP vendor concerned about optimal performance these mechanisms. A TCP vendor concerned about optimal performance
over low-speed paths might consider turning these extensions off for over low-speed paths might consider turning these extensions off for
low-speed paths, or allow a user or installation manager to disable low-speed paths, or allow a user or installation manager to disable
them. them.
2. Terminology 1.4. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
3. TCP Window Scale Option In this document, these words will appear with that interpretation
only when in UPPER CASE. Lower case uses of these words are not to
be interpreted as carrying [RFC2119] significance.
3.1. Introduction 2. TCP Window Scale Option
2.1. Introduction
The window scale extension expands the definition of the TCP window The window scale extension expands the definition of the TCP window
to 32 bits and then uses a scale factor to carry this 32-bit value in to 32 bits and then uses a scale factor to carry this 32-bit value in
the 16-bit Window field of the TCP header (SEG.WND in RFC 793). The the 16-bit Window field of the TCP header (SEG.WND in RFC 793). The
scale factor is carried in a new TCP option, Window Scale. This scale factor is carried in a TCP option, Window Scale. This option
option is sent only in a SYN segment (a segment with the SYN bit on), is sent only in a <SYN> segment (a segment with the SYN bit on),
hence the window scale is fixed in each direction when a connection hence the window scale is fixed in each direction when a connection
is opened. is opened.
The maximum receive window, and therefore the scale factor, is The maximum receive window, and therefore the scale factor, is
determined by the maximum receive buffer space. In a typical modern determined by the maximum receive buffer space. In a typical modern
implementation, this maximum buffer space is set by default but can implementation, this maximum buffer space is set by default but can
be overridden by a user program before a TCP connection is opened. be overridden by a user program before a TCP connection is opened.
This determines the scale factor, and therefore no new user interface This determines the scale factor, and therefore no new user interface
is needed for window scaling. is needed for window scaling.
3.2. Window Scale Option 2.2. Window Scale Option
The three-byte Window Scale option MAY be sent in a SYN segment by a The three-byte Window Scale option MAY be sent in a <SYN> segment by
TCP. It has two purposes: (1) indicate that the TCP is prepared to a TCP. It has two purposes: (1) indicate that the TCP is prepared to
do both send and receive window scaling, and (2) communicate a scale do both send and receive window scaling, and (2) communicate a scale
factor to be applied to its receive window. Thus, a TCP that is factor to be applied to its receive window. Thus, a TCP that is
prepared to scale windows SHOULD send the option, even if its own prepared to scale windows SHOULD send the option, even if its own
scale factor is 1. The scale factor is limited to a power of two and scale factor is 1. The scale factor is limited to a power of two and
encoded logarithmically, so it may be implemented by binary shift encoded logarithmically, so it may be implemented by binary shift
operations. operations.
TCP Window Scale Option (WSopt): TCP Window Scale Option (WSopt):
Kind: 3 Kind: 3
Length: 3 bytes Length: 3 bytes
+---------+---------+---------+ +---------+---------+---------+
| Kind=3 |Length=3 |shift.cnt| | Kind=3 |Length=3 |shift.cnt|
+---------+---------+---------+ +---------+---------+---------+
1 1 1 1 1 1
This option is an offer, not a promise; both sides MUST send Window This option is an offer, not a promise; both sides MUST send Window
Scale options in their SYN segments to enable window scaling in Scale options in their <SYN> segments to enable window scaling in
either direction. If window scaling is enabled, then the TCP that either direction. If window scaling is enabled, then the TCP that
sent this option will right-shift its true receive-window values by sent this option will right-shift its true receive-window values by
'shift.cnt' bits for transmission in SEG.WND. The value 'shift.cnt' 'shift.cnt' bits for transmission in SEG.WND. The value 'shift.cnt'
MAY be zero (offering to scale, while applying a scale factor of 1 to MAY be zero (offering to scale, while applying a scale factor of 1 to
the receive window). the receive window).
This option MAY be sent in an initial <SYN> segment (i.e., a segment This option MAY be sent in an initial <SYN> segment (i.e., a segment
with the SYN bit on and the ACK bit off). It MAY also be sent in a with the SYN bit on and the ACK bit off). It MAY also be sent in a
<SYN,ACK> segment, but only if a Window Scale option was received in <SYN,ACK> segment, but only if a Window Scale option was received in
the initial <SYN> segment. A Window Scale option in a segment the initial <SYN> segment. A Window Scale option in a segment
without a SYN bit SHOULD be ignored. without a SYN bit SHOULD be ignored.
The Window field in a SYN (i.e., a <SYN> or <SYN,ACK>) segment itself The window field in a segment where the SYN bit is set (i.e., a <SYN>
is never scaled. or <SYN,ACK>) is never scaled.
3.3. Using the Window Scale Option 2.3. Using the Window Scale Option
A model implementation of window scaling is as follows, using the A model implementation of window scaling is as follows, using the
notation of [RFC0793]: notation of [RFC0793]:
o All windows are treated as 32-bit quantities for storage in the o All windows are treated as 32-bit quantities for storage in the
connection control block and for local calculations. This connection control block and for local calculations. This
includes the send-window (SND.WND) and the receive-window includes the send-window (SND.WND) and the receive-window
(RCV.WND) values, as well as the congestion window. (RCV.WND) values, as well as the congestion window.
o The connection state is augmented by two window shift counts, o The connection state is augmented by two window shift counts,
Snd.Wind.Scale and Rcv.Wind.Scale, to be applied to the incoming Snd.Wind.Scale and Rcv.Wind.Scale, to be applied to the incoming
and outgoing window fields, respectively. and outgoing window fields, respectively.
o If a TCP receives a <SYN> segment containing a Window Scale o If a TCP receives a <SYN> segment containing a Window Scale
option, it sends its own Window Scale option in the <SYN,ACK> option, it sends its own Window Scale option in the <SYN,ACK>
segment. segment.
o The Window Scale option is sent with shift.cnt = R, where R is the o The Window Scale option is sent with shift.cnt = R, where R is the
value that the TCP would like to use for its receive window. value that the TCP would like to use for its receive window.
o Upon receiving a SYN segment with a Window Scale option containing o Upon receiving a <SYN> segment with a Window Scale option
shift.cnt = S, a TCP sets Snd.Wind.Scale to S and sets containing shift.cnt = S, a TCP sets Snd.Wind.Scale to S and sets
Rcv.Wind.Scale to R; otherwise, it sets both Snd.Wind.Scale and Rcv.Wind.Scale to R; otherwise, it sets both Snd.Wind.Scale and
Rcv.Wind.Scale to zero. Rcv.Wind.Scale to zero.
o The window field (SEG.WND) in the header of every incoming o The window field (SEG.WND) in the header of every incoming
segment, with the exception of SYN segments, is left-shifted by segment, with the exception of <SYN> segments, is left-shifted by
Snd.Wind.Scale bits before updating SND.WND: Snd.Wind.Scale bits before updating SND.WND:
SND.WND = SEG.WND << Snd.Wind.Scale SND.WND = SEG.WND << Snd.Wind.Scale
(assuming the other conditions of [RFC0793] are met, and using the (assuming the other conditions of [RFC0793] are met, and using the
"C" notation "<<" for left-shift). "C" notation "<<" for left-shift).
o The window field (SEG.WND) of every outgoing segment, with the o The window field (SEG.WND) of every outgoing segment, with the
exception of SYN segments, is right-shifted by Rcv.Wind.Scale exception of <SYN> segments, is right-shifted by Rcv.Wind.Scale
bits: bits:
SND.WND = RCV.WND >> Rcv.Wind.Scale SND.WND = RCV.WND >> Rcv.Wind.Scale
TCP determines if a data segment is "old" or "new" by testing whether TCP determines if a data segment is "old" or "new" by testing whether
its sequence number is within 2^31 bytes of the left edge of the its sequence number is within 2^31 bytes of the left edge of the
window, and if it is not, discarding the data as "old". To insure window, and if it is not, discarding the data as "old". To insure
that new data is never mistakenly considered old and vice versa, the that new data is never mistakenly considered old and vice versa, the
left edge of the sender's window has to be at most 2^31 away from the left edge of the sender's window has to be at most 2^31 away from the
right edge of the receiver's window. Similarly with the sender's right edge of the receiver's window. Similarly with the sender's
skipping to change at page 10, line 5 skipping to change at page 10, line 36
the TCP SHOULD log the error but use 14 instead of the specified the TCP SHOULD log the error but use 14 instead of the specified
value. value.
The scale factor applies only to the Window field as transmitted in The scale factor applies only to the Window field as transmitted in
the TCP header; each TCP using extended windows will maintain the the TCP header; each TCP using extended windows will maintain the
window values locally as 32-bit numbers. For example, the window values locally as 32-bit numbers. For example, the
"congestion window" computed by Slow Start and Congestion Avoidance "congestion window" computed by Slow Start and Congestion Avoidance
is not affected by the scale factor, so window scaling will not is not affected by the scale factor, so window scaling will not
introduce quantization into the congestion window. introduce quantization into the congestion window.
3.4. Addressing Window Retraction 2.4. Addressing Window Retraction
When a non-zero scale factor is in use, there are instances when a When a non-zero scale factor is in use, there are instances when a
retracted window can be offered [Mathis08]. The end of the window retracted window can be offered [Mathis08]. The end of the window
will be on a boundary based on the granularity of the scale factor will be on a boundary based on the granularity of the scale factor
being used. If the sequence number is then updated by a number of being used. If the sequence number is then updated by a number of
bytes smaller than that granularity, the TCP will have to either bytes smaller than that granularity, the TCP will have to either
advertise a new window that is beyond what it previously advertised advertise a new window that is beyond what it previously advertised
(and perhaps beyond the buffer), or will have to advertise a smaller (and perhaps beyond the buffer), or will have to advertise a smaller
window, which will cause the TCP window to shrink. Implementations window, which will cause the TCP window to shrink. Implementations
MUST ensure that they handle a shrinking window, as specified in MUST ensure that they handle a shrinking window, as specified in
section 4.2.2.16 of [RFC1122]. section 4.2.2.16 of [RFC1122].
For the receiver, this implies that: For the receiver, this implies that:
1) The receiver MUST honor, as in-window, any segment that would 1) The receiver MUST honor, as in-window, any segment that would
have been in-window for any ACK sent by the receiver. have been in-window for any <ACK> sent by the receiver.
2) When window scaling is in effect, the receiver SHOULD track the 2) When window scaling is in effect, the receiver SHOULD track the
actual maximum window sequence number (which is likely to be actual maximum window sequence number (which is likely to be
greater than the window announced by the most recent ACK, if more greater than the window announced by the most recent <ACK>, if
than one segment has arrived since the application consumed any more than one segment has arrived since the application consumed
data in the receive buffer). any data in the receive buffer).
On the sender side: On the sender side:
3) The initial transmission MUST honor window on most recent ACK. 3) The initial transmission MUST honor window on most recent <ACK>.
4) On first retransmission, or if the sequence number is out-of- 4) On first retransmission, or if the sequence number is out-of-
window by less than (2^Rcv.Wind.Scale) then do normal window by less than (2^Rcv.Wind.Scale) then do normal
retransmission(s) without regard to receiver window as long as retransmission(s) without regard to receiver window as long as
the original segment was in window when it was sent. the original segment was in window when it was sent.
5) On subsequent retransmissions, treat such ACKs as zero window 5) On subsequent retransmissions, treat such <ACK>s as zero window
probes. probes.
4. RTTM -- Round-Trip Time Measurement 3. RTTM -- Round-Trip Time Measurement
4.1. Introduction 3.1. Introduction
Accurate and current RTT estimates are necessary to adapt to changing Accurate and current RTT estimates are necessary to adapt to changing
traffic conditions and to avoid an instability known as "congestion traffic conditions and to avoid an instability known as "congestion
collapse" [RFC0896] in a busy network. However, accurate measurement collapse" [RFC0896] in a busy network. However, accurate measurement
of RTT may be difficult both in theory and in implementation. of RTT may be difficult both in theory and in implementation.
Many TCP implementations base their RTT measurements upon a sample of Many TCP implementations base their RTT measurements upon a sample of
one packet per window or less. While this yields an adequate one segment per window or less. While this yields an adequate
approximation to the RTT for small windows, it results in an approximation to the RTT for small windows, it results in an
unacceptably poor RTT estimate for a LFN. If we look at RTT unacceptably poor RTT estimate for a LFN. If we look at RTT
estimation as a signal processing problem (which it is), a data estimation as a signal processing problem (which it is), a data
signal at some frequency, the packet rate, is being sampled at a signal at some frequency, the packet rate, is being sampled at a
lower frequency, the window rate. This lower sampling frequency lower frequency, the window rate. This lower sampling frequency
violates Nyquist's criteria and may therefore introduce "aliasing" violates Nyquist's criteria and may therefore introduce "aliasing"
artifacts into the estimated RTT [Hamming77]. artifacts into the estimated RTT [Hamming77].
A good RTT estimator with a conservative retransmission timeout A good RTT estimator with a conservative retransmission timeout
calculation can tolerate aliasing when the sampling frequency is calculation can tolerate aliasing when the sampling frequency is
"close" to the data frequency. For example, with a window of 8 "close" to the data frequency. For example, with a window of 8
packets, the sample rate is 1/8 the data frequency -- less than an segments, the sample rate is 1/8 the data frequency -- less than an
order of magnitude different. However, when the window is tens or order of magnitude different. However, when the window is tens or
hundreds of packets, the RTT estimator may be seriously in error, hundreds of segments, the RTT estimator may be seriously in error,
resulting in spurious retransmissions. resulting in spurious retransmissions.
If there are dropped packets, the problem becomes worse. Zhang If there are dropped segments, the problem becomes worse. Zhang
[Zhang86], Jain [Jain86] and Karn [Karn87] have shown that it is not [Zhang86], Jain [Jain86] and Karn [Karn87] have shown that it is not
possible to accumulate reliable RTT estimates if retransmitted possible to accumulate reliable RTT estimates if retransmitted
segments are included in the estimate. Since a full window of data segments are included in the estimate. Since a full window of data
will have been transmitted prior to a retransmission, all of the will have been transmitted prior to a retransmission, all of the
segments in that window will have to be ACKed before the next RTT segments in that window will have to be ACKed before the next RTT
sample can be taken. This means at least an additional window's sample can be taken. This means at least an additional window's
worth of time between RTT measurements and, as the error rate worth of time between RTT measurements and, as the error rate
approaches one per window of data (e.g., 10^-6 errors per bit for the approaches one per window of data (e.g., 10^-6 errors per bit for the
Wideband satellite network), it becomes effectively impossible to Wideband satellite network), it becomes effectively impossible to
obtain a valid RTT measurement. obtain a valid RTT measurement.
A solution to these problems, which actually simplifies the sender A solution to these problems, which actually simplifies the sender
substantially, is as follows: using TCP options, the sender places a substantially, is as follows: using TCP options, the sender places a
timestamp in each data segment, and the receiver reflects these timestamp in each data segment, and the receiver reflects these
timestamps back in ACK segments. Then a single subtract gives the timestamps back in <ACK> segments. Then a single subtract gives the
sender an accurate RTT measurement for every ACK segment (which will sender an accurate RTT measurement for every <ACK> segment (which
correspond to every other data segment, with a sensible receiver). will correspond to every other data segment, with a sensible
We call this the RTTM (Round-Trip Time Measurement) mechanism. receiver). We call this the RTTM (Round-Trip Time Measurement)
mechanism.
It is vitally important to use the RTTM mechanism with big windows; It is vitally important to use the RTTM mechanism with big windows;
otherwise, the door is opened to some dangerous instabilities due to otherwise, the door is opened to some dangerous instabilities due to
aliasing. Furthermore, the option is probably useful for all TCP's, aliasing. Furthermore, the option is probably useful for all TCP's,
since it simplifies the sender. since it simplifies the sender.
4.2. TCP Timestamps Option 3.2. TCP Timestamps Option
TCP is a symmetric protocol, allowing data to be sent at any time in TCP is a symmetric protocol, allowing data to be sent at any time in
either direction, and therefore timestamp echoing may occur in either either direction, and therefore timestamp echoing may occur in either
direction. For simplicity and symmetry, we specify that timestamps direction. For simplicity and symmetry, we specify that timestamps
always be sent and echoed in both directions. For efficiency, we always be sent and echoed in both directions. For efficiency, we
combine the timestamp and timestamp reply fields into a single TCP combine the timestamp and timestamp reply fields into a single TCP
Timestamps Option. Timestamps Option.
TCP Timestamps Option (TSopt): TCP Timestamps Option (TSopt):
skipping to change at page 12, line 41 skipping to change at page 13, line 43
The Timestamp Echo Reply field (TSecr) is valid if the ACK bit is set The Timestamp Echo Reply field (TSecr) is valid if the ACK bit is set
in the TCP header; if it is valid, it echoes a timestamp value that in the TCP header; if it is valid, it echoes a timestamp value that
was sent by the remote TCP in the TSval field of a Timestamp option. was sent by the remote TCP in the TSval field of a Timestamp option.
When TSecr is not valid, its value MUST be zero. However, a value of When TSecr is not valid, its value MUST be zero. However, a value of
zero does not imply TSecr being invalid. The TSecr value will zero does not imply TSecr being invalid. The TSecr value will
generally be from the most recent Timestamps Option that was generally be from the most recent Timestamps Option that was
received; however, there are exceptions that are explained below. received; however, there are exceptions that are explained below.
A TCP MAY send the Timestamps option (TSopt) in an initial <SYN> A TCP MAY send the Timestamps option (TSopt) in an initial <SYN>
segment (i.e., a segment containing a SYN bit and no ACK bit). Once segment. When used, the Timestamp option SHOULD be negotiated during
a TSopt has been sent or received in a non <SYN> segment, it MUST be the initial <SYN> and <SYN,ACK> unless another mechanism allows to
sent in all segments. Once a TSopt has been received in a non <SYN> enable it during an established session. However, such a mechanism
segment, then any successive segment that is received without the RST is outside the scope of this document. When TSopt has been sent or
bit and without a TSopt MAY be dropped without further processing, received in a non-<SYN> segment, it MUST be sent in all segments.
and an ACK of the current SND.UNA generated. Once a TSopt has been received in a non-<SYN> segment, then any
successive segment that is received without the RST bit and without a
TSopt MAY be dropped without further processing, and an <ACK> of the
current SND.UNA generated.
In the case of crossing SYN packets where one SYN contains a TSopt In the case of crossing <SYN> segments where one <SYN> contains a
and the other doesn't, both sides SHOULD put a TSopt in the <SYN,ACK> TSopt and the other doesn't, both sides SHOULD put a TSopt in the
segment. <SYN,ACK> segment.
4.3. The RTTM Mechanism 3.3. The RTTM Mechanism
RTTM places a Timestamps option in every segment, with a TSval that RTTM places a Timestamps option in every segment, with a TSval that
is obtained from a (virtual) "timestamp clock". Values of this clock is obtained from a (virtual) "timestamp clock". Values of this clock
MUST be at least approximately proportional to real time, in order to MUST be at least approximately proportional to real time, in order to
measure actual RTT. measure actual RTT.
These TSval values are echoed in TSecr values in the reverse These TSval values are echoed in TSecr values in the reverse
direction. The difference between a received TSecr value and the direction. The difference between a received TSecr value and the
current timestamp clock value provides a RTT measurement. current timestamp clock value provides a RTT measurement.
skipping to change at page 14, line 25 skipping to change at page 15, line 27
acknowledge any new data when it arrives at B. Thus, the inflated acknowledge any new data when it arrives at B. Thus, the inflated
RTTM measurement is not used to update B's RTTM measurement. RTTM measurement is not used to update B's RTTM measurement.
Implementers should note that with Timestamps multiple RTTMs can be Implementers should note that with Timestamps multiple RTTMs can be
taken per RTT. Many RTO estimators have a weighting factor based on taken per RTT. Many RTO estimators have a weighting factor based on
an implicit assumption that at most one RTTM will be sampled per RTT. an implicit assumption that at most one RTTM will be sampled per RTT.
When using multiple RTTMs per RTT to update the RTO estimator, the When using multiple RTTMs per RTT to update the RTO estimator, the
weighting factor needs to be decreased to take into account the more weighting factor needs to be decreased to take into account the more
frequent RTTMs. For example, an implementation could choose to just frequent RTTMs. For example, an implementation could choose to just
use one sample per RTT to update the RTO estimator, or vary the gain use one sample per RTT to update the RTO estimator, or vary the gain
based on the congestion window, or take an average of all the RTTM based on the congestion window, or take an average of all the RTT
measurements received over one RTT, and then use that value to update measurements received over one RTT, and then use that value to update
the RTO estimator. This document does not prescribe any particular the RTO estimator. This document does not prescribe any particular
method for modifying the RTO estimator. method for modifying the RTO estimator.
4.4. Which Timestamp to Echo 3.4. Which Timestamp to Echo
If more than one Timestamps option is received before a reply segment If more than one Timestamps option is received before a reply segment
is sent, the TCP must choose only one of the TSvals to echo, ignoring is sent, the TCP must choose only one of the TSvals to echo, ignoring
the others. To minimize the state kept in the receiver (i.e., the the others. To minimize the state kept in the receiver (i.e., the
number of unprocessed TSvals), the receiver should be required to number of unprocessed TSvals), the receiver should be required to
retain at most one timestamp in the connection control block. retain at most one timestamp in the connection control block.
There are three situations to consider: There are three situations to consider:
(A) Delayed ACKs. (A) Delayed ACKs.
skipping to change at page 15, line 8 skipping to change at page 16, line 8
segments arriving within a short time interval; this policy is segments arriving within a short time interval; this policy is
known generally as "delayed ACKs". The data-sender TCP must known generally as "delayed ACKs". The data-sender TCP must
measure the effective RTT, including the additional time due to measure the effective RTT, including the additional time due to
delayed ACKs, or else it will retransmit unnecessarily. Thus, delayed ACKs, or else it will retransmit unnecessarily. Thus,
when delayed ACKs are in use, the receiver SHOULD reply with the when delayed ACKs are in use, the receiver SHOULD reply with the
TSval field from the earliest unacknowledged segment. TSval field from the earliest unacknowledged segment.
(B) A hole in the sequence space (segment(s) have been lost). (B) A hole in the sequence space (segment(s) have been lost).
The sender will continue sending until the window is filled, and The sender will continue sending until the window is filled, and
the receiver may be generating ACKs as these out-of-order the receiver may be generating <ACK>s as these out-of-order
segments arrive (e.g., to aid "fast retransmit"). segments arrive (e.g., to aid "fast retransmit").
The lost segment is probably a sign of congestion, and in that The lost segment is probably a sign of congestion, and in that
situation the sender should be conservative about situation the sender should be conservative about
retransmission. Furthermore, it is better to overestimate than retransmission. Furthermore, it is better to overestimate than
underestimate the RTT. An ACK for an out-of-order segment underestimate the RTT. An <ACK> for an out-of-order segment
SHOULD therefore contain the timestamp from the most recent SHOULD therefore contain the timestamp from the most recent
segment that advanced the window. segment that advanced the window.
The same situation occurs if segments are re-ordered by the The same situation occurs if segments are re-ordered by the
network. network.
(C) A filled hole in the sequence space. (C) A filled hole in the sequence space.
The segment that fills the hole represents the most recent The segment that fills the hole represents the most recent
measurement of the network characteristics. A RTT computed from measurement of the network characteristics. A RTT computed from
skipping to change at page 15, line 39 skipping to change at page 16, line 39
An algorithm that covers all three cases is described in the An algorithm that covers all three cases is described in the
following rules for Timestamps option processing on a synchronized following rules for Timestamps option processing on a synchronized
connection: connection:
(1) The connection state is augmented with two 32-bit slots: (1) The connection state is augmented with two 32-bit slots:
TS.Recent holds a timestamp to be echoed in TSecr whenever a TS.Recent holds a timestamp to be echoed in TSecr whenever a
segment is sent, and Last.ACK.sent holds the ACK field from the segment is sent, and Last.ACK.sent holds the ACK field from the
last segment sent. Last.ACK.sent will equal RCV.NXT except when last segment sent. Last.ACK.sent will equal RCV.NXT except when
ACKs have been delayed. <ACK>s have been delayed.
(2) If: (2) If:
SEG.TSval >= TS.recent and SEG.SEQ <= Last.ACK.sent SEG.TSval >= TS.recent and SEG.SEQ <= Last.ACK.sent
then SEG.TSval is copied to TS.Recent; otherwise, it is ignored. then SEG.TSval is copied to TS.Recent; otherwise, it is ignored.
(3) When a TSopt is sent, its TSecr field is set to the current (3) When a TSopt is sent, its TSecr field is set to the current
TS.Recent value. TS.Recent value.
The following examples illustrate these rules. Here A, B, C... The following examples illustrate these rules. Here A, B, C...
represent data segments occupying successive blocks of sequence represent data segments occupying successive blocks of sequence
numbers, and ACK(A),... represent the corresponding acknowledgment numbers, and ACK(A),... represent the corresponding acknowledgment
segments. Note that ACK(A) has the same sequence number as B. We segments. Note that ACK(A) has the same sequence number as B. We
show only one direction of timestamp echoing, for clarity. show only one direction of timestamp echoing, for clarity.
o Packets arrive in sequence, and some of the ACKs are delayed. o Segments arrive in sequence, and some of the <ACK>s are delayed.
By case (A), the timestamp from the oldest unacknowledged segment By case (A), the timestamp from the oldest unacknowledged segment
is echoed. is echoed.
TS.Recent TS.Recent
<A, TSval=1> -------------------> <A, TSval=1> ------------------->
1 1
<B, TSval=2> -------------------> <B, TSval=2> ------------------->
1 1
<C, TSval=3> -------------------> <C, TSval=3> ------------------->
1 1
<---- <ACK(C), TSecr=1> <---- <ACK(C), TSecr=1>
(etc) (etc)
o Packets arrive out of order, and every packet is acknowledged. o Segments arrive out of order, and every segment is acknowledged.
By case (B), the timestamp from the last segment that advanced the By case (B), the timestamp from the last segment that advanced the
left window edge is echoed, until the missing segment arrives; it left window edge is echoed, until the missing segment arrives; it
is echoed according to Case (C). The same sequence would occur if is echoed according to Case (C). The same sequence would occur if
segments B and D were lost and retransmitted. segments B and D were lost and retransmitted.
TS.Recent TS.Recent
<A, TSval=1> -------------------> <A, TSval=1> ------------------->
1 1
<---- <ACK(A), TSecr=1> <---- <ACK(A), TSecr=1>
skipping to change at page 17, line 5 skipping to change at page 18, line 5
2 2
<E, TSval=5> -------------------> <E, TSval=5> ------------------->
2 2
<---- <ACK(C), TSecr=2> <---- <ACK(C), TSecr=2>
2 2
<D, TSval=4> -------------------> <D, TSval=4> ------------------->
4 4
<---- <ACK(E), TSecr=4> <---- <ACK(E), TSecr=4>
(etc) (etc)
5. PAWS -- Protection Against Wrapped Sequence Numbers 4. PAWS -- Protection Against Wrapped Sequence Numbers
5.1. Introduction 4.1. Introduction
Section 5.2 describes a simple mechanism to reject old duplicate Section 4.2 describes a simple mechanism to reject old duplicate
segments that might corrupt an open TCP connection; we call this segments that might corrupt an open TCP connection; we call this
mechanism PAWS (Protection Against Wrapped Sequence numbers). PAWS mechanism PAWS (Protection Against Wrapped Sequence numbers). PAWS
operates within a single TCP connection, using state that is saved in operates within a single TCP connection, using state that is saved in
the connection control block. Section 5.3 and Appendix G discuss the the connection control block. Section 4.8 and Appendix F discuss the
implications of the PAWS mechanism for avoiding old duplicates from implications of the PAWS mechanism for avoiding old duplicates from
previous incarnations of the same connection. previous incarnations of the same connection.
5.2. The PAWS Mechanism 4.2. The PAWS Mechanism
PAWS uses the same TCP Timestamps option as the RTTM mechanism PAWS uses the same TCP Timestamps option as the RTTM mechanism
described earlier, and assumes that every received TCP segment described earlier, and assumes that every received TCP segment
(including data and ACK segments) contains a timestamp SEG.TSval (including data and <ACK> segments) contains a timestamp SEG.TSval
whose values are monotonically non-decreasing in time. The basic whose values are monotonically non-decreasing in time. The basic
idea is that a segment can be discarded as an old duplicate if it is idea is that a segment can be discarded as an old duplicate if it is
received with a timestamp SEG.TSval less than some timestamp recently received with a timestamp SEG.TSval less than some timestamp recently
received on this connection. received on this connection.
In both the PAWS and the RTTM mechanism, the "timestamps" are 32-bit In both the PAWS and the RTTM mechanism, the "timestamps" are 32-bit
unsigned integers in a modular 32-bit space. Thus, "less than" is unsigned integers in a modular 32-bit space. Thus, "less than" is
defined the same way it is for TCP sequence numbers, and the same defined the same way it is for TCP sequence numbers, and the same
implementation techniques apply. If s and t are timestamp values, implementation techniques apply. If s and t are timestamp values,
s < t if 0 < (t - s) < 2^31, s < t if 0 < (t - s) < 2^31,
computed in unsigned 32-bit arithmetic. computed in unsigned 32-bit arithmetic.
The choice of incoming timestamps to be saved for this comparison The choice of incoming timestamps to be saved for this comparison
MUST guarantee a value that is monotonically increasing. For MUST guarantee a value that is monotonically increasing. For
example, we might save the timestamp from the segment that last example, we might save the timestamp from the segment that last
advanced the left edge of the receive window, i.e., the most recent advanced the left edge of the receive window, i.e., the most recent
in-sequence segment. Instead, we choose the value TS.Recent in-sequence segment. Instead, we choose the value TS.Recent
introduced in Section 4.4 for the RTTM mechanism, since using a introduced in Section 3.4 for the RTTM mechanism, since using a
common value for both PAWS and RTTM simplifies the implementation of common value for both PAWS and RTTM simplifies the implementation of
both. As Section 4.4 explained, TS.Recent differs from the timestamp both. As Section 3.4 explained, TS.Recent differs from the timestamp
from the last in-sequence segment only in the case of delayed ACKs, from the last in-sequence segment only in the case of delayed <ACK>s,
and therefore by less than one window. Either choice will therefore and therefore by less than one window. Either choice will therefore
protect against sequence number wrap-around. protect against sequence number wrap-around.
RTTM was specified in a symmetrical manner, so that TSval timestamps RTTM was specified in a symmetrical manner, so that TSval timestamps
are carried in both data and ACK segments and are echoed in TSecr are carried in both data and <ACK> segments and are echoed in TSecr
fields carried in returning ACK or data segments. PAWS submits all fields carried in returning <ACK> or data segments. PAWS submits all
incoming segments to the same test, and therefore protects against incoming segments to the same test, and therefore protects against
duplicate ACK segments as well as data segments. (An alternative duplicate <ACK> segments as well as data segments. (An alternative
non-symmetric algorithm would protect against old duplicate ACKs: the non-symmetric algorithm would protect against old duplicate <ACK>s:
sender of data would reject incoming ACK segments whose TSecr values the sender of data would reject incoming <ACK> segments whose TSecr
were less than the TSecr saved from the last segment whose ACK field values were less than the TSecr saved from the last segment whose ACK
advanced the left edge of the send window. This algorithm was deemed field advanced the left edge of the send window. This algorithm was
to lack economy of mechanism and symmetry.) deemed to lack economy of mechanism and symmetry.)
TSval timestamps sent on <SYN> and <SYN,ACK> segments are used to TSval timestamps sent on <SYN> and <SYN,ACK> segments are used to
initialize PAWS. PAWS protects against old duplicate non-SYN initialize PAWS. PAWS protects against old duplicate non-<SYN>
segments, and duplicate SYN segments received while there is a segments, and duplicate <SYN> segments received while there is a
synchronized connection. Duplicate <SYN> and <SYN,ACK> segments synchronized connection. Duplicate <SYN> and <SYN,ACK> segments
received when there is no connection will be discarded by the normal received when there is no connection will be discarded by the normal
3-way handshake and sequence number checks of TCP. 3-way handshake and sequence number checks of TCP.
[RFC1323] recommended that RST segments NOT carry timestamps, and [RFC1323] recommended that <RST> segments NOT carry timestamps, and
that they be acceptable regardless of their timestamp. At that time, that they be acceptable regardless of their timestamp. At that time,
the thinking was that old duplicate RST segments should be the thinking was that old duplicate <RST> segments should be
exceedingly unlikely, and their cleanup function should take exceedingly unlikely, and their cleanup function should take
precedence over timestamps. More recently, discussions about various precedence over timestamps. More recently, discussions about various
blind attacks on TCP connections have raised the suggestion that if blind attacks on TCP connections have raised the suggestion that if
the Timestamps option is present, SEG.TSecr could be used to provide the timestamp option is present, SEG.TSecr could be used to provide
stricter acceptance tests for RST packets. While still under stricter acceptance tests for <RST> segments. While still under
discussion, to enable research into this area it is now RECOMMENDED discussion, to enable research into this area it is now RECOMMENDED
that when generating a RST, that if the packet causing the RST to be that when generating a <RST>, that if the segment causing the <RST>
generated contained a Timestamps option that the RST also contain a to be generated contained a timestamp option, that the <RST> also
Timestamps option. In the RST segment, SEG.TSecr SHOULD be set to contain a timestamp option. In the <RST> segment, SEG.TSecr SHOULD
SEG.TSval from the incoming packet and SEG.TSval SHOULD be set to be set to SEG.TSval from the incoming segment and SEG.TSval SHOULD be
zero. If a RST is being generated because of a user abort, and set to zero. If a <RST> is being generated because of a user abort,
Snd.TS.OK is set, then a Timestamps option SHOULD be included in the and Snd.TS.OK is set, then a timestamp option SHOULD be included in
RST. When a RST packet is received, it MUST NOT be subjected to PAWS the <RST>. When a <RST> segment is received, it MUST NOT be
checks, and information from the Timestamps option MUST NOT be used subjected to PAWS checks, and information from the timestamp option
to update connection state information. SEG.TSecr MAY be used to MUST NOT be used to update connection state information. SEG.TSecr
provide stricter RST acceptance checks. MAY be used to provide stricter <RST> acceptance checks.
5.2.1. Basic PAWS Algorithm 4.3. Basic PAWS Algorithm
The PAWS algorithm requires the following processing to be performed The PAWS algorithm requires the following processing to be performed
on all incoming segments for a synchronized connection: on all incoming segments for a synchronized connection:
R1) If there is a Timestamps option in the arriving segment, R1) If there is a Timestamps option in the arriving segment,
SEG.TSval < TS.Recent, TS.Recent is valid (see later discussion) SEG.TSval < TS.Recent, TS.Recent is valid (see later discussion)
and the RST bit is not set, then treat the arriving segment as and the RST bit is not set, then treat the arriving segment as
not acceptable: not acceptable:
Send an acknowledgement in reply as specified in [RFC0793] Send an acknowledgement in reply as specified in [RFC0793]
page 69 and drop the segment. page 69 and drop the segment.
Note: it is necessary to send an ACK segment in order to Note: it is necessary to send an <ACK> segment in order to
retain TCP's mechanisms for detecting and recovering from retain TCP's mechanisms for detecting and recovering from
half-open connections. For example, see Figure 10 of half-open connections. For example, see Figure 10 of
[RFC0793]. [RFC0793].
R2) If the segment is outside the window, reject it (normal TCP R2) If the segment is outside the window, reject it (normal TCP
processing) processing)
R3) If an arriving segment satisfies: SEG.SEQ <= Last.ACK.sent (see R3) If an arriving segment satisfies: SEG.SEQ <= Last.ACK.sent (see
Section 4.4), then record its timestamp in TS.Recent. Section 3.4), then record its timestamp in TS.Recent.
R4) If an arriving segment is in-sequence (i.e., at the left window R4) If an arriving segment is in-sequence (i.e., at the left window
edge), then accept it normally. edge), then accept it normally.
R5) Otherwise, treat the segment as a normal in-window, out-of- R5) Otherwise, treat the segment as a normal in-window, out-of-
sequence TCP segment (e.g., queue it for later delivery to the sequence TCP segment (e.g., queue it for later delivery to the
user). user).
Steps R2, R4, and R5 are the normal TCP processing steps specified by Steps R2, R4, and R5 are the normal TCP processing steps specified by
[RFC0793]. [RFC0793].
skipping to change at page 19, line 43 skipping to change at page 20, line 43
Z.1 are considered acceptable and are queued. When B is Z.1 are considered acceptable and are queued. When B is
retransmitted as segment B.2 (using the latest timestamp), it retransmitted as segment B.2 (using the latest timestamp), it
fills the hole and causes all the segments through Z to be fills the hole and causes all the segments through Z to be
acknowledged and passed to the user. The timestamps of the queued acknowledged and passed to the user. The timestamps of the queued
segments are *not* inspected again at this time, since they have segments are *not* inspected again at this time, since they have
already been accepted. When B.2 is accepted, TS.Recent is set to already been accepted. When B.2 is accepted, TS.Recent is set to
2. 2.
This rule allows reasonable performance under loss. A full window of This rule allows reasonable performance under loss. A full window of
data is in transit at all times, and after a loss a full window less data is in transit at all times, and after a loss a full window less
one packet will show up out-of-sequence to be queued at the receiver one segment will show up out-of-sequence to be queued at the receiver
(e.g., up to ~2^30 bytes of data); the timestamp option must not (e.g., up to ~2^30 bytes of data); the timestamp option must not
result in discarding this data. result in discarding this data.
In certain unlikely circumstances, the algorithm of rules R1-R5 could In certain unlikely circumstances, the algorithm of rules R1-R5 could
lead to discarding some segments unnecessarily, as shown in the lead to discarding some segments unnecessarily, as shown in the
following example: following example:
Suppose again that segments: A.1, B.1, C.1, ..., Z.1 have been Suppose again that segments: A.1, B.1, C.1, ..., Z.1 have been
sent in sequence and that segment B.1 has been lost. Furthermore, sent in sequence and that segment B.1 has been lost. Furthermore,
suppose delivery of some of C.1, ... Z.1 is delayed until AFTER suppose delivery of some of C.1, ... Z.1 is delayed until AFTER
the retransmission B.2 arrives at the receiver. These delayed the retransmission B.2 arrives at the receiver. These delayed
segments will be discarded unnecessarily when they do arrive, segments will be discarded unnecessarily when they do arrive,
since their timestamps are now out of date. since their timestamps are now out of date.
This case is very unlikely to occur. If the retransmission was This case is very unlikely to occur. If the retransmission was
triggered by a timeout, some of the segments C.1, ... Z.1 must have triggered by a timeout, some of the segments C.1, ... Z.1 must have
been delayed longer than the RTO time. This is presumably an been delayed longer than the RTO time. This is presumably an
unlikely event, or there would be many spurious timeouts and unlikely event, or there would be many spurious timeouts and
retransmissions. If B's retransmission was triggered by the "fast retransmissions. If B's retransmission was triggered by the "fast
retransmit" algorithm, i.e., by duplicate ACKs, then the queued retransmit" algorithm, i.e., by duplicate <ACK>s, then the queued
segments that caused these ACKs must have been received already. segments that caused these <ACK>s must have been received already.
Even if a segment were delayed past the RTO, the Fast Retransmit Even if a segment were delayed past the RTO, the Fast Retransmit
mechanism [Jacobson90c] will cause the delayed packets to be mechanism [Jacobson90c] will cause the delayed segments to be
retransmitted at the same time as B.2, avoiding an extra RTT and retransmitted at the same time as B.2, avoiding an extra RTT and
therefore causing a very small performance penalty. therefore causing a very small performance penalty.
We know of no case with a significant probability of occurrence in We know of no case with a significant probability of occurrence in
which timestamps will cause performance degradation by unnecessarily which timestamps will cause performance degradation by unnecessarily
discarding segments. discarding segments.
5.2.2. Timestamp Clock 4.4. Timestamp Clock
It is important to understand that the PAWS algorithm does not It is important to understand that the PAWS algorithm does not
require clock synchronization between sender and receiver. The require clock synchronization between sender and receiver. The
sender's timestamp clock is used to stamp the segments, and the sender's timestamp clock is used to stamp the segments, and the
sender uses the echoed timestamp to measure RTTs. However, the sender uses the echoed timestamp to measure RTTs. However, the
receiver treats the timestamp as simply a monotonically increasing receiver treats the timestamp as simply a monotonically increasing
serial number, without any necessary connection to its clock. From serial number, without any necessary connection to its clock. From
the receiver's viewpoint, the timestamp is acting as a logical the receiver's viewpoint, the timestamp is acting as a logical
extension of the high-order bits of the sequence number. extension of the high-order bits of the sequence number.
The receiver algorithm does place some requirements on the frequency The receiver algorithm does place some requirements on the frequency
of the timestamp clock. of the timestamp clock.
(a) The timestamp clock must not be "too slow". (a) The timestamp clock must not be "too slow".
It MUST tick at least once for each 2^31 bytes sent. In fact, It MUST tick at least once for each 2^31 bytes sent. In fact,
in order to be useful to the sender for round trip timing, the in order to be useful to the sender for round trip timing, the
clock SHOULD tick at least once per window's worth of data, and clock SHOULD tick at least once per window's worth of data, and
even with the window extension defined in Section 3.2, 2^31 even with the window extension defined in Section 2.2, 2^31
bytes must be at least two windows. bytes must be at least two windows.
To make this more quantitative, any clock faster than 1 tick/sec To make this more quantitative, any clock faster than 1 tick/sec
will reject old duplicate segments for link speeds of ~8 Gbps. will reject old duplicate segments for link speeds of ~8 Gbps.
A 1 ms timestamp clock will work at link speeds up to 8 Tbps A 1 ms timestamp clock will work at link speeds up to 8 Tbps
(8*10^12) bps! (8*10^12) bps!
(b) The timestamp clock must not be "too fast". (b) The timestamp clock must not be "too fast".
The recycling time of the timestamp clock MUST be greater than The recycling time of the timestamp clock MUST be greater than
MSL seconds. Since the clock (timestamp) is 32 bits and the MSL seconds. Since the clock (timestamp) is 32 bits and the
worst-case MSL is 255 seconds, the maximum acceptable clock worst-case MSL is 255 seconds, the maximum acceptable clock
frequency is one tick every 59 ns. frequency is one tick every 59 ns.
However, it is desirable to establish a much longer recycle However, it is desirable to establish a much longer recycle
period, in order to handle outdated timestamps on idle period, in order to handle outdated timestamps on idle
connections (see Section 5.2.3), and to relax the MSL connections (see Section 4.5), and to relax the MSL requirement
requirement for preventing sequence number wrap-around. With a for preventing sequence number wrap-around. With a 1 ms
1 ms timestamp clock, the 32-bit timestamp will wrap its sign timestamp clock, the 32-bit timestamp will wrap its sign bit in
bit in 24.8 days. Thus, it will reject old duplicates on the 24.8 days. Thus, it will reject old duplicates on the same
same connection if MSL is 24.8 days or less. This appears to be connection if MSL is 24.8 days or less. This appears to be a
a very safe figure; an MSL of 24.8 days or longer can probably very safe figure; an MSL of 24.8 days or longer can probably be
be assumed in the internet without requiring precise MSL assumed in the internet without requiring precise MSL
enforcement. enforcement.
Based upon these considerations, we choose a timestamp clock Based upon these considerations, we choose a timestamp clock
frequency in the range 1 ms to 1 sec per tick. This range also frequency in the range 1 ms to 1 sec per tick. This range also
matches the requirements of the RTTM mechanism, which does not need matches the requirements of the RTTM mechanism, which does not need
much more resolution than the granularity of the retransmit timer, much more resolution than the granularity of the retransmit timer,
e.g., tens or hundreds of milliseconds. e.g., tens or hundreds of milliseconds.
The PAWS mechanism also puts a strong monotonicity requirement on the The PAWS mechanism also puts a strong monotonicity requirement on the
sender's timestamp clock. The method of implementation of the sender's timestamp clock. The method of implementation of the
skipping to change at page 22, line 5 skipping to change at page 23, line 5
o A clock interrupt may be used to simply increment a binary integer o A clock interrupt may be used to simply increment a binary integer
by 1 periodically. by 1 periodically.
o The timestamp clock may be derived from a system clock that is o The timestamp clock may be derived from a system clock that is
subject to being abruptly changed, by adding a variable offset subject to being abruptly changed, by adding a variable offset
value. This offset is initialized to zero. When a new timestamp value. This offset is initialized to zero. When a new timestamp
clock value is needed, the offset can be adjusted as necessary to clock value is needed, the offset can be adjusted as necessary to
make the new value equal to or larger than the previous value make the new value equal to or larger than the previous value
(which was saved for this purpose). (which was saved for this purpose).
5.2.3. Outdated Timestamps 4.5. Outdated Timestamps
If a connection remains idle long enough for the timestamp clock of If a connection remains idle long enough for the timestamp clock of
the other TCP to wrap its sign bit, then the value saved in TS.Recent the other TCP to wrap its sign bit, then the value saved in TS.Recent
will become too old; as a result, the PAWS mechanism will cause all will become too old; as a result, the PAWS mechanism will cause all
subsequent segments to be rejected, freezing the connection (until subsequent segments to be rejected, freezing the connection (until
the timestamp clock wraps its sign bit again). the timestamp clock wraps its sign bit again).
With the chosen range of timestamp clock frequencies (1 sec to 1 ms), With the chosen range of timestamp clock frequencies (1 sec to 1 ms),
the time to wrap the sign bit will be between 24.8 days and 24800 the time to wrap the sign bit will be between 24.8 days and 24800
days. A TCP connection that is idle for more than 24 days and then days. A TCP connection that is idle for more than 24 days and then
skipping to change at page 22, line 41 skipping to change at page 23, line 41
timestamp check fails, i.e., only if SEG.TSval < TS.Recent. If timestamp check fails, i.e., only if SEG.TSval < TS.Recent. If
TS.Recent is found to be invalid, then the segment is accepted, TS.Recent is found to be invalid, then the segment is accepted,
regardless of the failure of the timestamp check, and rule R3 updates regardless of the failure of the timestamp check, and rule R3 updates
TS.Recent with the TSval from the new segment. TS.Recent with the TSval from the new segment.
To detect how long the connection has been idle, the TCP MAY update a To detect how long the connection has been idle, the TCP MAY update a
clock or timestamp value associated with the connection whenever clock or timestamp value associated with the connection whenever
TS.Recent is updated, for example. The details will be TS.Recent is updated, for example. The details will be
implementation-dependent. implementation-dependent.
5.2.4. Header Prediction 4.6. Header Prediction
"Header prediction" [Jacobson90a] is a high-performance transport "Header prediction" [Jacobson90a] is a high-performance transport
protocol implementation technique that is most important for high- protocol implementation technique that is most important for high-
speed links. This technique optimizes the code for the most common speed links. This technique optimizes the code for the most common
case, receiving a segment correctly and in order. Using header case, receiving a segment correctly and in order. Using header
prediction, the receiver asks the question, "Is this segment the next prediction, the receiver asks the question, "Is this segment the next
in sequence?" This question can be answered in fewer machine in sequence?" This question can be answered in fewer machine
instructions than the question, "Is this segment within the window?" instructions than the question, "Is this segment within the window?"
Adding header prediction to our timestamp procedure leads to the Adding header prediction to our timestamp procedure leads to the
skipping to change at page 24, line 8 skipping to change at page 25, line 8
enough", i.e., it won't contribute significantly to the overall enough", i.e., it won't contribute significantly to the overall
error rate. We therefore believe we can ignore the problem of an error rate. We therefore believe we can ignore the problem of an
old duplicate being accepted by doing header prediction before old duplicate being accepted by doing header prediction before
checking the timestamp. checking the timestamp.
However, this probabilistic argument is not universally accepted, and However, this probabilistic argument is not universally accepted, and
the consensus at present is that the performance gain does not the consensus at present is that the performance gain does not
justify the hazard in the general case. It is therefore recommended justify the hazard in the general case. It is therefore recommended
that H2 follow H1. that H2 follow H1.
5.2.5. IP Fragmentation 4.7. IP Fragmentation
At high data rates, the protection against old packets provided by At high data rates, the protection against old segments provided by
PAWS can be circumvented by errors in IP fragment reassembly (see PAWS can be circumvented by errors in IP fragment reassembly (see
[RFC4963]). The only way to protect against incorrect IP fragment [RFC4963]). The only way to protect against incorrect IP fragment
reassembly is to not allow the packets to be fragmented. This is reassembly is to not allow the segments to be fragmented. This is
done by setting the Don't Fragment (DF) bit in the IP header. done by setting the Don't Fragment (DF) bit in the IP header.
Setting the DF bit implies the use of Path MTU Discovery as described Setting the DF bit implies the use of Path MTU Discovery as described
in [RFC1191], [RFC1981], and [RFC4821], thus any TCP implementation in [RFC1191], [RFC1981], and [RFC4821], thus any TCP implementation
that implements PAWS MUST also implement Path MTU Discovery. that implements PAWS MUST also implement Path MTU Discovery.
5.3. Duplicates from Earlier Incarnations of Connection 4.8. Duplicates from Earlier Incarnations of Connection
The PAWS mechanism protects against errors due to sequence number The PAWS mechanism protects against errors due to sequence number
wrap-around on high-speed connections. Segments from an earlier wrap-around on high-speed connections. Segments from an earlier
incarnation of the same connection are also a potential cause of old incarnation of the same connection are also a potential cause of old
duplicate errors. In both cases, the TCP mechanisms to prevent such duplicate errors. In both cases, the TCP mechanisms to prevent such
errors depend upon the enforcement of a maximum segment lifetime errors depend upon the enforcement of a maximum segment lifetime
(MSL) by the Internet (IP) layer (see Appendix of RFC 1185 for a (MSL) by the Internet (IP) layer (see Appendix of RFC 1185 for a
detailed discussion). Unlike the case of sequence space wrap-around, detailed discussion). Unlike the case of sequence space wrap-around,
the MSL required to prevent old duplicate errors from earlier the MSL required to prevent old duplicate errors from earlier
incarnations does not depend upon the transfer rate. If the IP layer incarnations does not depend upon the transfer rate. If the IP layer
skipping to change at page 24, line 42 skipping to change at page 25, line 42
no matter how high the network speed. Thus, the PAWS mechanism is no matter how high the network speed. Thus, the PAWS mechanism is
not required for this case. not required for this case.
We may still ask whether the PAWS mechanism can provide additional We may still ask whether the PAWS mechanism can provide additional
security against old duplicates from earlier connections, allowing us security against old duplicates from earlier connections, allowing us
to relax the enforcement of MSL by the IP layer. Appendix B explores to relax the enforcement of MSL by the IP layer. Appendix B explores
this question, showing that further assumptions and/or mechanisms are this question, showing that further assumptions and/or mechanisms are
required, beyond those of PAWS. This is not part of the current required, beyond those of PAWS. This is not part of the current
extension. extension.
6. Conclusions and Acknowledgements 5. Conclusions and Acknowledgements
This memo presented a set of extensions to TCP to provide efficient This memo presented a set of extensions to TCP to provide efficient
operation over large-bandwidth*delay-product paths and reliable operation over large-bandwidth*delay-product paths and reliable
operation over very high-speed paths. These extensions are designed operation over very high-speed paths. These extensions are designed
to provide compatible interworking with TCP's that do not implement to provide compatible interworking with TCP's that do not implement
the extensions. the extensions.
These mechanisms are implemented using new TCP options for scaled These mechanisms are implemented using TCP options for scaled windows
windows and timestamps. The timestamps are used for two distinct and timestamps. The timestamps are used for two distinct mechanisms:
mechanisms: RTTM (Round Trip Time Measurement) and PAWS (Protection RTTM (Round Trip Time Measurement) and PAWS (Protection Against
Against Wrapped Sequences). Wrapped Sequences).
The Window Scale option was originally suggested by Mike St. Johns of The Window Scale option was originally suggested by Mike St. Johns of
USAF/DCA. The present form of the option was suggested by Mike USAF/DCA. The present form of the option was suggested by Mike
Karels of UC Berkeley in response to a more cumbersome scheme defined Karels of UC Berkeley in response to a more cumbersome scheme defined
by Van Jacobson. Lixia Zhang helped formulate the PAWS mechanism by Van Jacobson. Lixia Zhang helped formulate the PAWS mechanism
description in [RFC1185]. description in [RFC1185].
Finally, much of this work originated as the result of discussions Finally, much of this work originated as the result of discussions
within the End-to-End Task Force on the theoretical limitations of within the End-to-End Task Force on the theoretical limitations of
transport protocols in general and TCP in particular. Task force transport protocols in general and TCP in particular. Task force
members and other on the end2end-interest list have made valuable members and other on the end2end-interest list have made valuable
contributions by pointing out flaws in the algorithms and the contributions by pointing out flaws in the algorithms and the
documentation. Continued discussion and development since the documentation. Continued discussion and development since the
publication of [RFC1323] originally occurred in the IETF TCP Large publication of [RFC1323] originally occurred in the IETF TCP Large
Windows Working Group, later on in the End-to-End Task Force, and Windows Working Group, later on in the End-to-End Task Force, and
most recently in the IETF TCP Maintenance Working Group. The authors most recently in the IETF TCP Maintenance Working Group. The authors
are grateful for all these contributions. are grateful for all these contributions.
7. Security Considerations 6. Security Considerations
The TCP sequence space is a fixed size, and as the window becomes The TCP sequence space is a fixed size, and as the window becomes
larger it becomes easier for an attacker to generate forged packets larger it becomes easier for an attacker to generate forged packets
that can fall within the TCP window, and be accepted as valid that can fall within the TCP window, and be accepted as valid
packets. While use of Timestamps and PAWS can help to mitigate this, segments. While use of Timestamps and PAWS can help to mitigate
when using PAWS, if an attacker is able to forge a packet that is this, when using PAWS, if an attacker is able to forge a packet that
acceptable to the TCP connection, a timestamp that is in the future is acceptable to the TCP connection, a timestamp that is in the
would cause valid packets to be dropped due to PAWS checks. Hence, future would cause valid segments to be dropped due to PAWS checks.
implementers should take care to not open the TCP window drastically Hence, implementers should take care to not open the TCP window
beyond the requirements of the connection. drastically beyond the requirements of the connection.
Middle boxes and options: If a middle box removes TCP options from Middle boxes and options: If a middle box removes TCP options from
the SYN, such as TSopt, a high speed connection that needs PAWS would the <SYN> segment, such as TSopt, a high speed connection that needs
not have that protection. In this situation, an implementer could PAWS would not have that protection. In this situation, an
provide a mechanism for the application to determine whether or not implementer could provide a mechanism for the application to
PAWS is in use on the connection, and chose to terminate the determine whether or not PAWS is in use on the connection, and chose
connection if that protection doesn't exist. to terminate the connection if that protection doesn't exist.
Mechanisms to protect the TCP header from modification should also Mechanisms to protect the TCP header from modification should also
protect the TCP options. protect the TCP options.
A naive implementation that derives the timestamp clock value A naive implementation that derives the timestamp clock value
directly from a system uptime clock may unintentionally leak this directly from a system uptime clock may unintentionally leak this
information to an attacker. This does not directly compromise any of information to an attacker. This does not directly compromise any of
the mechanisms described in this document. However, this may be the mechanisms described in this document. However, this may be
valuable information to a potential attacker. An implementer should valuable information to a potential attacker. An implementer should
evaluate the potential impact and mitigate this accordingly (i.e. by evaluate the potential impact and mitigate this accordingly (i.e. by
using a random offset for the timestamp clock on each connection, or using a random offset for the timestamp clock on each connection, or
using an external, real-time derived timestamp clock source). using an external, real-time derived timestamp clock source).
Expanding the TCP window beyond 64K for IPv6 allows Jumbograms Expanding the TCP window beyond 64K for IPv6 allows Jumbograms
[RFC2675] to be used when the local network supports packets larger [RFC2675] to be used when the local network supports packets larger
than 64K. When larger TCP packets are used, the TCP checksum becomes than 64K. When larger TCP segments are used, the TCP checksum becomes
weaker. weaker.
8. IANA Considerations 7. IANA Considerations
This document has no actions for IANA. This document has no actions for IANA.
9. References 8. References
9.1. Normative References 8.1. Normative References
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, [RFC0793] Postel, J., "Transmission Control Protocol", STD 7,
RFC 793, September 1981. RFC 793, September 1981.
[RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, [RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191,
November 1990. November 1990.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
9.2. Informative References 8.2. Informative References
[Garlick77] [Garlick77]
Garlick, L., Rom, R., and J. Postel, "Issues in Reliable Garlick, L., Rom, R., and J. Postel, "Issues in Reliable
Host-to-Host Protocols", Proc. Second Berkeley Workshop on Host-to-Host Protocols", Proc. Second Berkeley Workshop on
Distributed Data Management and Computer Networks, Distributed Data Management and Computer Networks,
May 1977, <http://www.rfc-editor.org/ien/ien12.txt>. May 1977, <http://www.rfc-editor.org/ien/ien12.txt>.
[Hamming77] [Hamming77]
Hamming, R., "Digital Filters", Prentice Hall, Englewood Hamming, R., "Digital Filters", Prentice Hall, Englewood
Cliffs, N.J. ISBN 0-13-212571-4, 1977. Cliffs, N.J. ISBN 0-13-212571-4, 1977.
skipping to change at page 28, line 48 skipping to change at page 29, line 48
5, 1981. 5, 1981.
[Zhang86] Zhang, L., "Why TCP Timers Don't Work Well", Proc. SIGCOMM [Zhang86] Zhang, L., "Why TCP Timers Don't Work Well", Proc. SIGCOMM
'86, Stowe, VT, August 1986. '86, Stowe, VT, August 1986.
Appendix A. Implementation Suggestions Appendix A. Implementation Suggestions
TCP Option Layout TCP Option Layout
The following layouts are recommended for sending options on non- The following layouts are recommended for sending options on non-
SYN segments, to achieve maximum feasible alignment of 32-bit and <SYN> segments, to achieve maximum feasible alignment of 32-bit
64-bit machines. and 64-bit machines.
+--------+--------+--------+--------+ +--------+--------+--------+--------+
| NOP | NOP | TSopt | 10 | | NOP | NOP | TSopt | 10 |
+--------+--------+--------+--------+ +--------+--------+--------+--------+
| TSval timestamp | | TSval timestamp |
+--------+--------+--------+--------+ +--------+--------+--------+--------+
| TSecr timestamp | | TSecr timestamp |
+--------+--------+--------+--------+ +--------+--------+--------+--------+
Interaction with the TCP Urgent Pointer Interaction with the TCP Urgent Pointer
skipping to change at page 29, line 29 skipping to change at page 30, line 29
that should be made: that should be made:
(1) With IP Version 4, the largest amount of TCP data that can be (1) With IP Version 4, the largest amount of TCP data that can be
sent in a single packet is 65495 bytes (64K - 1 -- size of sent in a single packet is 65495 bytes (64K - 1 -- size of
fixed IP and TCP headers). fixed IP and TCP headers).
(2) Updates to the urgent pointer while the user is in "urgent (2) Updates to the urgent pointer while the user is in "urgent
mode" are invisible to the user. mode" are invisible to the user.
This means that if the Urgent Pointer points beyond the end of the This means that if the Urgent Pointer points beyond the end of the
TCP data in the current packet, then the user will remain in TCP data in the current segment, then the user will remain in
urgent mode until the next TCP packet arrives. That packet will urgent mode until the next TCP segment arrives. That segment will
update the urgent pointer to a new offset, and the user will never update the urgent pointer to a new offset, and the user will never
have left urgent mode. have left urgent mode.
Thus, to properly implement the Urgent Pointer, the sending TCP Thus, to properly implement the Urgent Pointer, the sending TCP
only has to check for overflow of the 16 bit Urgent Pointer field only has to check for overflow of the 16 bit Urgent Pointer field
before filling it in. If it does overflow, than a value of 65535 before filling it in. If it does overflow, than a value of 65535
should be inserted into the Urgent Pointer. should be inserted into the Urgent Pointer.
The same technique applies to IP Version 6, except in the case of The same technique applies to IP Version 6, except in the case of
IPv6 Jumbograms. When IPv6 Jumbograms are supported, [RFC2675] IPv6 Jumbograms. When IPv6 Jumbograms are supported, [RFC2675]
skipping to change at page 32, line 46 skipping to change at page 33, line 46
Snd.Wind.Scale: Send window scale power Snd.Wind.Scale: Send window scale power
Start.Time: Snd.TSclock value when segment being timed was Start.Time: Snd.TSclock value when segment being timed was
sent (used by pre-1323 code). sent (used by pre-1323 code).
Procedure Procedure
Update_SRTT(m) Procedure to update the smoothed RTT and RTT Update_SRTT(m) Procedure to update the smoothed RTT and RTT
variance estimates, using the rules of variance estimates, using the rules of
[Jacobson88a], given m, a new RTT measurement [Jacobson88a], given m, a new RTT measurement
Appendix D. Pseudo-code Summary Appendix D. Event Processing Summary
Create new TCB => {
Rcv.wind.scale =
MIN( 14, MAX(0, floor(log2(receive buffer space)) - 15) );
Snd.wind.scale = 0;
Last.ACK.sent = 0;
Snd.TS.OK = Snd.WS.OK = FALSE;
Snd.TSoffset = random 32 bit value
}
Send initial <SYN> segment => {
SEG.WND = MIN( RCV.WND, 65535 );
Include in segment: TSopt(TSval=Snd.TSclock, TSecr=0);
Include in segment: WSopt = Rcv.wind.scale;
}
Send <SYN,ACK> segment => {
SEG.ACK = Last.ACK.sent = RCV.NXT;
SEG.WND = MIN( RCV.WND, 65535 );
if (Snd.TS.OK) then
Include in segment:
TSopt(TSval=Snd.TSclock, TSecr=TS.Recent);
if (Snd.WS.OK) then
Include in segment: WSopt = Rcv.wind.scale;
}
Receive <SYN> or <SYN,ACK> segment => {
if (Segment contains TSopt) then {
TS.Recent = SEG.TSval;
Snd.TS.OK = TRUE;
if (is <SYN,ACK> segment) then
Update_SRTT(
(Snd.TSclock - SEG.TSecr)/my.TSclock.rate);
}
if (Segment contains WSopt) then {
Snd.wind.scale = SEG.WSopt;
Snd.WS.OK = TRUE;
if (the ACK bit is not set, and Rcv.wind.scale has not been
initialized by the user) then
Rcv.wind.scale = Snd.wind.scale;
}
else
Rcv.wind.scale = Snd.wind.scale = 0;
}
Send non-SYN segment => {
SEG.ACK = Last.ACK.sent = RCV.NXT;
SEG.WND = MIN( RCV.WND >> Rcv.wind.scale, 65535 );
if (Snd.TS.OK) then
Include in segment:
TSopt(TSval=Snd.TSclock, TSecr=TS.Recent);
}
Receive non-SYN segment in (state >= ESTABLISHED) => {
Window = (SEG.WND << Snd.wind.scale);
/* Use 32-bit 'Window' instead of 16-bit 'SEG.WND'
* in rest of processing.
*/
if (Segment contains TSopt) then {
if (SEG.TSval < TS.Recent && Idle less than 24 days) then {
if (Send.TS.OK AND (NOT RST) ) then {
/* Timestamp too old =>
* segment is unacceptable.
*/
Send ACK segment;
Discard segment and return;
}
}
else {
if (SEG.SEQ <= Last.ACK.sent) then
TS.Recent = SEG.TSval;
}
}
if (SEG.ACK > SND.UNA) then {
/* (At least part of) first segment in
* retransmission queue has been ACKed
*/
if (Segment contains TSopt) then
Update_SRTT(
(Snd.TSclock - SEG.TSecr)/my.TSclock.rate);
else
Update_SRTT( /* for compatibility */
(Snd.TSclock - Start.Time)/my.TSclock.rate);
}
}
Appendix E. Event Processing Summary
OPEN Call OPEN Call
... ...
An initial send sequence number (ISS) is selected. Send a SYN An initial send sequence number (ISS) is selected. Send a <SYN>
segment of the form: segment of the form:
<SEQ=ISS><CTL=SYN><TSval=Snd.TSclock><WSopt=Rcv.Wind.Scale> <SEQ=ISS><CTL=SYN><TSval=Snd.TSclock><WSopt=Rcv.Wind.Scale>
... ...
SEND Call SEND Call
CLOSED STATE (i.e., TCB does not exist) CLOSED STATE (i.e., TCB does not exist)
... ...
LISTEN STATE LISTEN STATE
If the foreign socket is specified, then change the connection If the foreign socket is specified, then change the connection
from passive to active, select an ISS. Send a SYN segment from passive to active, select an ISS. Send a <SYN> segment
containing the options: <TSval=Snd.TSclock> and containing the options: <TSval=Snd.TSclock> and
<WSopt=Rcv.Wind.Scale>. Set SND.UNA to ISS, SND.NXT to ISS+1. <WSopt=Rcv.Wind.Scale>. Set SND.UNA to ISS, SND.NXT to ISS+1.
Enter SYN-SENT state. ... Enter SYN-SENT state. ...
SYN-SENT STATE SYN-SENT STATE
SYN-RECEIVED STATE SYN-RECEIVED STATE
... ...
ESTABLISHED STATE ESTABLISHED STATE
skipping to change at page 36, line 23 skipping to change at page 35, line 33
Check for a Window Scale option (WSopt); if one is found, Check for a Window Scale option (WSopt); if one is found,
save SEG.WSopt in Snd.Wind.Scale and set Snd.WS.OK flag on. save SEG.WSopt in Snd.Wind.Scale and set Snd.WS.OK flag on.
Otherwise, set both Snd.Wind.Scale and Rcv.Wind.Scale to Otherwise, set both Snd.Wind.Scale and Rcv.Wind.Scale to
zero and clear Snd.WS.OK flag. zero and clear Snd.WS.OK flag.
Check for a TSopt option; if one is found, save SEG.TSval in Check for a TSopt option; if one is found, save SEG.TSval in
the variable TS.Recent and turn on the Snd.TS.OK bit. the variable TS.Recent and turn on the Snd.TS.OK bit.
Set RCV.NXT to SEG.SEQ+1, IRS is set to SEG.SEQ and any Set RCV.NXT to SEG.SEQ+1, IRS is set to SEG.SEQ and any
other control or text should be queued for processing later. other control or text should be queued for processing later.
ISS should be selected and a SYN segment sent of the form: ISS should be selected and a <SYN> segment sent of the form:
<SEQ=ISS><ACK=RCV.NXT><CTL=SYN,ACK> <SEQ=ISS><ACK=RCV.NXT><CTL=SYN,ACK>
If the Snd.WS.OK bit is on, include a WSopt option If the Snd.WS.OK bit is on, include a WSopt option
<WSopt=Rcv.Wind.Scale> in this segment. If the Snd.TS.OK <WSopt=Rcv.Wind.Scale> in this segment. If the Snd.TS.OK
bit is on, include a TSopt bit is on, include a TSopt
<TSval=Snd.TSclock,TSecr=TS.Recent> in this segment. <TSval=Snd.TSclock,TSecr=TS.Recent> in this segment.
Last.ACK.sent is set to RCV.NXT. Last.ACK.sent is set to RCV.NXT.
SND.NXT is set to ISS+1 and SND.UNA to ISS. The connection SND.NXT is set to ISS+1 and SND.UNA to ISS. The connection
skipping to change at page 37, line 26 skipping to change at page 36, line 36
Check for a Window Scale option (WSopt); if it is found, Check for a Window Scale option (WSopt); if it is found,
save SEG.WSopt in Snd.Wind.Scale; otherwise, set both save SEG.WSopt in Snd.Wind.Scale; otherwise, set both
Snd.Wind.Scale and Rcv.Wind.Scale to zero. Snd.Wind.Scale and Rcv.Wind.Scale to zero.
Check for a TSopt option; if one is found, save SEG.TSval in Check for a TSopt option; if one is found, save SEG.TSval in
variable TS.Recent and turn on the Snd.TS.OK bit in the variable TS.Recent and turn on the Snd.TS.OK bit in the
connection control block. If the ACK bit is set, use connection control block. If the ACK bit is set, use
Snd.TSclock - SEG.TSecr as the initial RTT estimate. Snd.TSclock - SEG.TSecr as the initial RTT estimate.
If SND.UNA > ISS (our SYN has been ACKed), change the If SND.UNA > ISS (our <SYN> has been ACKed), change the
connection state to ESTABLISHED, form an ACK segment: connection state to ESTABLISHED, form an <ACK> segment:
<SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK> <SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK>
and send it. If the Snd.Echo.OK bit is on, include a TSopt and send it. If the Snd.Echo.OK bit is on, include a TSopt
option <TSval=Snd.TSclock,TSecr=TS.Recent> in this ACK option <TSval=Snd.TSclock,TSecr=TS.Recent> in this <ACK>
segment. Last.ACK.sent is set to RCV.NXT. segment. Last.ACK.sent is set to RCV.NXT.
Data or controls which were queued for transmission may be Data or controls which were queued for transmission may be
included. If there are other controls or text in the included. If there are other controls or text in the
segment then continue processing at the sixth step below segment then continue processing at the sixth step below
where the URG bit is checked, otherwise return. where the URG bit is checked, otherwise return.
Otherwise enter SYN-RECEIVED, form a SYN,ACK segment: Otherwise enter SYN-RECEIVED, form a <SYN,ACK> segment:
<SEQ=ISS><ACK=RCV.NXT><CTL=SYN,ACK> <SEQ=ISS><ACK=RCV.NXT><CTL=SYN,ACK>
and send it. If the Snd.Echo.OK bit is on, include a TSopt and send it. If the Snd.Echo.OK bit is on, include a TSopt
option <TSval=Snd.TSclock,TSecr=TS.Recent> in this segment. option <TSval=Snd.TSclock,TSecr=TS.Recent> in this segment.
If the Snd.WS.OK bit is on, include a WSopt option If the Snd.WS.OK bit is on, include a WSopt option
<WSopt=Rcv.Wind.Scale> in this segment. Last.ACK.sent is <WSopt=Rcv.Wind.Scale> in this segment. Last.ACK.sent is
set to RCV.NXT. set to RCV.NXT.
If there are other controls or text in the segment, queue If there are other controls or text in the segment, queue
skipping to change at page 39, line 9 skipping to change at page 38, line 21
... ...
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>
Last.ACK.sent is set to SEG.ACK of the acknowledgment. If Last.ACK.sent is set to SEG.ACK of the acknowledgment. If
the Snd.Echo.OK bit is on, include the Timestamps option the Snd.Echo.OK bit is on, include the Timestamps option
<TSval=Snd.TSclock,TSecr=TS.Recent> in this ACK segment. <TSval=Snd.TSclock,TSecr=TS.Recent> in this <ACK> segment.
Set Last.ACK.sent to SEG.ACK and send the ACK segment. Set Last.ACK.sent to SEG.ACK and send the <ACK> segment.
After sending the acknowledgment, drop the unacceptable After sending the acknowledgment, drop the unacceptable
segment and return. segment and return.
... ...
fifth check the ACK field. fifth check the ACK field.
if the ACK bit is off drop the segment and return. if the ACK bit is off drop the segment and return.
if the ACK bit is on if the ACK bit is on
skipping to change at page 39, line 41 skipping to change at page 39, line 4
retransmission queue which are thereby entirely retransmission queue which are thereby entirely
acknowledged... acknowledged...
... ...
Seventh, process the segment text. Seventh, process the segment text.
ESTABLISHED STATE ESTABLISHED STATE
FIN-WAIT-1 STATE FIN-WAIT-1 STATE
FIN-WAIT-2 STATE FIN-WAIT-2 STATE
... ...
Send an acknowledgment of the form: Send an acknowledgment of the form:
<SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK> <SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK>
If the Snd.TS.OK bit is on, include Timestamps option If the Snd.TS.OK bit is on, include Timestamps option
<TSval=Snd.TSclock,TSecr=TS.Recent> in this ACK segment. <TSval=Snd.TSclock,TSecr=TS.Recent> in this <ACK> segment.
Set Last.ACK.sent to SEG.ACK of the acknowledgment, and send Set Last.ACK.sent to SEG.ACK of the acknowledgment, and send
it. This acknowledgment should be piggy-backed on a segment it. This acknowledgment should be piggy-backed on a segment
being transmitted if possible without incurring undue delay. being transmitted if possible without incurring undue delay.
... ...
Appendix F. Timestamps Edge Cases Appendix E. Timestamps Edge Cases
While the rules laid out for when to calculate RTTM produce the While the rules laid out for when to calculate RTTM produce the
correct results most of the time, there are some edge cases where an correct results most of the time, there are some edge cases where an
incorrect RTTM can be calculated. All of these situations involve incorrect RTTM can be calculated. All of these situations involve
the loss of packets. It is felt that these scenarios are rare, and the loss of segments. It is felt that these scenarios are rare, and
that if they should happen, they will cause a single RTTM measurement that if they should happen, they will cause a single RTTM measurement
to be inflated, which mitigates its effects on RTO calculations. to be inflated, which mitigates its effects on RTO calculations.
[Martin03] cites two similar cases when the returning ACK is lost, [Martin03] cites two similar cases when the returning <ACK> is lost,
and before the retransmission timer fires, another returning packet and before the retransmission timer fires, another returning <ACK>
arrives, which ACKs the data. In this case, the RTTM calculated will segment arrives, which aknowledges the data. In this case, the RTTM
be inflated: calculated will be inflated:
clock clock
tc=1 <A, TSval=1> -------------------> tc=1 <A, TSval=1> ------------------->
tc=2 (lost) <---- <ACK(A), TSecr=1, win=n> tc=2 (lost) <---- <ACK(A), TSecr=1, win=n>
(RTTM would have been 1) (RTTM would have been 1)
(receive window opens, window update is sent) (receive window opens, window update is sent)
tc=5 <---- <ACK(A), TSecr=1, win=m> tc=5 <---- <ACK(A), TSecr=1, win=m>
(RTTM is calculated at 4) (RTTM is calculated at 4)
One thing to note about this situation is that it is somewhat bounded One thing to note about this situation is that it is somewhat bounded
by RTO + RTT, limiting how far off the RTTM calculation will be. by RTO + RTT, limiting how far off the RTTM calculation will be.
While more complex scenarios can be constructed that produce larger While more complex scenarios can be constructed that produce larger
inflations (e.g., retransmissions are lost), those scenarios involve inflations (e.g., retransmissions are lost), those scenarios involve
multiple packet losses, and the connection will have other more multiple segment losses, and the connection will have other more
serious operational problems than using an inflated RTTM in the RTO serious operational problems than using an inflated RTTM in the RTO
calculation. calculation.
Appendix G. Changes from RFC 1072, RFC 1185, and RFC 1323 Appendix F. Changes from RFC 1323
The protocol extensions defined in RFC 1323 document differ in
several important ways from those defined in RFC 1072 and RFC 1185.
(a) SACK has been split off into a separate document, [RFC2018].
(b) The detailed rules for sending timestamp replies (see
Section 4.4) differ in important ways. The earlier rules could
result in an under-estimate of the RTT in certain cases (packets
dropped or out of order).
(c) The same value TS.Recent is now shared by the two distinct
mechanisms RTTM and PAWS. This simplification became possible
because of change (b).
(d) An ambiguity in RFC 1185 was resolved in favor of putting
timestamps on ACK as well as data segments. This supports the
symmetry of the underlying TCP protocol.
(e) The echo and echo reply options of RFC 1072 were combined into a
single Timestamps option, to reflect the symmetry and to
simplify processing.
(f) The problem of outdated timestamps on long-idle connections,
discussed in Section 5.2.2, was realized and resolved.
(g) RFC 1185 recommended that header prediction take precedence over
the timestamp check. Based upon some skepticism about the
probabilistic arguments given in Section 5.2.4, it was decided
to recommend that the timestamp check be performed first.
(h) The spec was modified so that the extended options will be sent
on <SYN,ACK> segments only when they are received in the
corresponding <SYN> segments. This provides the most
conservative possible conditions for interoperation with
implementations without the extensions.
In addition to these substantive changes, the present RFC attempts to
specify the algorithms unambiguously by presenting modifications to
the Event Processing rules of RFC 793; see Appendix E.
There are additional changes in this document from RFC 1323. These Several important updates and clarifications to the specification in
changes are: RFC 1323 are made in these document. The technical changes are
summarized below:
(a) The description of which TSecr values can be used to update the (a) The description of which TSecr values can be used to update the
measured RTT has been clarified. Specifically, with Timestamps, measured RTT has been clarified. Specifically, with timestamps,
the Karn algorithm [Karn87] is disabled. The Karn algorithm the Karn algorithm [Karn87] is disabled. The Karn algorithm
disables all RTT measurements during retransmission, since it is disables all RTT measurements during retransmission, since it is
ambiguous whether the ACK is for the original packet, or the ambiguous whether the <ACK> is for the original segment, or the
retransmitted packet. With Timestamps, that ambiguity is retransmitted segment. With timestamps, that ambiguity is
removed since the TSecr in the ACK will contain the TSval from removed since the TSecr in the <ACK> will contain the TSval from
whichever data packet made it to the destination. whichever data segment made it to the destination.
(b) In RFC1323, section 3.4, step (2) of the algorithm to control (b) In RFC1323, section 3.4, step (2) of the algorithm to control
which timestamp is echoed was incorrect in two regards: which timestamp is echoed was incorrect in two regards:
(1) It failed to update TS.recent for a retransmitted segment (1) It failed to update TS.recent for a retransmitted segment
that resulted from a lost ACK. that resulted from a lost <ACK>.
(2) It failed if SEG.LEN = 0. (2) It failed if SEG.LEN = 0.
In the new algorithm, the case of SEG.TSval >= TS.recent is In the new algorithm, the case of SEG.TSval >= TS.recent is
included for consistency with the PAWS test. included for consistency with the PAWS test.
(c) One correction was made to the Event Processing Summary in (c) One correction was made to the Event Processing Summary in
Appendix E. In SEND CALL/ESTABLISHED STATE, RCV.WND is used to Appendix D. In SEND CALL/ESTABLISHED STATE, RCV.WND is used to
fill in the SEG.WND value, not SND.WND. fill in the SEG.WND value, not SND.WND.
(d) New pseudo-code summary has been added in Appendix D. (d) Appendix A has been expanded with information about the TCP
(e) Appendix A has been expanded with information about the TCP
Urgent Pointer. An earlier revision contained text around the Urgent Pointer. An earlier revision contained text around the
TCP MSS option, which was split off into [RFC6691]. TCP MSS option, which was split off into [RFC6691].
(f) It is now recommended that Timestamps options be included in RST (e) It is now recommended that Timestamps options be included in
packets if the incoming packet contained a Timestamps option. <RST> segments if the incoming segment contained a timestamp
option.
(g) RST packets are explicitly excluded from PAWS processing. (f) <RST> segments are explicitly excluded from PAWS processing.
(h) Snd.TSoffset and Snd.TSclock variables have been added. (g) Snd.TSoffset and Snd.TSclock variables have been added.
Snd.TSclock is the sum of my.TSclock and Snd.TSoffset. This Snd.TSclock is the sum of my.TSclock and Snd.TSoffset. This
allows the starting points for timestamps to be randomized on a allows the starting points for timestamp values to be randomized
per-connection basis. Setting Snd.TSoffset to zero yields the on a per-connection basis. Setting Snd.TSoffset to zero yields
same results as [RFC1323]. the same results as [RFC1323].
(i) RTTM update processing explicitly excludes packets containing (h) RTTM update processing explicitly excludes segments containing
SACK options. This addresses inflation of the RTT during SACK options. This addresses inflation of the RTT during
episodes of packet loss in both directions. episodes of segment loss in both directions.
(j) In Section 4.2 the if-clause allowing sending of timestamps only (i) In Section 3.2 the wording how timestamp option negotiation is
when received in a <SYN> or <SYN,ACK> was removed, to allow for to be performed was updated with RFC2119 wording. Text was also
late timestamp negotiation. added to subsequently allow late timestamp negotiation.
(k) Section 3.4 was added describing the unavoidable window (j) Section 2.4 was added describing the unavoidable window
retraction issue, and explicitly describing the mitigation steps retraction issue, and explicitly describing the mitigation steps
necessary. necessary.
(l) Section 2 was added for RFC2119 wording. Normative text was Editorial changes of the document, that don't impact the
implementation or function of the mechanisms described in this
document include:
(a) Section 1.4 was added for RFC2119 wording. Normative text was
updated with the appropriate phrases. updated with the appropriate phrases.
(m) Removed much of the discussion in Section 1 to streamline the (b) Removed much of the discussion in Section 1 to streamline the
document. However, detailed examples and discussions in document. However, detailed examples and discussions in
Section 3, Section 4 and Section 5 are kept as guideline for Section 2, Section 3 and Section 4 are kept as guideline for
implementers. implementers.
(n) Moved Appendix "Changes" at the end of the appendices for easier (c) Moved Appendix "Changes" at the end of the appendices for easier
lookup. lookup.
(d) Removed references to "new" options, as they were introduced in
[RFC1323] already. Changed the text in Section 1.3 to
specifically address TS and WS options.
(e) Removed the list of changes between RFC 1323 and prior versions.
These changes are mentioned in appendix C of RFC 1323.
(f) Added < > brackets to mark specific types of segments, and
replaced most occurances of "packet" with "segment", where TCP
segments are referred.
Authors' Addresses Authors' Addresses
David Borman David Borman
Quantum Corporation Quantum Corporation
Mendota Heights MN 55120 Mendota Heights MN 55120
USA USA
Email: david.borman@quantum.com Email: david.borman@quantum.com
Bob Braden Bob Braden
University of Southern California University of Southern California
4676 Admiralty Way 4676 Admiralty Way
Marina del Rey CA 90292 Marina del Rey CA 90292
USA USA
Email: braden@isi.edu Email: braden@isi.edu
Van Jacobson Van Jacobson
Packet Design Packet Design
 End of changes. 133 change blocks. 
384 lines changed or deleted 281 lines changed or added

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