draft-ietf-tcpm-accurate-ecn-02.txt   draft-ietf-tcpm-accurate-ecn-03.txt 
TCP Maintenance & Minor Extensions (tcpm) B. Briscoe TCP Maintenance & Minor Extensions (tcpm) B. Briscoe
Internet-Draft Simula Research Laboratory Internet-Draft Simula Research Laboratory
Intended status: Experimental M. Kuehlewind Intended status: Experimental M. Kuehlewind
Expires: May 4, 2017 ETH Zurich Expires: December 1, 2017 ETH Zurich
R. Scheffenegger R. Scheffenegger
October 31, 2016 May 30, 2017
More Accurate ECN Feedback in TCP More Accurate ECN Feedback in TCP
draft-ietf-tcpm-accurate-ecn-02 draft-ietf-tcpm-accurate-ecn-03
Abstract Abstract
Explicit Congestion Notification (ECN) is a mechanism where network Explicit Congestion Notification (ECN) is a mechanism where network
nodes can mark IP packets instead of dropping them to indicate nodes can mark IP packets instead of dropping them to indicate
incipient congestion to the end-points. Receivers with an ECN- incipient congestion to the end-points. Receivers with an ECN-
capable transport protocol feed back this information to the sender. capable transport protocol feed back this information to the sender.
ECN is specified for TCP in such a way that only one feedback signal ECN is specified for TCP in such a way that only one feedback signal
can be transmitted per Round-Trip Time (RTT). Recently, new TCP can be transmitted per Round-Trip Time (RTT). Recently, new TCP
mechanisms like Congestion Exposure (ConEx) or Data Center TCP mechanisms like Congestion Exposure (ConEx) or Data Center TCP
skipping to change at page 1, line 44 skipping to change at page 1, line 44
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 May 4, 2017. This Internet-Draft will expire on December 1, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2017 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Document Roadmap . . . . . . . . . . . . . . . . . . . . 4 1.1. Document Roadmap . . . . . . . . . . . . . . . . . . . . 4
1.2. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3. Experiment Goals . . . . . . . . . . . . . . . . . . . . 5 1.3. Experiment Goals . . . . . . . . . . . . . . . . . . . . 5
1.4. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 1.4. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6
1.5. Recap of Existing ECN feedback in IP/TCP . . . . . . . . 6 1.5. Recap of Existing ECN feedback in IP/TCP . . . . . . . . 6
2. AccECN Protocol Overview and Rationale . . . . . . . . . . . 7 2. AccECN Protocol Overview and Rationale . . . . . . . . . . . 7
2.1. Capability Negotiation . . . . . . . . . . . . . . . . . 8 2.1. Capability Negotiation . . . . . . . . . . . . . . . . . 8
2.2. Feedback Mechanism . . . . . . . . . . . . . . . . . . . 8 2.2. Feedback Mechanism . . . . . . . . . . . . . . . . . . . 9
2.3. Delayed ACKs and Resilience Against ACK Loss . . . . . . 9 2.3. Delayed ACKs and Resilience Against ACK Loss . . . . . . 9
2.4. Feedback Metrics . . . . . . . . . . . . . . . . . . . . 10 2.4. Feedback Metrics . . . . . . . . . . . . . . . . . . . . 10
2.5. Generic (Dumb) Reflector . . . . . . . . . . . . . . . . 10 2.5. Generic (Dumb) Reflector . . . . . . . . . . . . . . . . 10
3. AccECN Protocol Specification . . . . . . . . . . . . . . . . 11 3. AccECN Protocol Specification . . . . . . . . . . . . . . . . 11
3.1. Negotiation during the TCP handshake . . . . . . . . . . 11 3.1. Negotiating to use AccECN . . . . . . . . . . . . . . . . 11
3.2. AccECN Feedback . . . . . . . . . . . . . . . . . . . . . 14 3.1.1. Negotiation during the TCP handshake . . . . . . . . 11
3.2.1. The ACE Field . . . . . . . . . . . . . . . . . . . . 14 3.1.2. Retransmission of the SYN . . . . . . . . . . . . . . 14
3.2.2. Safety against Ambiguity of the ACE Field . . . . . . 16 3.2. AccECN Feedback . . . . . . . . . . . . . . . . . . . . . 15
3.2.3. The AccECN Option . . . . . . . . . . . . . . . . . . 16 3.2.1. The ACE Field . . . . . . . . . . . . . . . . . . . . 15
3.2.4. Path Traversal of the AccECN Option . . . . . . . . . 17 3.2.2. Testing for Zeroing of the ACE Field . . . . . . . . 16
3.2.5. Usage of the AccECN TCP Option . . . . . . . . . . . 19 3.2.3. Safety against Ambiguity of the ACE Field . . . . . . 17
3.2.4. The AccECN Option . . . . . . . . . . . . . . . . . . 17
3.2.5. Path Traversal of the AccECN Option . . . . . . . . . 19
3.2.6. Usage of the AccECN TCP Option . . . . . . . . . . . 22
3.3. AccECN Compliance by TCP Proxies, Offload Engines and 3.3. AccECN Compliance by TCP Proxies, Offload Engines and
other Middleboxes . . . . . . . . . . . . . . . . . . . . 20 other Middleboxes . . . . . . . . . . . . . . . . . . . . 23
4. Interaction with Other TCP Variants . . . . . . . . . . . . . 21 4. Interaction with Other TCP Variants . . . . . . . . . . . . . 24
4.1. Compatibility with SYN Cookies . . . . . . . . . . . . . 21 4.1. Compatibility with SYN Cookies . . . . . . . . . . . . . 24
4.2. Compatibility with Other TCP Options and Experiments . . 21 4.2. Compatibility with Other TCP Options and Experiments . . 25
4.3. Compatibility with Feedback Integrity Mechanisms . . . . 21 4.3. Compatibility with Feedback Integrity Mechanisms . . . . 25
5. Protocol Properties . . . . . . . . . . . . . . . . . . . . . 23 5. Protocol Properties . . . . . . . . . . . . . . . . . . . . . 26
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28
7. Security Considerations . . . . . . . . . . . . . . . . . . . 25 7. Security Considerations . . . . . . . . . . . . . . . . . . . 29
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 29
9. Comments Solicited . . . . . . . . . . . . . . . . . . . . . 26 9. Comments Solicited . . . . . . . . . . . . . . . . . . . . . 30
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 26 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 30
10.1. Normative References . . . . . . . . . . . . . . . . . . 27 10.1. Normative References . . . . . . . . . . . . . . . . . . 30
10.2. Informative References . . . . . . . . . . . . . . . . . 27 10.2. Informative References . . . . . . . . . . . . . . . . . 30
Appendix A. Example Algorithms . . . . . . . . . . . . . . . . . 29 Appendix A. Example Algorithms . . . . . . . . . . . . . . . . . 33
A.1. Example Algorithm to Encode/Decode the AccECN Option . . 29 A.1. Example Algorithm to Encode/Decode the AccECN Option . . 33
A.2. Example Algorithm for Safety Against Long Sequences of A.2. Example Algorithm for Safety Against Long Sequences of
ACK Loss . . . . . . . . . . . . . . . . . . . . . . . . 30 ACK Loss . . . . . . . . . . . . . . . . . . . . . . . . 34
A.2.1. Safety Algorithm without the AccECN Option . . . . . 30 A.2.1. Safety Algorithm without the AccECN Option . . . . . 34
A.2.2. Safety Algorithm with the AccECN Option . . . . . . . 32 A.2.2. Safety Algorithm with the AccECN Option . . . . . . . 36
A.3. Example Algorithm to Estimate Marked Bytes from Marked A.3. Example Algorithm to Estimate Marked Bytes from Marked
Packets . . . . . . . . . . . . . . . . . . . . . . . . . 33 Packets . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.4. Example Algorithm to Beacon AccECN Options . . . . . . . 34 A.4. Example Algorithm to Beacon AccECN Options . . . . . . . 38
A.5. Example Algorithm to Count Not-ECT Bytes . . . . . . . . 35 A.5. Example Algorithm to Count Not-ECT Bytes . . . . . . . . 39
Appendix B. Alternative Design Choices (To Be Removed Before Appendix B. Alternative Design Choices (To Be Removed Before
Publication) . . . . . . . . . . . . . . . . . . . . 35 Publication) . . . . . . . . . . . . . . . . . . . . 39
Appendix C. Open Protocol Design Issues (To Be Removed Before Appendix C. Open Protocol Design Issues (To Be Removed Before
Publication) . . . . . . . . . . . . . . . . . . . . 36 Publication) . . . . . . . . . . . . . . . . . . . . 40
Appendix D. Changes in This Version (To Be Removed Before Appendix D. Changes in This Version (To Be Removed Before
Publication) . . . . . . . . . . . . . . . . . . . . 37 Publication) . . . . . . . . . . . . . . . . . . . . 40
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 40
1. Introduction 1. Introduction
Explicit Congestion Notification (ECN) [RFC3168] is a mechanism where Explicit Congestion Notification (ECN) [RFC3168] is a mechanism where
network nodes can mark IP packets instead of dropping them to network nodes can mark IP packets instead of dropping them to
indicate incipient congestion to the end-points. Receivers with an indicate incipient congestion to the end-points. Receivers with an
ECN-capable transport protocol feed back this information to the ECN-capable transport protocol feed back this information to the
sender. ECN is specified for TCP in such a way that only one sender. ECN is specified for TCP in such a way that only one
feedback signal can be transmitted per Round-Trip Time (RTT). feedback signal can be transmitted per Round-Trip Time (RTT).
Recently, proposed mechanisms like Congestion Exposure (ConEx Recently, proposed mechanisms like Congestion Exposure (ConEx
[I-D.ietf-conex-abstract-mech]) or DCTCP [I-D.bensley-tcpm-dctcp] [RFC7713]), DCTCP [I-D.ietf-tcpm-dctcp] or L4S
need more accurate ECN feedback information whenever more than one [I-D.ietf-tsvwg-l4s-arch] need more accurate ECN feedback information
marking is received in one RTT. A fuller treatment of the motivation whenever more than one marking is received in one RTT. A fuller
for this specification is given in the associated requirements treatment of the motivation for this specification is given in the
document [RFC7560]. associated requirements document [RFC7560].
This documents specifies an experimental scheme for ECN feedback in This documents specifies an experimental scheme for ECN feedback in
the TCP header to provide more than one feedback signal per RTT. It the TCP header to provide more than one feedback signal per RTT. It
will be called the more accurate ECN feedback scheme, or AccECN for will be called the more accurate ECN feedback scheme, or AccECN for
short. If AccECN progresses from experimental to the standards short. If AccECN progresses from experimental to the standards
track, it is intended to be a complete replacement for classic ECN track, it is intended to be a complete replacement for classic ECN
feedback, not a fork in the design of TCP. Thus, the applicability feedback, not a fork in the design of TCP. Thus, the applicability
of AccECN is intended to include all public and private IP networks of AccECN is intended to include all public and private IP networks
(and even any non-IP networks over which TCP is used today). Until (and even any non-IP networks over which TCP is used today). Until
the AccECN experiment succeeds, [RFC3168] will remain as the the AccECN experiment succeeds, [RFC3168] will remain as the
standards track specification for adding ECN to TCP. To avoid standards track specification for adding ECN to TCP. To avoid
confusion, in this document we use the term 'classic ECN' for the confusion, in this document we use the term 'classic ECN' for the
pre-existing ECN specification [RFC3168]. pre-existing ECN specification [RFC3168].
AccECN is solely an (experimental) change to the TCP wire protocol. AccECN feedback overloads flags and fields in the main TCP header
It is completely independent of how TCP might respond to congestion with new definitions, so both ends have to support the new wire
feedback. This specification overloads flags and fields in the main protocol before it can be used. Therefore during the TCP handshake
TCP header with new definitions, so both ends have to support the new the two ends use the three ECN-related flags in the TCP header to
wire protocol before it can be used. Therefore during the TCP negotiate the most advanced feedback protocol that they can both
handshake the two ends use the three ECN-related flags in the TCP support.
header to negotiate the most advanced feedback protocol that they can
both support. AccECN is solely an (experimental) change to the TCP wire protocol;
it only specifies the negotiation and signaling of more accurate ECN
feedback from a TCP Data Receiver to a Data Sender. It is completely
independent of how TCP might respond to congestion feedback, which is
out of scope. For that we refer to [RFC3168] or any RFC that
specifies a different response to TCP ECN feedback, for example:
[I-D.ietf-tcpm-dctcp]; or the ECN experiments referred to in
[I-D.ietf-tsvwg-ecn-experimentation], namely: a TCP-based Low Latency
Low Loss Scalable (L4S) congestion control [I-D.ietf-tsvwg-l4s-arch];
ECN-capable TCP control packets [I-D.bagnulo-tcpm-generalized-ecn],
or Alternative Backoff with ECN (ABE)
[I-D.ietf-tcpm-alternativebackoff-ecn].
It is likely (but not required) that the AccECN protocol will be It is likely (but not required) that the AccECN protocol will be
implemented along with the following experimental additions to the implemented along with the following experimental additions to the
TCP-ECN protocol: ECN-capable SYN/ACK [RFC5562], ECN path-probing and TCP-ECN protocol: ECN-capable TCP control packets and retransmissions
fall-back [I-D.kuehlewind-tcpm-ecn-fallback] and testing receiver [I-D.bagnulo-tcpm-generalized-ecn], which includes the ECN-capable
non-compliance [I-D.moncaster-tcpm-rcv-cheat]. SYN-ACK experiment [RFC5562]; and testing receiver non-compliance
[I-D.moncaster-tcpm-rcv-cheat].
1.1. Document Roadmap 1.1. Document Roadmap
The following introductory sections outline the goals of AccECN The following introductory sections outline the goals of AccECN
(Section 1.2) and the goal of experiments with ECN (Section 1.3) so (Section 1.2) and the goal of experiments with ECN (Section 1.3) so
that it is clear what success would look like. Then terminology is that it is clear what success would look like. Then terminology is
defined (Section 1.4) and a recap of existing prerequisite technology defined (Section 1.4) and a recap of existing prerequisite technology
is given (Section 1.5). is given (Section 1.5).
Section 2 gives an informative overview of the AccECN protocol. Then Section 2 gives an informative overview of the AccECN protocol. Then
skipping to change at page 5, line 32 skipping to change at page 5, line 46
The experimental protocol will be considered successful if it The experimental protocol will be considered successful if it
satisfies the requirements of [RFC7560] in the consensus opinion of satisfies the requirements of [RFC7560] in the consensus opinion of
the IETF tcpm working group. In short, this requires that it the IETF tcpm working group. In short, this requires that it
improves the accuracy and timeliness of TCP's ECN feedback, as improves the accuracy and timeliness of TCP's ECN feedback, as
claimed in Section 5, while striking a balance between the claimed in Section 5, while striking a balance between the
conflicting requirements of resilience, integrity and minimisation of conflicting requirements of resilience, integrity and minimisation of
overhead. It also requires that it is not unduly complex, and that overhead. It also requires that it is not unduly complex, and that
it is compatible with prevalent equipment behaviours in the current it is compatible with prevalent equipment behaviours in the current
Internet, whether or not they comply with standards. Internet, whether or not they comply with standards.
Testing will mostly focus on fall-back strategies in case of
middlebox interference. Current recommended strategies are specified
in Sections 3.1.2, 3.2.2 and 3.2.5. The effectiveness of these
strategies depends on the actual deployment situation of middleboxes.
Therefore experimental verification to confirm large-scale path
traversal in the Internet is needed to finalize this specification on
Standards Track.
1.4. Terminology 1.4. Terminology
AccECN: The more accurate ECN feedback scheme will be called AccECN AccECN: The more accurate ECN feedback scheme will be called AccECN
for short. for short.
Classic ECN: the ECN protocol specified in [RFC3168]. Classic ECN: the ECN protocol specified in [RFC3168].
Classic ECN feedback: the feedback aspect of the ECN protocol Classic ECN feedback: the feedback aspect of the ECN protocol
specified in [RFC3168], including generation, encoding, specified in [RFC3168], including generation, encoding,
transmission and decoding of feedback, but not the Data Sender's transmission and decoding of feedback, but not the Data Sender's
skipping to change at page 7, line 7 skipping to change at page 7, line 31
the SYN/ACK. On reception of a CE-marked packet at the IP layer, the the SYN/ACK. On reception of a CE-marked packet at the IP layer, the
Data Receiver starts to set the Echo Congestion Experienced (ECE) Data Receiver starts to set the Echo Congestion Experienced (ECE)
flag continuously in the TCP header of ACKs, which ensures the signal flag continuously in the TCP header of ACKs, which ensures the signal
is received reliably even if ACKs are lost. The TCP sender confirms is received reliably even if ACKs are lost. The TCP sender confirms
that it has received at least one ECE signal by responding with the that it has received at least one ECE signal by responding with the
congestion window reduced (CWR) flag, which allows the TCP receiver congestion window reduced (CWR) flag, which allows the TCP receiver
to stop repeating the ECN-Echo flag. This always leads to a full RTT to stop repeating the ECN-Echo flag. This always leads to a full RTT
of ACKs with ECE set. Thus any additional CE markings arriving of ACKs with ECE set. Thus any additional CE markings arriving
within this RTT cannot be fed back. within this RTT cannot be fed back.
The ECN Nonce [RFC3540] is an optional experimental addition to ECN The last bit in byte 13 of the TCP header was defined as the Nonce
that the TCP sender can use to protect against accidental or Sum (NS) for the ECN Nonce [RFC3540]. RFC 3540 was never deployed so
malicious concealment of marked or dropped packets. The sender can it is being reclassified as historic, making this TCP flag available
send an ECN nonce, which is a continuous pseudo-random pattern of for use by the AccECN experiment instead.
ECT(0) and ECT(1) codepoints in the ECN field. The receiver is
required to feed back a 1-bit nonce sum that counts the occurrence of
ECT(1) packets using the last bit of byte 13 in the TCP header, which
is defined as the Nonce Sum (NS) flag.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| | | N | C | E | U | A | P | R | S | F | | | | N | C | E | U | A | P | R | S | F |
| Header Length | Reserved | S | W | C | R | C | S | S | Y | I | | Header Length | Reserved | S | W | C | R | C | S | S | Y | I |
| | | | R | E | G | K | H | T | N | N | | | | | R | E | G | K | H | T | N | N |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
Figure 1: The (post-ECN Nonce) definition of the TCP header flags Figure 1: The (post-ECN Nonce) definition of the TCP header flags
skipping to change at page 9, line 12 skipping to change at page 9, line 33
the number of packets arriving marked with a CE codepoint (including the number of packets arriving marked with a CE codepoint (including
control packets without payload if they are CE-marked). control packets without payload if they are CE-marked).
The Data Sender maintains four equivalent counters for the half The Data Sender maintains four equivalent counters for the half
connection, and the AccECN protocol is designed to ensure they will connection, and the AccECN protocol is designed to ensure they will
match the values in the Data Receiver's counters, albeit after a match the values in the Data Receiver's counters, albeit after a
little delay. little delay.
Each ACK carries the three least significant bits (LSBs) of the Each ACK carries the three least significant bits (LSBs) of the
packet-based CE counter using the ECN bits in the TCP header, now packet-based CE counter using the ECN bits in the TCP header, now
renamed the Accurate ECN (ACE) field. The LSBs of each of the three renamed the Accurate ECN (ACE) field (see Figure 2 later). The LSBs
byte counters are carried in the AccECN Option. of each of the three byte counters are carried in the AccECN Option.
2.3. Delayed ACKs and Resilience Against ACK Loss 2.3. Delayed ACKs and Resilience Against ACK Loss
With both the ACE and the AccECN Option mechanisms, the Data Receiver With both the ACE and the AccECN Option mechanisms, the Data Receiver
continually repeats the current LSBs of each of its respective continually repeats the current LSBs of each of its respective
counters. Then, even if some ACKs are lost, the Data Sender should counters. Then, even if some ACKs are lost, the Data Sender should
be able to infer how much to increment its own counters, even if the be able to infer how much to increment its own counters, even if the
protocol field has wrapped. protocol field has wrapped.
The 3-bit ACE field can wrap fairly frequently. Therefore, even if The 3-bit ACE field can wrap fairly frequently. Therefore, even if
skipping to change at page 9, line 44 skipping to change at page 10, line 17
their size has been chosen such that a whole cycle of the field would their size has been chosen such that a whole cycle of the field would
never occur between ACKs unless there had been an infeasibly long never occur between ACKs unless there had been an infeasibly long
sequence of ACK losses. Therefore, as long as the AccECN Option is sequence of ACK losses. Therefore, as long as the AccECN Option is
available, it can be treated as a dependable feedback channel. available, it can be treated as a dependable feedback channel.
If the AccECN Option is not available, e.g. it is being stripped by a If the AccECN Option is not available, e.g. it is being stripped by a
middlebox, the AccECN protocol will only feed back information on CE middlebox, the AccECN protocol will only feed back information on CE
markings (using the ACE field). Although not ideal, this will be markings (using the ACE field). Although not ideal, this will be
sufficient, because it is envisaged that neither ECT(0) nor ECT(1) sufficient, because it is envisaged that neither ECT(0) nor ECT(1)
will ever indicate more severe congestion than CE, even though future will ever indicate more severe congestion than CE, even though future
uses for ECT(0) or ECT(1) are still unclear. Because the 3-bit ACE uses for ECT(0) or ECT(1) are still unclear
field is so small, when it is the only field available the Data [I-D.ietf-tsvwg-ecn-experimentation]. Because the 3-bit ACE field is
Sender has to interpret it conservatively assuming the worst possible so small, when it is the only field available the Data Sender has to
wrap. interpret it conservatively assuming the worst possible wrap.
Certain specified events trigger the Data Receiver to include an Certain specified events trigger the Data Receiver to include an
AccECN Option on an ACK. The rules are designed to ensure that the AccECN Option on an ACK. The rules are designed to ensure that the
order in which different markings arrive at the receiver is order in which different markings arrive at the receiver is
communicated to the sender (as long as there is no ACK loss). communicated to the sender (as long as there is no ACK loss).
Implementations are encouraged to send an AccECN Option more Implementations are encouraged to send an AccECN Option more
frequently, but this is left up to the implementer. frequently, but this is left up to the implementer.
2.4. Feedback Metrics 2.4. Feedback Metrics
The CE packet counter in the ACE field and the CE byte counter in the The CE packet counter in the ACE field and the CE byte counter in the
AccECN Option both provide feedback on received CE-marks. The CE AccECN Option both provide feedback on received CE-marks. The CE
packet counter includes control packets that do not have payload packet counter includes control packets that do not have payload
data, while the CE byte counter solely includes marked payload bytes. data, while the CE byte counter solely includes marked payload bytes.
If both are present, the byte counter in the option will provide the If both are present, the byte counter in the option will provide the
skipping to change at page 10, line 44 skipping to change at page 11, line 17
For this reason, AccECN is designed to be a generic reflector of For this reason, AccECN is designed to be a generic reflector of
whatever ECN markings it sees, whether or not they are compliant with whatever ECN markings it sees, whether or not they are compliant with
a current standard. Then as standards evolve, Data Senders can a current standard. Then as standards evolve, Data Senders can
upgrade unilaterally without any need for receivers to upgrade too. upgrade unilaterally without any need for receivers to upgrade too.
It is also useful to be able to rely on generic reflection behaviour It is also useful to be able to rely on generic reflection behaviour
when senders need to test for unexpected interference with markings when senders need to test for unexpected interference with markings
(for instance [I-D.kuehlewind-tcpm-ecn-fallback] and (for instance [I-D.kuehlewind-tcpm-ecn-fallback] and
[I-D.moncaster-tcpm-rcv-cheat]). [I-D.moncaster-tcpm-rcv-cheat]).
The initial SYN is the most critical control packet, so AccECN The initial SYN is the most critical control packet, so AccECN
provides feedback on whether it is CE marked, even though it is not provides feedback on whether it is CE marked. Although RFC 3168
allowed to be ECN-capable according to RFC 3168. However, prohibits an ECN-capable SYN, providing feedback of CE marking on the
middleboxes have been known to overwrite the ECN IP field as if it is SYN supports future scenarios in which SYNs might be ECN-enabled
still part of the old Type of Service (ToS) field. If a TCP client (without prejudging whether they ought to be). For instance,
has set the SYN to Not-ECT, but receives CE feedback, it can detect [I-D.ietf-tsvwg-ecn-experimentation] updates this aspect of RFC 3168
such middlebox interference and send Not-ECT for the rest of the to allow experimentation with ECN-capable TCP control packets.
connection (see [I-D.kuehlewind-tcpm-ecn-fallback] for the detailed
fall-back behaviour).
Even if the TCP client has set the SYN to not-ECT in compliance with
RFC 3168, feedback on whether it has been CE-marked could still be
useful, because middleboxes have been known to overwrite the ECN IP
field as if it is still part of the old Type of Service (ToS) field.
If a TCP client has set the SYN to Not-ECT, but receives CE feedback,
it can detect such middlebox interference and send Not-ECT for the
rest of the connection (see [I-D.kuehlewind-tcpm-ecn-fallback]).
Today, if a TCP server receives CE on a SYN, it cannot know whether Today, if a TCP server receives CE on a SYN, it cannot know whether
it is invalid (or valid) because only the TCP client knows whether it it is invalid (or valid) because only the TCP client knows whether it
originally marked the SYN as Not-ECT (or ECT). Therefore, the originally marked the SYN as Not-ECT (or ECT). Therefore, prior to
server's only safe course of action is to disable ECN for the AccECN, the server's only safe course of action was to disable ECN
connection. Instead, the AccECN protocol allows the server to feed for the connection. Instead, the AccECN protocol allows the server
back the CE marking to the client, which then has all the information to feed back the CE marking to the client, which then has all the
to decide whether the connection has to fall-back from supporting ECN information to decide whether the connection has to fall-back from
(or not). supporting ECN (or not).
Providing feedback of CE marking on the SYN also supports future
scenarios in which SYNs might be ECN-enabled (without prejudging
whether they ought to be). For instance, in certain environments
such as data centres, it might be appropriate to allow ECN-capable
SYNs. Then, if feedback showed the SYN had been CE marked, the TCP
client could reduce its initial window (IW). It could also reduce IW
conservatively if feedback showed the receiver did not support ECN
(because if there had been a CE marking, the receiver would not have
understood it). Note that this text merely motivates dumb reflection
of CE on a SYN, it does not judge whether a SYN ought to be ECN-
capable.
3. AccECN Protocol Specification 3. AccECN Protocol Specification
3.1. Negotiation during the TCP handshake 3.1. Negotiating to use AccECN
3.1.1. Negotiation during the TCP handshake
Given the ECN Nonce [RFC3540] is being reclassified as historic, the
present specification renames the TCP flag at bit 7 of the TCP header
flags from NS (Nonce Sum) to AE (Accurate ECN) (see IANA
Considerations in Section 6).
During the TCP handshake at the start of a connection, to request During the TCP handshake at the start of a connection, to request
more accurate ECN feedback the TCP client (host A) MUST set the TCP more accurate ECN feedback the TCP client (host A) MUST set the TCP
flags NS=1, CWR=1 and ECE=1 in the initial SYN segment. flags AE=1, CWR=1 and ECE=1 in the initial SYN segment.
If a TCP server (B) that is AccECN enabled receives a SYN with the If a TCP server (B) that is AccECN-enabled receives a SYN with the
above three flags set, it MUST set both its half connections into above three flags set, it MUST set both its half connections into
AccECN mode. Then it MUST set the flags CWR=1 and ECE=0 on its AccECN mode. Then it MUST set the TCP flags CWR=1 and ECE=0 on its
response in the SYN/ACK segment to confirm that it supports AccECN. response in the SYN/ACK segment to confirm that it supports AccECN.
The TCP server MUST NOT set this combination of flags unless the The TCP server MUST NOT set this combination of flags unless the
preceding SYN requested support for AccECN as above. preceding SYN requested support for AccECN as above.
A TCP server in AccECN mode MUST additionally set the flag NS=1 on A TCP server in AccECN mode MUST additionally set the TCP flag AE=1
the SYN/ACK if the SYN was CE-marked (see Section 2.5). If the on the SYN/ACK if the IP/ECN field of the SYN was CE-marked (see
received SYN was Not-ECT, ECT(0) or ECT(1), it MUST clear NS (NS=0) Section 2.5 for rationale). If the IP/ECN field of the received SYN
was Not-ECT, ECT(0) or ECT(1), it MUST clear the TCP AE flag (AE=0)
on the SYN/ACK. on the SYN/ACK.
Once a TCP client (A) has sent the above SYN to declare that it Once a TCP client (A) has sent the above SYN to declare that it
supports AccECN, and once it has received the above SYN/ACK segment supports AccECN, and once it has received the above SYN/ACK segment
that confirms that the TCP server supports AccECN, the TCP client that confirms that the TCP server supports AccECN, the TCP client
MUST set both its half connections into AccECN mode. MUST set both its half connections into AccECN mode.
If after the normal TCP timeout the TCP client has not received a The procedure for the client to follow if a SYN/ACK does not arrive
SYN/ACK to acknowledge its SYN, the SYN might just have been lost, before its retransmission timer expires is given in Section 3.1.2.
e.g. due to congestion, or a middlebox might be blocking segments
with the AccECN flags. To expedite connection setup, the host SHOULD
fall back to NS=CWR=ECE=0 on the retransmission of the SYN. It would
make sense to also remove any other experimental fields or options on
the SYN in case a middlebox might be blocking them, although the
required behaviour will depend on the specification of the other
option(s) and any attempt to co-ordinate fall-back between different
modules of the stack. Implementers MAY use other fall-back
strategies if they are found to be more effective (e.g. attempting to
retransmit a second AccECN segment before fall-back, falling back to
classic ECN feedback rather than non-ECN, and/or caching the result
of a previous attempt to access the same host while negotiating
AccECN).
The fall-back procedure if the TCP server receives no ACK to
acknowledge a SYN/ACK that tried to negotiate AccECN is specified in
Section 3.2.4.
The three flags set to 1 to indicate AccECN support on the SYN have The three flags set to 1 to indicate AccECN support on the SYN have
been carefully chosen to enable natural fall-back to prior stages in been carefully chosen to enable natural fall-back to prior stages in
the evolution of ECN. Table 2 tabulates all the negotiation the evolution of ECN. Table 2 tabulates all the negotiation
possibilities for ECN-related capabilities that involve at least one possibilities for ECN-related capabilities that involve at least one
AccECN-capable host. To compress the width of the table, the AccECN-capable host. The entries in the first two columns have been
headings of the first four columns have been severely abbreviated, as abbreviated, as follows:
follows:
Ac: More *Ac*curate ECN Feedback AccECN: More Accurate ECN Feedback (the present specification)
N: ECN-*N*once [RFC3540] Nonce: ECN Nonce feedback [RFC3540]
E: *E*CN [RFC3168] ECN: 'Classic' ECN feedback [RFC3168]
I: Not-ECN (*I*mplicit congestion notification using packet drop). No ECN: Not-ECN-capable. Implicit congestion notification using
packet drop.
+----+---+---+---+------------+--------------+----------------------+ +--------+---------+------------+--------------+--------------------+
| Ac | N | E | I | SYN A->B | SYN/ACK B->A | Feedback Mode | | A | B | SYN A->B | SYN/ACK B->A | Feedback Mode |
+----+---+---+---+------------+--------------+----------------------+ +--------+---------+------------+--------------+--------------------+
| | | | | NS CWR ECE | NS CWR ECE | | | | | AE CWR ECE | AE CWR ECE | |
| AB | | | | 1 1 1 | 0 1 0 | AccECN | | AccECN | AccECN | 1 1 1 | 0 1 0 | AccECN |
| AB | | | | 1 1 1 | 1 1 0 | AccECN (CE on SYN) | | AccECN | AccECN | 1 1 1 | 1 1 0 | AccECN (CE on SYN) |
| | | | | | | | | | | | | |
| A | B | | | 1 1 1 | 1 0 1 | classic ECN | | AccECN | Nonce | 1 1 1 | 1 0 1 | classic ECN |
| A | | B | | 1 1 1 | 0 0 1 | classic ECN | | AccECN | ECN | 1 1 1 | 0 0 1 | classic ECN |
| A | | | B | 1 1 1 | 0 0 0 | Not ECN | | AccECN | No ECN | 1 1 1 | 0 0 0 | Not ECN |
| | | | | | | | | | | | | |
| B | A | | | 0 1 1 | 0 0 1 | classic ECN | | Nonce | AccECN | 0 1 1 | 0 0 1 | classic ECN |
| B | | A | | 0 1 1 | 0 0 1 | classic ECN | | ECN | AccECN | 0 1 1 | 0 0 1 | classic ECN |
| B | | | A | 0 0 0 | 0 0 0 | Not ECN | | No ECN | AccECN | 0 0 0 | 0 0 0 | Not ECN |
| | | | | | | | | | | | | |
| A | | | B | 1 1 1 | 1 1 1 | Not ECN (broken) | | AccECN | Broken | 1 1 1 | 1 1 1 | Not ECN |
| A | | | | 1 1 1 | 0 1 1 | Not ECN (see Appx B) | | AccECN | AccECN+ | 1 1 1 | 0 1 1 | AccECN (CU) |
| A | | | | 1 1 1 | 1 0 0 | Not ECN (see Appx B) | | AccECN | AccECN+ | 1 1 1 | 1 0 0 | AccECN (CU) |
+----+---+---+---+------------+--------------+----------------------+ +--------+---------+------------+--------------+--------------------+
Table 2: ECN capability negotiation between Originator (A) and Table 2: ECN capability negotiation between Client (A) and Server (B)
Responder (B)
Table 2 is divided into blocks each separated by an empty row. Table 2 is divided into blocks each separated by an empty row.
1. The top block shows the case already described where both 1. The top block shows the case already described where both
endpoints support AccECN and how the TCP server (B) indicates endpoints support AccECN and how the TCP server (B) indicates
congestion feedback. congestion feedback.
2. The second block shows the cases where the TCP client (A) 2. The second block shows the cases where the TCP client (A)
supports AccECN but the TCP server (B) supports some earlier supports AccECN but the TCP server (B) supports some earlier
variant of TCP feedback, indicated in its SYN/ACK. Therefore, as variant of TCP feedback, indicated in its SYN/ACK. Therefore, as
skipping to change at page 13, line 49 skipping to change at page 13, line 48
mode shown in the rightmost column. mode shown in the rightmost column.
3. The third block shows the cases where the TCP server (B) supports 3. The third block shows the cases where the TCP server (B) supports
AccECN but the TCP client (A) supports some earlier variant of AccECN but the TCP client (A) supports some earlier variant of
TCP feedback, indicated in its SYN. Therefore, as soon as an TCP feedback, indicated in its SYN. Therefore, as soon as an
AccECN-enabled TCP server (B) receives the SYN shown, it MUST set AccECN-enabled TCP server (B) receives the SYN shown, it MUST set
both its half connections into the feedback mode shown in the both its half connections into the feedback mode shown in the
rightmost column. rightmost column.
4. The fourth block displays combinations that are not valid or 4. The fourth block displays combinations that are not valid or
currently unused and therefore both ends MUST fall-back to Not currently unused. The first case (labelled `Broken' is where all
ECN for both half connections. Especially the first case (marked bits set in the SYN are reflected by the receiver in the SYN/ACK,
`broken') where all bits set in the SYN are reflected by the which happens quite often if the TCP connection is proxied. In
receiver in the SYN/ACK, which happens quite often if the TCP this case, both ends MUST fall-back to Not ECN for both half
connection is proxied.{ToDo: Consider using the last two cases connections. The other two cases (labelled 'AccECN (CU)') are
for AccECN f/b of ECT(0) and ECT(1) on the SYN (Appendix B)} currently unassigned and available for an RFC to extend TCP in
future, tagged as 'AccECN+' (see Appendix B for possible uses).
For forward compatibility, as soon as an AccECN-capable TCP
client (A) receives either of these SYN/ACKs it MUST set both its
half connections into AccECN mode, as if the SYN/ACK had been
AE=0, CWR=1, ECE=0.
The following exceptional cases need some explanation: The following exceptional cases need some explanation:
ECN Nonce: An AccECN implementation, whether client or server, ECN Nonce: An AccECN implementation, whether client or server,
sender or receiver, does not need to implement the ECN Nonce sender or receiver, does not need to implement the ECN Nonce
behaviour [RFC3540]. AccECN is compatible with an alternative ECN feedback mode [RFC3540], which is being reclassified as historic
feedback integrity approach that does not use up the ECT(1) [I-D.ietf-tsvwg-ecn-experimentation]. AccECN is compatible with
codepoint and can be implemented solely at the sender (see an alternative ECN feedback integrity approach that does not use
Section 4.3). up the ECT(1) codepoint and can be implemented solely at the
sender (see Section 4.3).
Simultaneous Open: An originating AccECN Host (A), having sent a SYN Simultaneous Open: An originating AccECN Host (A), having sent a SYN
with NS=1, CWR=1 and ECE=1, might receive another SYN from host B. with AE=1, CWR=1 and ECE=1, might receive another SYN from host B.
Host A MUST then enter the same feedback mode as it would have Host A MUST then enter the same feedback mode as it would have
entered had it been a responding host and received the same SYN. entered had it been a responding host and received the same SYN.
Then host A MUST send the same SYN/ACK as it would have sent had Then host A MUST send the same SYN/ACK as it would have sent had
it been a responding host (see the third block above). it been a responding host (see the third block above).
3.1.2. Retransmission of the SYN
If the sender of an AccECN SYN times out before receiving the SYN/
ACK, the sender SHOULD attempt to negotiate the use of AccECN at
least one more time by continuing to set all three TCP ECN flags on
the first retransmitted SYN (using the usual retransmission time-
outs). If this first retransmission also fails to be acknowledged,
the sender SHOULD send subsequent retransmissions of the SYN without
any ECN flags set. This adds delay, in the case where a middlebox
drops an AccECN (or ECN) SYN deliberately. However, current
measurements imply that a drop is less likely to be due to middlebox
interference than other intermittent causes of loss, e.g. congestion,
wireless interference, etc.
Implementers MAY use other fall-back strategies if they are found to
be more effective (e.g. attempting to retransmit an AccECN SYN only
once or more than twice (most appropriate during high levels of
congestion); or falling back to classic ECN feedback rather than non-
ECN). Further it may make sense to also remove any other
experimental fields or options on the SYN in case a middlebox might
be blocking them, although the required behaviour will depend on the
specification of the other option(s) and any attempt to co-ordinate
fall-back between different modules of the stack. In any case, the
TCP initiator SHOULD cache failed connection attempts. If it does,
it SHOULD NOT give up attempting to negotiate AccECN on the SYN of
subsequent connection attempts until it is clear that the blockage is
persistently and specifically due to AccECN. The cache should be
arranged to expire so that the initiator will infrequently attempt to
check whether the problem has been resolved.
The fall-back procedure if the TCP server receives no ACK to
acknowledge a SYN/ACK that tried to negotiate AccECN is specified in
Section 3.2.5.
3.2. AccECN Feedback 3.2. AccECN Feedback
Each Data Receiver maintains four counters, r.cep, r.ceb, r.e0b and Each Data Receiver maintains four counters, r.cep, r.ceb, r.e0b and
r.e1b. The CE packet counter (r.cep), counts the number of packets r.e1b. The CE packet counter (r.cep), counts the number of packets
the host receives with the CE code point in the IP ECN field, the host receives with the CE code point in the IP ECN field,
including CE marks on control packets without data. r.ceb, r.e0b and including CE marks on control packets without data. r.ceb, r.e0b and
r.e1b count the number of TCP payload bytes in packets marked r.e1b count the number of TCP payload bytes in packets marked
respectively with the CE, ECT(0) and ECT(1) codepoint in their IP-ECN respectively with the CE, ECT(0) and ECT(1) codepoint in their IP-ECN
field. When a host first enters AccECN mode, it initialises its field. When a host first enters AccECN mode, it initialises its
counters to r.cep = 6, r.e0b = 1 and r.ceb = r.e1b.= 0 (see counters to r.cep = 6, r.e0b = 1 and r.ceb = r.e1b.= 0 (see
Appendix A.5). Non-zero initial values are used to be distinct from Appendix A.5). Non-zero initial values are used to support a
cases where the fields are incorrectly zeroed (e.g. by middleboxes). stateless handshake (see Section 4.1) and to be distinct from cases
where the fields are incorrectly zeroed (e.g. by middleboxes - see
Section 3.2.5.4).
A host feeds back the CE packet counter using the Accurate ECN (ACE) A host feeds back the CE packet counter using the Accurate ECN (ACE)
field, as explained in the next section. And it feeds back all the field, as explained in the next section. And it feeds back all the
byte counters using the AccECN TCP Option, as specified in byte counters using the AccECN TCP Option, as specified in
Section 3.2.3. Whenever a host feeds back the value of any counter, Section 3.2.4. Whenever a host feeds back the value of any counter,
it MUST report the most recent value, no matter whether it is in a it MUST report the most recent value, no matter whether it is in a
pure ACK, an ACK with new payload data or a retransmission. pure ACK, an ACK with new payload data or a retransmission.
3.2.1. The ACE Field 3.2.1. The ACE Field
After AccECN has been negotiated on the SYN and SYN/ACK, both hosts After AccECN has been negotiated on the SYN and SYN/ACK, both hosts
overload the three TCP flags ECE, CWR and NS in the main TCP header overload the three TCP flags (AE, CWR and ECE) in the main TCP header
as one 3-bit field. Then the field is given a new name, ACE, as as one 3-bit field. Then the field is given a new name, ACE, as
shown in Figure 2. shown in Figure 2.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| | | | U | A | P | R | S | F | | | | | U | A | P | R | S | F |
| Header Length | Reserved | ACE | R | C | S | S | Y | I | | Header Length | Reserved | ACE | R | C | S | S | Y | I |
| | | | G | K | H | T | N | N | | | | | G | K | H | T | N | N |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
Figure 2: Definition of the ACE field within bytes 13 and 14 of the Figure 2: Definition of the ACE field within bytes 13 and 14 of the
TCP Header (when AccECN has been negotiated and SYN=0). TCP Header (when AccECN has been negotiated and SYN=0).
The original definition of these three flags in the TCP header, The original definition of these three flags in the TCP header,
including the addition of support for the ECN Nonce, is shown for including the addition of support for the ECN Nonce, is shown for
comparison in Figure 1. This specification does not rename these comparison in Figure 1. This specification does not rename these
three TCP flags, it merely overloads them with another name and three TCP flags to ACE for always; it merely overloads them with
definition once an AccECN connection has been established. another name and definition once an AccECN connection has been
established.
A host MUST interpret the ECE, CWR and NS flags as the 3-bit ACE A host MUST interpret the AE, CWR and ECE flags as the 3-bit ACE
counter on a segment with SYN=0 that it sends or receives if both of counter on a segment with the SYN flag cleared (SYN=0) that it sends
its half-connections are set into AccECN mode having successfully or receives if both of its half-connections are set into AccECN mode
negotiated AccECN (see Section 3.1). A host MUST NOT interpret the 3 having successfully negotiated AccECN (see Section 3.1). A host MUST
flags as a 3-bit ACE field on any segment with SYN=1 (whether ACK is NOT interpret the 3 flags as a 3-bit ACE field on any segment with
0 or 1), or if AccECN negotiation is incomplete or has not succeeded. SYN=1 (whether ACK is 0 or 1), or if AccECN negotiation is incomplete
or has not succeeded.
Both parts of each of these conditions are equally important. For Both parts of each of these conditions are equally important. For
instance, even if AccECN negotiation has been successful, the ACE instance, even if AccECN negotiation has been successful, the ACE
field is not defined on any segments with SYN=1 (e.g. a field is not defined on any segments with SYN=1 (e.g. a
retransmission of an unacknowledged SYN/ACK, or when both ends send retransmission of an unacknowledged SYN/ACK, or when both ends send
SYN/ACKs after AccECN support has been successfully negotiated during SYN/ACKs after AccECN support has been successfully negotiated during
a simultaneous open). a simultaneous open).
The ACE field encodes the three least significant bits of the r.cep The ACE field encodes the three least significant bits of the r.cep
counter, therefore its initial value will be 0b110 (decimal 6). This counter, therefore its initial value will be 0b110 (decimal 6). If
non-zero initialization allows a TCP server to use a stateless the SYN/ACK was CE marked, the client MUST increase its r.cep counter
handshake (see Section 4.1) but still detect from the TCP client's before it sends its first ACK, therefore the initial value of the ACE
first ACK that the client considers it has successfully negotiated field will be 0b111 (decimal 7). To support a stateless handshake
AccECN. If the SYN/ACK was CE marked, the client MUST increase its (see Section 4.1), these values have been chosen deliberately so that
r.cep counter before it sends its first ACK, therefore the initial they are distinct from [RFC5562] behaviour, where the TCP client
value of the ACE field will be 0b111 (decimal 7). These values have would set ECE on the first ACK as feedback for a CE mark on the SYN/
deliberately been chosen such that they are distinct from [RFC5562] ACK.
behaviour, where the TCP client would set ECE on the first ACK as
feedback for a CE mark on the SYN/ACK.
If the value of the ACE field on the first segment with SYN=0 in 3.2.2. Testing for Zeroing of the ACE Field
either direction is anything other than 0b110 or 0b111, the Data
Receiver MUST disable ECN for the remainder of the half-connection by
marking all subsequent packets as Not-ECT.
3.2.2. Safety against Ambiguity of the ACE Field Section 3.2.1 required the Data Receiver to initialize the r.cep
counter to a non-zero value. Therefore, in either direction the
initial value of the ACE field ought to be non-zero.
If AccECN has been successfully negotiated, the Data Sender SHOULD
check the initial value of the ACE field in the first arriving
segment with SYN=0. If the initial value of the ACE field is zero
(0b000), the Data Sender MUST disable sending ECN-capable packets for
the remainder of the half-connection by setting the IP/ECN field in
all subsequent packets to Not-ECT.
For example, the server checks the ACK of the SYN/ACK or the first
data segment from the client, while the client checks the first data
segment from the server. More precisely, the "first segment with
SYN=0" is defined as: the segment with SYN=0 that i) acknowledges
sequence space at least covering the initial sequence number (ISN)
plus 1; and ii) arrives before any other segments with SYN=0 so it is
unlikely to be a retransmission. If no such segment arrives (e.g.
because it is lost and the ISN is first acknowledged by a subsequent
segment), no test for invalid initialization can be conducted, and
the half-connection will continue in AccECN mode.
Note that the Data Sender MUST NOT test whether the arriving counter
in the initial ACE field has been initialized to a specific valid
value - the above check solely tests whether the ACE fields have been
incorrectly zeroed. This allows hosts to use different initial
values as an additional signalling channel in future.
3.2.3. Safety against Ambiguity of the ACE Field
If too many CE-marked segments are acknowledged at once, or if a long If too many CE-marked segments are acknowledged at once, or if a long
run of ACKs is lost, the 3-bit counter in the ACE field might have run of ACKs is lost, the 3-bit counter in the ACE field might have
cycled between two ACKs arriving at the Data Sender. cycled between two ACKs arriving at the Data Sender.
Therefore an AccECN Data Receiver SHOULD immediately send an ACK once Therefore an AccECN Data Receiver SHOULD immediately send an ACK once
'n' CE marks have arrived since the previous ACK, where 'n' SHOULD be 'n' CE marks have arrived since the previous ACK, where 'n' SHOULD be
2 and MUST be no greater than 6. 2 and MUST be no greater than 6.
If the Data Sender has not received AccECN TCP Options to give it If the Data Sender has not received AccECN TCP Options to give it
skipping to change at page 16, line 30 skipping to change at page 17, line 43
since the last ACK to calculate or estimate how many segments could since the last ACK to calculate or estimate how many segments could
have been acknowledged. An example algorithm to implement this have been acknowledged. An example algorithm to implement this
policy is given in Appendix A.2. An implementer MAY develop an policy is given in Appendix A.2. An implementer MAY develop an
alternative algorithm as long as it satisfies these requirements. alternative algorithm as long as it satisfies these requirements.
If missing acknowledgement numbers arrive later (reordering) and If missing acknowledgement numbers arrive later (reordering) and
prove that the counter did not cycle, the Data Sender MAY attempt to prove that the counter did not cycle, the Data Sender MAY attempt to
neutralise the effect of any action it took based on a conservative neutralise the effect of any action it took based on a conservative
assumption that it later found to be incorrect. assumption that it later found to be incorrect.
3.2.3. The AccECN Option 3.2.4. The AccECN Option
The AccECN Option is defined as shown below in Figure 3. It consists The AccECN Option is defined as shown below in Figure 3. It consists
of three 24-bit fields that provide the 24 least significant bits of of three 24-bit fields that provide the 24 least significant bits of
the r.e0b, r.ceb and r.e1b counters, respectively. The initial 'E' the r.e0b, r.ceb and r.e1b counters, respectively. The initial 'E'
of each field name stands for 'Echo'. of each field name stands for 'Echo'.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Kind = TBD1 | Length = 11 | EE0B field | | Kind = TBD1 | Length = 11 | EE0B field |
skipping to change at page 17, line 14 skipping to change at page 18, line 31
Appendix A.1 gives an example algorithm for the Data Receiver to Appendix A.1 gives an example algorithm for the Data Receiver to
encode its byte counters into the AccECN Option, and for the Data encode its byte counters into the AccECN Option, and for the Data
Sender to decode the AccECN Option fields into its byte counters. Sender to decode the AccECN Option fields into its byte counters.
Note that there is no field to feedback Not-ECT bytes. Nonetheless Note that there is no field to feedback Not-ECT bytes. Nonetheless
an algorithm for the Data Sender to calculate the number of payload an algorithm for the Data Sender to calculate the number of payload
bytes received as Not-ECT is given in Appendix A.5. bytes received as Not-ECT is given in Appendix A.5.
Whenever a Data Receiver sends an AccECN Option, the rules in Whenever a Data Receiver sends an AccECN Option, the rules in
Section 3.2.5 expect it to always send a full-length option. To cope Section 3.2.6 expect it to always send a full-length option. To cope
with option space limitations, it can omit unchanged fields from the with option space limitations, it can omit unchanged fields from the
tail of the option, as long as it preserves the order of the tail of the option, as long as it preserves the order of the
remaining fields and includes any field that has changed. The length remaining fields and includes any field that has changed. The length
field MUST indicate which fields are present as follows: field MUST indicate which fields are present as follows:
Length=11: EE0B, ECEB, EE1B Length=11: EE0B, ECEB, EE1B
Length=8: EE0B, ECEB Length=8: EE0B, ECEB
Length=5: EE0B Length=5: EE0B
skipping to change at page 17, line 38 skipping to change at page 19, line 9
The empty option of Length=2 is provided to allow for a case where an The empty option of Length=2 is provided to allow for a case where an
AccECN Option has to be sent (e.g. on the SYN/ACK to test the path), AccECN Option has to be sent (e.g. on the SYN/ACK to test the path),
but there is very limited space for the option. For initial but there is very limited space for the option. For initial
experiments, the Length field MUST be 2 greater to accommodate the experiments, the Length field MUST be 2 greater to accommodate the
16-bit magic number. 16-bit magic number.
All implementations of a Data Sender MUST be able to read in AccECN All implementations of a Data Sender MUST be able to read in AccECN
Options of any of the above lengths. They MUST ignore an AccECN Options of any of the above lengths. They MUST ignore an AccECN
Option of any other length. Option of any other length.
3.2.4. Path Traversal of the AccECN Option 3.2.5. Path Traversal of the AccECN Option
An AccECN host MUST NOT include the AccECN TCP Option on the SYN. 3.2.5.1. Testing the AccECN Option during the Handshake
The TCP client MUST NOT include the AccECN TCP Option on the SYN.
Nonetheless, if the AccECN negotiation using the ECN flags in the Nonetheless, if the AccECN negotiation using the ECN flags in the
main TCP header (Section 3.1) is successful, it implicitly declares main TCP header (Section 3.1) is successful, it implicitly declares
that the endpoints also support the AccECN TCP Option. that the endpoints also support the AccECN TCP Option. A fall-back
strategy for the loss of the SYN (possibly due to middlebox
interference) is specified in Section 3.1.2.
If the TCP client indicated AccECN support, a TCP server tha confirms A TCP server that confirms its support for AccECN (in response to an
its support for AccECN (as described in Section 3.1) SHOULD also AccECN SYN from the client as described in Section 3.1) SHOULD also
include an AccECN TCP Option in the SYN/ACK. A TCP client that has include an AccECN TCP Option in the SYN/ACK.
successfully negotiated AccECN SHOULD include an AccECN Option in the
first ACK at the end of the 3WHS. However, this first ACK is not
delivered reliably, so the TCP client SHOULD also include an AccECN
Option on the first data segment it sends (if it ever sends one). A
host MAY NOT include an AccECN Option in any of these three cases if
it has cached knowledge that the packet would be likely to be blocked
on the path to the other host if it included an AccECN Option.
If the TCP client has successfully negotiated AccECN but does not A TCP client that has successfully negotiated AccECN SHOULD include
receive an AccECN Option on the SYN/ACK, it switches into a mode that an AccECN Option in the first ACK at the end of the 3WHS. However,
assumes that the AccECN Option is not available for this half this first ACK is not delivered reliably, so the TCP client SHOULD
connection. Similarly, if the TCP server has successfully negotiated also include an AccECN Option on the first data segment it sends (if
AccECN but does not receive an AccECN Option on the first ACK or on it ever sends one).
the first data segment, it switches into a mode that assumes that the
AccECN Option is not available for this half connection.
While a host is in the mode that assumes the AccECN Option is not A host MAY NOT include an AccECN Option in any of these three cases
available, it MUST adopt the conservative interpretation of the ACE if it has cached knowledge that the packet would be likely to be
field discussed in Section 3.2.2. However, it cannot make any blocked on the path to the other host if it included an AccECN
assumption about support of the AccECN Option on the other half Option.
connection, so it MUST continue to send the AccECN Option itself.
3.2.5.2. Testing for Loss of Packets Carrying the AccECN Option
If after the normal TCP timeout the TCP server has not received an If after the normal TCP timeout the TCP server has not received an
ACK to acknowledge its SYN/ACK, the SYN/ACK might just have been ACK to acknowledge its SYN/ACK, the SYN/ACK might just have been
lost, e.g. due to congestion, or a middlebox might be blocking the lost, e.g. due to congestion, or a middlebox might be blocking the
AccECN Option. To expedite connection setup, the host SHOULD fall AccECN Option. To expedite connection setup, the TCP server SHOULD
back to NS=CWR=ECE=0 and no AccECN Option on the retransmission of retransmit the SYN/ACK with the same TCP flags (AE, CWR and ECE) but
the SYN/ACK. Implementers MAY use other fall-back strategies if they with no AccECN Option. If this retransmission times out, to expedite
are found to be more effective (e.g. retransmitting a SYN/ACK with connection setup, the TCP server SHOULD disable AccECN and ECN for
AccECN TCP flags but not the AccECN Option; attempting to retransmit this connection by retransmitting the SYN/ACK with AE=CWR=ECE=0 and
a second AccECN segment before fall-back (most appropriate during no AccECN Option. Implementers MAY use other fall-back strategies if
high levels of congestion); or falling back to classic ECN feedback they are found to be more effective (e.g. falling back to classic
rather than non-ECN). ECN feedback on the first retransmission; retrying the AccECN Option
for a second time before fall-back (most appropriate during high
levels of congestion); or falling back to classic ECN feedback rather
than non-ECN on the third retransmission).
Similarly, if the TCP client detects that the first data segment it If the TCP client detects that the first data segment it sent with
sent with the AccECN Option was lost, it SHOULD fall back to no the AccECN Option was lost, it SHOULD fall back to no AccECN Option
AccECN Option on the retransmission. Again, implementers MAY use on the retransmission. Again, implementers MAY use other fall-back
other fall-back strategies such as attempting to retransmit a second strategies such as attempting to retransmit a second segment with the
segment with the AccECN Option before fall-back, and/or caching the AccECN Option before fall-back, and/or caching whether the AccECN
result of previous attempts. Option is blocked for subsequent connections.
Either host MAY include the AccECN Option in a subsequent segment to Either host MAY include the AccECN Option in a subsequent segment to
retest whether the AccECN Option can traverse the path. retest whether the AccECN Option can traverse the path.
Currently the Data Sender is not required to test whether the If the TCP server receives a second SYN with a request for AccECN
arriving byte counters in the AccECN Option have been correctly support, it should resend the SYN/ACK, again confirming its support
initialised. This allows different initial values to be used as an for AccECN, but this time without the AccECN Option. This approach
additional signalling channel in future. If any inappropriate rules out any interference by middleboxes that may drop packets with
zeroing of these fields is discovered during testing, this approach unknown options, even though it is more likely that the SYN/ACK would
will need to be reviewed. have been lost due to congestion. The TCP server MAY try to send
another packet with the AccECN Option at a later point during the
connection but should monitor if that packet got lost as well, in
which case it SHOULD disable the sending of the AccECN Option for
this half-connection.
3.2.5. Usage of the AccECN TCP Option Similarly, an AccECN end-point MAY separately memorize which data
packets carried an AccECN Option and disable the sending of AccECN
Options if the loss probability of those packets is significantly
higher than that of all other data packets in the same connection.
3.2.5.3. Testing for Stripping of the AccECN Option
If the TCP client has successfully negotiated AccECN but does not
receive an AccECN Option on the SYN/ACK, it switches into a mode that
assumes that the AccECN Option is not available for this half
connection.
Similarly, if the TCP server has successfully negotiated AccECN but
does not receive an AccECN Option on the first segment that
acknowledges sequence space at least covering the ISN, it switches
into a mode that assumes that the AccECN Option is not available for
this half connection.
While a host is in this mode that assumes incoming AccECN Options are
not available, it MUST adopt the conservative interpretation of the
ACE field discussed in Section 3.2.3. However, it cannot make any
assumption about support of outgoing AccECN Options on the other half
connection, so it SHOULD continue to send the AccECN Option itself
(unless it has established that sending the AccECN Option is causing
packets to be blocked as in Section 3.2.5.2).
If a host is in the mode that assumes incoming AccECN Options are not
available, but it receives an AccECN Option at any later point during
the connection, this clearly indicates that the AccECN Option is not
blocked on the respective path, and the AccECN endpoint MAY switch
out of the mode that assumes the AccECN Option is not available for
this half connection.
3.2.5.4. Test for Zeroing of the AccECN Option
For a related test for invalid initialization of the ACE field, see
Section 3.2.2
Section 3.2 required the Data Receiver to initialize the r.e0b
counter to a non-zero value. Therefore, in either direction the
initial value of the EE0B field in the AccECN Option (if one exists)
ought to be non-zero. If AccECN has been negotiated:
o the TCP server MAY check the initial value of the EE0B field in
the first segment that acknowledges sequence space that at least
covers the ISN plus 1. If the initial value of the EE0B field is
zero, the server will switch into a mode that ignores the AccECN
Option for this half connection.
o the TCP client MAY check the initial value of the EE0B field on
the SYN/ACK. If the initial value of the EE0B field is zero, the
client will switch into a mode that ignores the AccECN Option for
this half connection.
While a host is in the mode that ignores the AccECN Option it MUST
adopt the conservative interpretation of the ACE field discussed in
Section 3.2.3.
Note that the Data Sender MUST NOT test whether the arriving byte
counters in the initial AccECN Option have been initialized to
specific valid values - the above checks solely test whether these
fields have been incorrectly zeroed. This allows hosts to use
different initial values as an additional signalling channel in
future. Also note that the initial value of either field might be
greater than its expected initial value, because the counters might
already have been incremented. Nonetheless, the initial values of
the counters have been chosen so that they cannot wrap to zero on
these initial segments.
3.2.5.5. Consistency between AccECN Feedback Fields
When the AccECN Option is available it supplements but does not
replace the ACE field. An endpoint using AccECN feedback MUST always
consider the information provided in the ACE field whether or not the
AccECN Option is also available.
If the AccECN option is present, the s.cep counter might increase
while the s.ceb counter does not (e.g. due to a CE-marked control
packet). The sender's response to such a situation is out of scope,
and needs to be dealt with in a specification that uses ECN-capable
control packets. Theoretically, this situation could also occur if a
middlebox mangled the AccECN Option but not the ACE field. However,
the Data Sender has to assume that the integrity of the AccECN Option
is sound, based on the above test of the well-known initial values
and optionally other integrity tests (Section 4.3).
If either end-point detects that the s.ceb counter has increased but
the s.cep has not (and by testing ACK coverage it is certain how much
the ACE field has wrapped), this invalid protocol transition has to
be due to some form of feedback mangling. So, the Data Sender MUST
disable sending ECN-capable packets for the remainder of the half-
connection by setting the IP/ECN field in all subsequent packets to
Not-ECT.
3.2.6. Usage of the AccECN TCP Option
The following rules determine when a Data Receiver in AccECN mode The following rules determine when a Data Receiver in AccECN mode
sends the AccECN TCP Option, and which fields to include: sends the AccECN TCP Option, and which fields to include:
Change-Triggered ACKs: If an arriving packet increments a different Change-Triggered ACKs: If an arriving packet increments a different
byte counter to that incremented by the previous packet, the Data byte counter to that incremented by the previous packet, the Data
Receiver SHOULD immediately send an ACK with an AccECN Option, Receiver SHOULD immediately send an ACK with an AccECN Option,
without waiting for the next delayed ACK. Certain offload without waiting for the next delayed ACK (this is in addition to
hardware might not be able to support change-triggered ACKs, but the safety recommendation in Section 3.2.3 against ambiguity of
otherwise it is important to keep exceptions to this rule to a the ACE field). Certain offload hardware might not be able to
minimum so that Data Senders can generally rely on this behaviour; support change-triggered ACKs, but otherwise it is important to
keep exceptions to this rule to a minimum so that Data Senders can
generally rely on this behaviour;
Continual Repetition: Otherwise, if arriving packets continue to Continual Repetition: Otherwise, if arriving packets continue to
increment the same byte counter, the Data Receiver can include an increment the same byte counter, the Data Receiver can include an
AccECN Option on most or all (delayed) ACKs, but it does not have AccECN Option on most or all (delayed) ACKs, but it does not have
to. If option space is limited on a particular ACK, the Data to. If option space is limited on a particular ACK, the Data
Receiver MUST give precedence to SACK information about loss. It Receiver MUST give precedence to SACK information about loss. It
SHOULD include an AccECN Option if the r.ceb counter has SHOULD include an AccECN Option if the r.ceb counter has
incremented and it MAY include an AccECN Option if r.ec0b or incremented and it MAY include an AccECN Option if r.ec0b or
r.ec1b has incremented; r.ec1b has incremented;
Full-Length Options Preferred: It SHOULD always use full-length Full-Length Options Preferred: It SHOULD always use full-length
AccECN Options. It MAY use shorter AccECN Options if space is AccECN Options. It MAY use shorter AccECN Options if space is
limited, but it MUST include the counter(s) that have incremented limited, but it MUST include the counter(s) that have incremented
since the previous AccECN Option and it MUST only truncate fields since the previous AccECN Option and it MUST only truncate fields
from the right-hand tail of the option to preserve the order of from the right-hand tail of the option to preserve the order of
the remaining fields (see Section 3.2.3); the remaining fields (see Section 3.2.4);
Beaconing Full-Length Options: Nonetheless, it MUST include a full- Beaconing Full-Length Options: Nonetheless, it MUST include a full-
length AccECN TCP Option on at least three ACKs per RTT, or on all length AccECN TCP Option on at least three ACKs per RTT, or on all
ACKs if there are less than three per RTT (see Appendix A.4 for an ACKs if there are less than three per RTT (see Appendix A.4 for an
example algorithm that satisfies this requirement). example algorithm that satisfies this requirement).
The following example series of arriving marks illustrates when a The following example series of arriving IP/ECN fields illustrates
Data Receiver will emit an ACK if it is using a delayed ACK factor of when a Data Receiver will emit an ACK if it is using a delayed ACK
2 segments and change-triggered ACKs: 01 -> ACK, 01, 01 -> ACK, 10 -> factor of 2 segments and change-triggered ACKs: 01 -> ACK, 01, 01 ->
ACK, 10, 01 -> ACK, 01, 11 -> ACK, 01 -> ACK. ACK, 10 -> ACK, 10, 01 -> ACK, 01, 11 -> ACK, 01 -> ACK.
For the avoidance of doubt, the change-triggered ACK mechanism For the avoidance of doubt, the change-triggered ACK mechanism is
ignores the arrival of a control packet with no payload, because it deliberately worded to ignore the arrival of a control packet with no
does not alter any byte counters. The change-triggered ACK approach payload, which therefore does not alter any byte counters, because it
will lead to some additional ACKs but it feeds back the timing and is important that TCP does not acknowledge pure ACKs. The change-
the order in which ECN marks are received with minimal additional triggered ACK approach will lead to some additional ACKs but it feeds
complexity. back the timing and the order in which ECN marks are received with
minimal additional complexity.
Implementation note: sending an AccECN Option each time a different Implementation note: sending an AccECN Option each time a different
counter changes and including a full-length AccECN Option on every counter changes and including a full-length AccECN Option on every
delayed ACK will satisfy the requirements described above and might delayed ACK will satisfy the requirements described above and might
be the easiest implementation, as long as sufficient space is be the easiest implementation, as long as sufficient space is
available in each ACK (in total and in the option space). available in each ACK (in total and in the option space).
Appendix A.3 gives an example algorithm to estimate the number of Appendix A.3 gives an example algorithm to estimate the number of
marked bytes from the ACE field alone, if the AccECN Option is not marked bytes from the ACE field alone, if the AccECN Option is not
available. available.
skipping to change at page 20, line 24 skipping to change at page 23, line 48
obliged to follow the above rules. obliged to follow the above rules.
3.3. AccECN Compliance by TCP Proxies, Offload Engines and other 3.3. AccECN Compliance by TCP Proxies, Offload Engines and other
Middleboxes Middleboxes
A large class of middleboxes split TCP connections. Such a middlebox A large class of middleboxes split TCP connections. Such a middlebox
would be compliant with the AccECN protocol if the TCP implementation would be compliant with the AccECN protocol if the TCP implementation
on each side complied with the present AccECN specification and each on each side complied with the present AccECN specification and each
side negotiated AccECN independently of the other side. side negotiated AccECN independently of the other side.
Another large class of middleboxes intervene to some degree at the Another large class of middleboxes intervenes to some degree at the
transport layer, but attempts to be transparent (invisible) to the transport layer, but attempts to be transparent (invisible) to the
end-to-end connection. A subset of this class of middleboxes end-to-end connection. A subset of this class of middleboxes
attempts to `normalise' the TCP wire protocol by checking that all attempts to `normalise' the TCP wire protocol by checking that all
values in header fields comply with a rather narrow interpretation of values in header fields comply with a rather narrow interpretation of
the TCP specifications. To comply with the present AccECN the TCP specifications. To comply with the present AccECN
specification, such a middlebox MUST NOT change the ACE field or the specification, such a middlebox MUST NOT change the ACE field or the
AccECN Option and it MUST attempt to preserve the timing of each ACK AccECN Option and it MUST attempt to preserve the timing of each ACK
(for example, if it coalesced ACKs it would not be AccECN-compliant). (for example, if it coalesced ACKs it would not be AccECN-compliant).
A middlebox claiming to be transparent at the transport layer MUST A middlebox claiming to be transparent at the transport layer MUST
forward the AccECN TCP Option unaltered, whether or not the length forward the AccECN TCP Option unaltered, whether or not the length
value matches one of those specified in Section 3.2.3, and whether or value matches one of those specified in Section 3.2.4, and whether or
not the initial values of the byte-counter fields are correct. This not the initial values of the byte-counter fields are correct. This
is because blocking apparently invalid values does not improve is because blocking apparently invalid values does not improve
security (because AccECN hosts are required to ignore invalid values security (because AccECN hosts are required to ignore invalid values
anyway), while it prevents the standardised set of values being anyway), while it prevents the standardised set of values being
extended in future (because outdated normalisers would block updated extended in future (because outdated normalisers would block updated
hosts from using the extended AccECN standard). hosts from using the extended AccECN standard).
Hardware to offload certain TCP processing represents another large Hardware to offload certain TCP processing represents another large
class of middleboxes, even though it is often a function of a host's class of middleboxes, even though it is often a function of a host's
network interface and rarely in its own 'box'. Leeway has been network interface and rarely in its own 'box'. Leeway has been
skipping to change at page 21, line 21 skipping to change at page 24, line 44
A TCP server can use SYN Cookies (see Appendix A of [RFC4987]) to A TCP server can use SYN Cookies (see Appendix A of [RFC4987]) to
protect itself from SYN flooding attacks. It places minimal commonly protect itself from SYN flooding attacks. It places minimal commonly
used connection state in the SYN/ACK, and deliberately does not hold used connection state in the SYN/ACK, and deliberately does not hold
any state while waiting for the subsequent ACK (e.g. it closes the any state while waiting for the subsequent ACK (e.g. it closes the
thread). Therefore it cannot record the fact that it entered AccECN thread). Therefore it cannot record the fact that it entered AccECN
mode for both half-connections. Indeed, it cannot even remember mode for both half-connections. Indeed, it cannot even remember
whether it negotiated the use of classic ECN [RFC3168]. whether it negotiated the use of classic ECN [RFC3168].
Nonetheless, such a server can determine that it negotiated AccECN as Nonetheless, such a server can determine that it negotiated AccECN as
follows. If a TCP server using SYN Cookies supports AccECN and if follows. If a TCP server using SYN Cookies supports AccECN and if
the first ACK it receives contains an ACE field with the value 0b110 the first segment it receives that at least covers the ISN contains
or 0b111, it can assume that: an ACE field with the value 0b110 or 0b111, it can assume that:
o the TCP client must have requested AccECN support on the SYN o the TCP client must have requested AccECN support on the SYN
o it (the server) must have confirmed that it supported AccECN o it (the server) must have confirmed that it supported AccECN
Therefore the server can switch itself into AccECN mode, and continue Therefore the server can switch itself into AccECN mode, and continue
as if it had never forgotten that it switched itself into AccECN mode as if it had never forgotten that it switched itself into AccECN mode
earlier. earlier. For other values of ACE field, heuristics to infer what
other type of ECN the client supports are out of scope.
4.2. Compatibility with Other TCP Options and Experiments 4.2. Compatibility with Other TCP Options and Experiments
AccECN is compatible (at least on paper) with the most commonly used AccECN is compatible (at least on paper) with the most commonly used
TCP options: MSS, time-stamp, window scaling, SACK and TCP-AO. It is TCP options: MSS, time-stamp, window scaling, SACK and TCP-AO. It is
also compatible with the recent promising experimental TCP options also compatible with the recent promising experimental TCP options
TCP Fast Open (TFO [RFC7413]) and Multipath TCP (MPTCP [RFC6824]). TCP Fast Open (TFO [RFC7413]) and Multipath TCP (MPTCP [RFC6824]).
AccECN is friendly to all these protocols, because space for TCP AccECN is friendly to all these protocols, because space for TCP
options is particularly scarce on the SYN, where AccECN consumes zero options is particularly scarce on the SYN, where AccECN consumes zero
additional header space. additional header space.
When option space is under pressure from other options, Section 3.2.5 When option space is under pressure from other options, Section 3.2.6
provides guidance on how important it is to send an AccECN Option and provides guidance on how important it is to send an AccECN Option and
whether it needs to be a full-length option. whether it needs to be a full-length option.
4.3. Compatibility with Feedback Integrity Mechanisms 4.3. Compatibility with Feedback Integrity Mechanisms
The ECN Nonce [RFC3540] is an experimental IETF specification
intended to allow a sender to test whether ECN CE markings (or
losses) introduced in one network are being suppressed by the
receiver or anywhere else in the feedback loop, such as another
network or a middlebox. The ECN nonce has not been deployed as far
as can be ascertained. The nonce would now be nearly impossible to
deploy retrospectively, because to catch a misbehaving receiver it
relies on the receiver volunteering feedback information to
incriminate itself. A receiver that has been modified to misbehave
can simply claim that it does not support nonce feedback, which will
seem unremarkable given so many other hosts do not support it either.
With minor changes AccECN could be optimised for the possibility that
the ECT(1) codepoint might be used as a nonce. However, given the
nonce is now probably undeployable, the AccECN design has been
generalised so that it ought to be able to support other possible
uses of the ECT(1) codepoint, such as a lower severity or a more
instant congestion signal than CE.
Three alternative mechanisms are available to assure the integrity of Three alternative mechanisms are available to assure the integrity of
ECN and/or loss signals. AccECN is compatible with any of these ECN and/or loss signals. AccECN is compatible with any of these
approaches: approaches:
o The Data Sender can test the integrity of the receiver's ECN (or o The Data Sender can test the integrity of the receiver's ECN (or
loss) feedback by occasionally setting the IP-ECN field to a value loss) feedback by occasionally setting the IP-ECN field to a value
normally only set by the network (and/or deliberately leaving a normally only set by the network (and/or deliberately leaving a
sequence number gap). Then it can test whether the Data sequence number gap). Then it can test whether the Data
Receiver's feedback faithfully reports what it expects Receiver's feedback faithfully reports what it expects
[I-D.moncaster-tcpm-rcv-cheat]. Unlike the ECN Nonce, this [I-D.moncaster-tcpm-rcv-cheat]. Unlike the ECN Nonce [RFC3540],
approach does not waste the ECT(1) codepoint in the IP header, it this approach does not waste the ECT(1) codepoint in the IP
does not require standardisation and it does not rely on header, it does not require standardisation and it does not rely
misbehaving receivers volunteering to reveal feedback information on misbehaving receivers volunteering to reveal feedback
that allows them to be detected. However, setting the CE mark by information that allows them to be detected. However, setting the
the sender might conceal actual congestion feedback from the CE mark by the sender might conceal actual congestion feedback
network and should therefore only be done sparsely. from the network and should therefore only be done sparsely.
o Networks generate congestion signals when they are becoming o Networks generate congestion signals when they are becoming
congested, so they are more likely than Data Senders to be congested, so networks are more likely than Data Senders to be
concerned about the integrity of the receiver's feedback of these concerned about the integrity of the receiver's feedback of these
signals. A network can enforce a congestion response to its ECN signals. A network can enforce a congestion response to its ECN
markings (or packet losses) using congestion exposure (ConEx) markings (or packet losses) using congestion exposure (ConEx)
audit [I-D.ietf-conex-abstract-mech]. Whether the receiver or a audit [RFC7713]. Whether the receiver or a downstream network is
downstream network is suppressing congestion feedback or the suppressing congestion feedback or the sender is unresponsive to
sender is unresponsive to the feedback, or both, ConEx audit can the feedback, or both, ConEx audit can neutralise any advantage
neutralise any advantage that any of these three parties would that any of these three parties would otherwise gain.
otherwise gain.
ConEx is a change to the Data Sender that is most useful when ConEx is a change to the Data Sender that is most useful when
combined with AccECN. Without AccECN, the ConEx behaviour of a combined with AccECN. Without AccECN, the ConEx behaviour of a
Data Sender would have to be more conservative than would be Data Sender would have to be more conservative than would be
necessary if it had the accurate feedback of AccECN. necessary if it had the accurate feedback of AccECN.
o The TCP authentication option (TCP-AO [RFC5925]) can be used to o The TCP authentication option (TCP-AO [RFC5925]) can be used to
detect any tampering with AccECN feedback between the Data detect any tampering with AccECN feedback between the Data
Receiver and the Data Sender (whether malicious or accidental). Receiver and the Data Sender (whether malicious or accidental).
The AccECN fields are immutable end-to-end, so they are amenable The AccECN fields are immutable end-to-end, so they are amenable
to TCP-AO protection, which covers TCP options by default. to TCP-AO protection, which covers TCP options by default.
However, TCP-AO is often too brittle to use on many end-to-end However, TCP-AO is often too brittle to use on many end-to-end
paths, where middleboxes can make verification fail in their paths, where middleboxes can make verification fail in their
attempts to improve performance or security, e.g. by attempts to improve performance or security, e.g. by
resegmentation or shifting the sequence space. resegmentation or shifting the sequence space.
Originally the ECN Nonce [RFC3540] was proposed to ensure integrity
of congestion feedback. With minor changes AccECN could be optimised
for the possibility that the ECT(1) codepoint might be used as an ECN
Nonce . However, given RFC 3540 is being reclassified as historic,
the AccECN design has been generalised so that it ought to be able to
support other possible uses of the ECT(1) codepoint, such as a lower
severity or a more instant congestion signal than CE.
5. Protocol Properties 5. Protocol Properties
This section is informative not normative. It describes how well the This section is informative not normative. It describes how well the
protocol satisfies the agreed requirements for a more accurate ECN protocol satisfies the agreed requirements for a more accurate ECN
feedback protocol [RFC7560]. feedback protocol [RFC7560].
Accuracy: From each ACK, the Data Sender can infer the number of new Accuracy: From each ACK, the Data Sender can infer the number of new
CE marked segments since the previous ACK. This provides better CE marked segments since the previous ACK. This provides better
accuracy on CE feedback than classic ECN. In addition if the accuracy on CE feedback than classic ECN. In addition if the
AccECN Option is present (not blocked by the network path) the AccECN Option is present (not blocked by the network path) the
skipping to change at page 25, line 14 skipping to change at page 28, line 25
it can fall back to operation without ECN and/or operation without it can fall back to operation without ECN and/or operation without
the AccECN Option. the AccECN Option.
Forward Compatibility: The behaviour of endpoints and middleboxes is Forward Compatibility: The behaviour of endpoints and middleboxes is
carefully defined for all reserved or currently unused codepoints carefully defined for all reserved or currently unused codepoints
in the scheme, to ensure that any blocking of anomalous values is in the scheme, to ensure that any blocking of anomalous values is
always at least under reversible policy control. always at least under reversible policy control.
6. IANA Considerations 6. IANA Considerations
This document defines a new TCP option for AccECN, assigned a value This document reassigns bit 7 of the TCP header flags to the AccECN
of TBD1 (decimal) from the TCP option space. This value is defined experiment. This bit was previously called the Nonce Sum (NS) flag
as: [RFC3540], but RFC 3540 is being reclassified as historic. The flag
will now be defined as:
+-----+-------------------+-----------+
| Bit | Name | Reference |
+-----+-------------------+-----------+
| 7 | AE (Accurate ECN) | RFC XXXX |
+-----+-------------------+-----------+
[TO BE REMOVED: This registration should take place at the following
location: https://www.iana.org/assignments/tcp-header-flags/tcp-
header-flags.xhtml#tcp-header-flags-1 ]
This document also defines a new TCP option for AccECN, assigned a
value of TBD1 (decimal) from the TCP option space. This value is
defined as:
+------+--------+-----------------------+-----------+ +------+--------+-----------------------+-----------+
| Kind | Length | Meaning | Reference | | Kind | Length | Meaning | Reference |
+------+--------+-----------------------+-----------+ +------+--------+-----------------------+-----------+
| TBD1 | N | Accurate ECN (AccECN) | RFC XXXX | | TBD1 | N | Accurate ECN (AccECN) | RFC XXXX |
+------+--------+-----------------------+-----------+ +------+--------+-----------------------+-----------+
[TO BE REMOVED: This registration should take place at the following [TO BE REMOVED: This registration should take place at the following
location: http://www.iana.org/assignments/tcp-parameters/tcp- location: http://www.iana.org/assignments/tcp-parameters/tcp-
parameters.xhtml#tcp-parameters-1] parameters.xhtml#tcp-parameters-1 ]
Early implementation before the IANA allocation MUST follow [RFC6994] Early implementation before the IANA allocation MUST follow [RFC6994]
and use experimental option 254 and magic number 0xACCE (16 bits) and use experimental option 254 and magic number 0xACCE (16 bits),
{ToDo register this with IANA}, then migrate to the new option after then migrate to the new option after the allocation.
the allocation.
7. Security Considerations 7. Security Considerations
If ever the supplementary part of AccECN based on the new AccECN TCP If ever the supplementary part of AccECN based on the new AccECN TCP
Option is unusable (due for example to middlebox interference) the Option is unusable (due for example to middlebox interference) the
essential part of AccECN's congestion feedback offers only limited essential part of AccECN's congestion feedback offers only limited
resilience to long runs of ACK loss (see Section 3.2.2). These resilience to long runs of ACK loss (see Section 3.2.3). These
problems are unlikely to be due to malicious intervention (because if problems are unlikely to be due to malicious intervention (because if
an attacker could strip a TCP option or discard a long run of ACKs it an attacker could strip a TCP option or discard a long run of ACKs it
could wreak other arbitrary havoc). However, it would be of concern could wreak other arbitrary havoc). However, it would be of concern
if AccECN's resilience could be indirectly compromised during a if AccECN's resilience could be indirectly compromised during a
flooding attack. AccECN is still considered safe though, because if flooding attack. AccECN is still considered safe though, because if
the option is not presented, the AccECN Data Sender is then required the option is not presented, the AccECN Data Sender is then required
to switch to more conservative assumptions about wrap of congestion to switch to more conservative assumptions about wrap of congestion
indication counters (see Section 3.2.2 and Appendix A.2). indication counters (see Section 3.2.3 and Appendix A.2).
Section 4.1 describes how a TCP server can negotiate AccECN and use Section 4.1 describes how a TCP server can negotiate AccECN and use
the SYN cookie method for mitigating SYN flooding attacks. the SYN cookie method for mitigating SYN flooding attacks.
There is concern that ECN markings could be altered or suppressed, There is concern that ECN markings could be altered or suppressed,
particularly because a misbehaving Data Receiver could increase its particularly because a misbehaving Data Receiver could increase its
own throughput at the expense of others. Given the experimental ECN own throughput at the expense of others. AccECN is compatible with
nonce is now probably undeployable, AccECN has been generalised for the three schemes known to assure the integrity of ECN feedback (see
other possible uses of the ECT(1) codepoint to avoid obsolescence of Section 4.3 for details). If the AccECN Option is stripped by an
the codepoint even if the nonce mechanism is obsoleted. AccECN is incorrectly implemented middlebox, the resolution of the feedback
compatible with the three other schemes known to assure the integrity will be degraded, but the integrity of this degraded information can
of ECN feedback (see Section 4.3 for details). If the AccECN Option still be assured.
is stripped by an incorrectly implemented middlebox, the resolution
of the feedback will be degraded, but the integrity of this degraded
information can still be assured.
The AccECN protocol is not believed to introduce any new privacy The AccECN protocol is not believed to introduce any new privacy
concerns, because it merely counts and feeds back signals at the concerns, because it merely counts and feeds back signals at the
transport layer that had already been visible at the IP layer. transport layer that had already been visible at the IP layer.
8. Acknowledgements 8. Acknowledgements
We want to thank Koen De Schepper, Praveen Balasubramanian and We want to thank Koen De Schepper, Praveen Balasubramanian and
Michael Welzl for their input and discussion. The idea of using the Michael Welzl for their input and discussion. The idea of using the
three ECN-related TCP flags as one field for more accurate TCP-ECN three ECN-related TCP flags as one field for more accurate TCP-ECN
skipping to change at page 27, line 26 skipping to change at page 30, line 41
[RFC5681] Allman, M., Paxson, V., and E. Blanton, "TCP Congestion [RFC5681] Allman, M., Paxson, V., and E. Blanton, "TCP Congestion
Control", RFC 5681, DOI 10.17487/RFC5681, September 2009, Control", RFC 5681, DOI 10.17487/RFC5681, September 2009,
<http://www.rfc-editor.org/info/rfc5681>. <http://www.rfc-editor.org/info/rfc5681>.
[RFC6994] Touch, J., "Shared Use of Experimental TCP Options", [RFC6994] Touch, J., "Shared Use of Experimental TCP Options",
RFC 6994, DOI 10.17487/RFC6994, August 2013, RFC 6994, DOI 10.17487/RFC6994, August 2013,
<http://www.rfc-editor.org/info/rfc6994>. <http://www.rfc-editor.org/info/rfc6994>.
10.2. Informative References 10.2. Informative References
[I-D.bensley-tcpm-dctcp] [I-D.bagnulo-tcpm-generalized-ecn]
Bensley, S., Eggert, L., Thaler, D., Balasubramanian, P., Bagnulo, M. and B. Briscoe, "ECN++: Adding Explicit
and G. Judd, "Microsoft's Datacenter TCP (DCTCP): TCP Congestion Notification (ECN) to TCP Control Packets",
Congestion Control for Datacenters", draft-bensley-tcpm- draft-bagnulo-tcpm-generalized-ecn-04 (work in progress),
dctcp-05 (work in progress), July 2015. May 2017.
[I-D.ietf-conex-abstract-mech] [I-D.ietf-tcpm-alternativebackoff-ecn]
Mathis, M. and B. Briscoe, "Congestion Exposure (ConEx) Khademi, N., Welzl, M., Armitage, G., and G. Fairhurst,
Concepts, Abstract Mechanism and Requirements", draft- "TCP Alternative Backoff with ECN (ABE)", draft-ietf-tcpm-
ietf-conex-abstract-mech-13 (work in progress), October alternativebackoff-ecn-01 (work in progress), May 2017.
2014.
[I-D.ietf-tcpm-dctcp]
Bensley, S., Thaler, D., Balasubramanian, P., Eggert, L.,
and G. Judd, "Datacenter TCP (DCTCP): TCP Congestion
Control for Datacenters", draft-ietf-tcpm-dctcp-06 (work
in progress), May 2017.
[I-D.ietf-tsvwg-ecn-experimentation]
Black, D., "Explicit Congestion Notification (ECN)
Experimentation", draft-ietf-tsvwg-ecn-experimentation-02
(work in progress), April 2017.
[I-D.ietf-tsvwg-l4s-arch]
Briscoe, B., Schepper, K., and M. Bagnulo, "Low Latency,
Low Loss, Scalable Throughput (L4S) Internet Service:
Architecture", draft-ietf-tsvwg-l4s-arch-00 (work in
progress), May 2017.
[I-D.kuehlewind-tcpm-ecn-fallback] [I-D.kuehlewind-tcpm-ecn-fallback]
Kuehlewind, M. and B. Trammell, "A Mechanism for ECN Path Kuehlewind, M. and B. Trammell, "A Mechanism for ECN Path
Probing and Fallback", draft-kuehlewind-tcpm-ecn- Probing and Fallback", draft-kuehlewind-tcpm-ecn-
fallback-01 (work in progress), September 2013. fallback-01 (work in progress), September 2013.
[I-D.moncaster-tcpm-rcv-cheat] [I-D.moncaster-tcpm-rcv-cheat]
Moncaster, T., Briscoe, B., and A. Jacquet, "A TCP Test to Moncaster, T., Briscoe, B., and A. Jacquet, "A TCP Test to
Allow Senders to Identify Receiver Non-Compliance", draft- Allow Senders to Identify Receiver Non-Compliance", draft-
moncaster-tcpm-rcv-cheat-03 (work in progress), July 2014. moncaster-tcpm-rcv-cheat-03 (work in progress), July 2014.
skipping to change at page 29, line 5 skipping to change at page 32, line 20
[RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP
Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014,
<http://www.rfc-editor.org/info/rfc7413>. <http://www.rfc-editor.org/info/rfc7413>.
[RFC7560] Kuehlewind, M., Ed., Scheffenegger, R., and B. Briscoe, [RFC7560] Kuehlewind, M., Ed., Scheffenegger, R., and B. Briscoe,
"Problem Statement and Requirements for Increased Accuracy "Problem Statement and Requirements for Increased Accuracy
in Explicit Congestion Notification (ECN) Feedback", in Explicit Congestion Notification (ECN) Feedback",
RFC 7560, DOI 10.17487/RFC7560, August 2015, RFC 7560, DOI 10.17487/RFC7560, August 2015,
<http://www.rfc-editor.org/info/rfc7560>. <http://www.rfc-editor.org/info/rfc7560>.
[RFC7713] Mathis, M. and B. Briscoe, "Congestion Exposure (ConEx)
Concepts, Abstract Mechanism, and Requirements", RFC 7713,
DOI 10.17487/RFC7713, December 2015,
<http://www.rfc-editor.org/info/rfc7713>.
Appendix A. Example Algorithms Appendix A. Example Algorithms
This appendix is informative, not normative. It gives example This appendix is informative, not normative. It gives example
algorithms that would satisfy the normative requirements of the algorithms that would satisfy the normative requirements of the
AccECN protocol. However, implementers are free to choose other ways AccECN protocol. However, implementers are free to choose other ways
to implement the requirements. to implement the requirements.
A.1. Example Algorithm to Encode/Decode the AccECN Option A.1. Example Algorithm to Encode/Decode the AccECN Option
The example algorithms below show how a Data Receiver in AccECN mode The example algorithms below show how a Data Receiver in AccECN mode
skipping to change at page 30, line 22 skipping to change at page 34, line 22
The example algorithms below show how a Data Receiver in AccECN mode The example algorithms below show how a Data Receiver in AccECN mode
could encode its CE packet counter r.cep into the ACE field, and how could encode its CE packet counter r.cep into the ACE field, and how
the Data Sender in AccECN mode could decode the ACE field into its the Data Sender in AccECN mode could decode the ACE field into its
s.cep counter. The Data Sender's algorithm includes code to s.cep counter. The Data Sender's algorithm includes code to
heuristically detect a long enough unbroken string of ACK losses that heuristically detect a long enough unbroken string of ACK losses that
could have concealed a cycle of the congestion counter in the ACE could have concealed a cycle of the congestion counter in the ACE
field of the next ACK to arrive. field of the next ACK to arrive.
Two variants of the algorithm are given: i) a more conservative Two variants of the algorithm are given: i) a more conservative
variant for a Data Sender to use if it detects that the AccECN Option variant for a Data Sender to use if it detects that the AccECN Option
is not available (see Section 3.2.2 and Section 3.2.4); and ii) a is not available (see Section 3.2.3 and Section 3.2.5); and ii) a
less conservative variant that is feasible when complementary less conservative variant that is feasible when complementary
information is available from the AccECN Option. information is available from the AccECN Option.
A.2.1. Safety Algorithm without the AccECN Option A.2.1. Safety Algorithm without the AccECN Option
It is assumed that each local packet counter is a sufficiently sized It is assumed that each local packet counter is a sufficiently sized
unsigned integer (probably 32b) and that the following constant has unsigned integer (probably 32b) and that the following constant has
been assigned: been assigned:
DIVACE = 2^3 DIVACE = 2^3
skipping to change at page 31, line 10 skipping to change at page 35, line 10
and the Data Sender has to ignore the AccECN Option. If newlyAckedB and the Data Sender has to ignore the AccECN Option. If newlyAckedB
is zero, to break the tie the Data Sender could use timestamps (if is zero, to break the tie the Data Sender could use timestamps (if
present) to work out newlyAckedT, the amount of new time that the ACK present) to work out newlyAckedT, the amount of new time that the ACK
acknowledges. Then the Data Sender calculates the minimum difference acknowledges. Then the Data Sender calculates the minimum difference
d.cep between the ACE field and its local s.cep counter, using modulo d.cep between the ACE field and its local s.cep counter, using modulo
arithmetic as follows: arithmetic as follows:
if ((newlyAckedB > 0) || (newlyAckedB == 0 && newlyAckedT > 0)) if ((newlyAckedB > 0) || (newlyAckedB == 0 && newlyAckedT > 0))
d.cep = (ACE + DIVACE - (s.cep % DIVACE)) % DIVACE d.cep = (ACE + DIVACE - (s.cep % DIVACE)) % DIVACE
Section 3.2.2 requires the Data Sender to assume that the ACE field Section 3.2.3 requires the Data Sender to assume that the ACE field
did cycle if it could have cycled under prevailing conditions. The did cycle if it could have cycled under prevailing conditions. The
3-bit ACE field in an arriving ACK could have cycled and become 3-bit ACE field in an arriving ACK could have cycled and become
ambiguous to the Data Sender if a row of ACKs goes missing that ambiguous to the Data Sender if a row of ACKs goes missing that
covers a stream of data long enough to contain 8 or more CE marks. covers a stream of data long enough to contain 8 or more CE marks.
We use the word `missing' rather than `lost', because some or all the We use the word `missing' rather than `lost', because some or all the
missing ACKs might arrive eventually, but out of order. Even if some missing ACKs might arrive eventually, but out of order. Even if some
of the lost ACKs are piggy-backed on data (i.e. not pure ACKs) of the lost ACKs are piggy-backed on data (i.e. not pure ACKs)
retransmissions will not repair the lost AccECN information, because retransmissions will not repair the lost AccECN information, because
AccECN requires retransmissions to carry the latest AccECN counters, AccECN requires retransmissions to carry the latest AccECN counters,
not the original ones. not the original ones.
skipping to change at page 32, line 14 skipping to change at page 36, line 14
The simple algorithm for dSafer.cep above requires no monitoring of The simple algorithm for dSafer.cep above requires no monitoring of
prevailing conditions and it would still be safe if, for example, prevailing conditions and it would still be safe if, for example,
segments were on average at least 5% of full-sized as long as ECN segments were on average at least 5% of full-sized as long as ECN
marking was 5% or less. Assuming it was used, the Data Sender would marking was 5% or less. Assuming it was used, the Data Sender would
increment its packet counter as follows: increment its packet counter as follows:
s.cep += dSafer.cep s.cep += dSafer.cep
If missing acknowledgement numbers arrive later (due to reordering), If missing acknowledgement numbers arrive later (due to reordering),
Section 3.2.2 says "the Data Sender MAY attempt to neutralise the Section 3.2.3 says "the Data Sender MAY attempt to neutralise the
effect of any action it took based on a conservative assumption that effect of any action it took based on a conservative assumption that
it later found to be incorrect". To do this, the Data Sender would it later found to be incorrect". To do this, the Data Sender would
have to store the values of all the relevant variables whenever it have to store the values of all the relevant variables whenever it
made assumptions, so that it could re-evaluate them later. Given made assumptions, so that it could re-evaluate them later. Given
this could become complex and it is not required, we do not attempt this could become complex and it is not required, we do not attempt
to provide an example of how to do this. to provide an example of how to do this.
A.2.2. Safety Algorithm with the AccECN Option A.2.2. Safety Algorithm with the AccECN Option
When the AccECN Option is available on the ACKs before and after the When the AccECN Option is available on the ACKs before and after the
skipping to change at page 34, line 31 skipping to change at page 38, line 31
s_ave = a * s + (1-a) * s_ave, s_ave = a * s + (1-a) * s_ave,
where a is the decay constant for the EWMA. However, then it is where a is the decay constant for the EWMA. However, then it is
necessary to choose a good value for this constant, which ought to necessary to choose a good value for this constant, which ought to
depend on the number of packets in flight. Also the decay constant depend on the number of packets in flight. Also the decay constant
needs to be power of two to avoid floating point arithmetic. needs to be power of two to avoid floating point arithmetic.
A.4. Example Algorithm to Beacon AccECN Options A.4. Example Algorithm to Beacon AccECN Options
Section 3.2.5 requires a Data Receiver to beacon a full-length AccECN Section 3.2.6 requires a Data Receiver to beacon a full-length AccECN
Option at least 3 times per RTT. This could be implemented by Option at least 3 times per RTT. This could be implemented by
maintaining a variable to store the number of ACKs (pure and data maintaining a variable to store the number of ACKs (pure and data
ACKs) since a full AccECN Option was last sent and another for the ACKs) since a full AccECN Option was last sent and another for the
approximate number of ACKs sent in the last round trip time: approximate number of ACKs sent in the last round trip time:
if (acks_since_full_last_sent > acks_in_round / BEACON_FREQ) if (acks_since_full_last_sent > acks_in_round / BEACON_FREQ)
send_full_AccECN_Option() send_full_AccECN_Option()
For optimised integer arithmetic, BEACON_FREQ = 4 could be used, For optimised integer arithmetic, BEACON_FREQ = 4 could be used,
rather than 3, so that the division could be implemented as an rather than 3, so that the division could be implemented as an
skipping to change at page 35, line 18 skipping to change at page 39, line 18
However, when continuously sending data, data packets as well as ACKs However, when continuously sending data, data packets as well as ACKs
will spread out equally over the RTT and sufficient ACKs with the will spread out equally over the RTT and sufficient ACKs with the
AccECN option will be sent. AccECN option will be sent.
A.5. Example Algorithm to Count Not-ECT Bytes A.5. Example Algorithm to Count Not-ECT Bytes
A Data Sender in AccECN mode can infer the amount of TCP payload data A Data Sender in AccECN mode can infer the amount of TCP payload data
arriving at the receiver marked Not-ECT from the difference between arriving at the receiver marked Not-ECT from the difference between
the amount of newly ACKed data and the sum of the bytes with the the amount of newly ACKed data and the sum of the bytes with the
other three markings, d.ceb, d.e0b and d.e1b. Note that, because other three markings, d.ceb, d.e0b and d.e1b. Note that, because
r.e0b is initialised to 1 and the other two counters are initialised r.e0b is initialized to 1 and the other two counters are initialized
to 0, the initial sum will be 1, which matches the initial offset of to 0, the initial sum will be 1, which matches the initial offset of
the TCP sequence number on completion of the 3WHS. the TCP sequence number on completion of the 3WHS.
For this approach to be precise, it has to be assumed that spurious For this approach to be precise, it has to be assumed that spurious
(unnecessary) retransmissions do not lead to double counting. This (unnecessary) retransmissions do not lead to double counting. This
assumption is currently correct, given that RFC 3168 requires that assumption is currently correct, given that RFC 3168 requires that
the Data Sender marks retransmitted segments as Not-ECT. However, the Data Sender marks retransmitted segments as Not-ECT. However,
the converse is not true; necessary transmissions will result in the converse is not true; necessary transmissions will result in
under-counting. under-counting.
skipping to change at page 35, line 46 skipping to change at page 39, line 46
Appendix B. Alternative Design Choices (To Be Removed Before Appendix B. Alternative Design Choices (To Be Removed Before
Publication) Publication)
This appendix is informative, not normative. It records alternative This appendix is informative, not normative. It records alternative
designs that the authors chose not to include in the normative designs that the authors chose not to include in the normative
specification, but which the IETF might wish to consider for specification, but which the IETF might wish to consider for
inclusion: inclusion:
Feedback all four ECN codepoints on the SYN/ACK: The last two Feedback all four ECN codepoints on the SYN/ACK: The last two
negotiation combinations in Table 2 could also be used to indicate negotiation combinations in Table 2 could be used to indicate
AccECN support and to feedback that the arriving SYN was ECT(0) or AccECN support while also feeding back that the arriving SYN was
ECT(1). This could be used to probe the client to server path for ECT(0) or ECT(1). This could be used to probe the client to
incorrect forwarding of the ECN field server path for incorrect forwarding of the ECN field
[I-D.kuehlewind-tcpm-ecn-fallback]. Note, however, that it would [I-D.kuehlewind-tcpm-ecn-fallback].
be unremarkable if ECN on the SYN was zeroed by security devices,
given RFC 3168 prohibited ECT on SYN because it enables DoS
attacks.
Feedback all four ECN codepoints on the First ACK: To probe the Feedback all four ECN codepoints on the First ACK: To probe the
server to client path for incorrect ECN forwarding, it could be server to client path for incorrect ECN forwarding, it could be
useful to have four feedback states on the first ACK from the TCP useful to have four feedback states on the first ACK from the TCP
client. This could be achieved by assigning four combinations of client. This could be achieved by assigning four combinations of
the ECN flags in the main TCP header, and only initialising the the ECN flags in the main TCP header, and only initializing the
ACE field on subsequent segments. ACE field on subsequent segments.
Empty AccECN Option: It might be useful to allow an empty (Length=2)
AccECN Option on the SYN/ACK and first ACK. Then if a host had to
omit the option because there was insufficient space for a larger
option, it would not give the impression to the other end that a
middlebox had stripped the option.
Appendix C. Open Protocol Design Issues (To Be Removed Before Appendix C. Open Protocol Design Issues (To Be Removed Before
Publication) Publication)
1. Currently it is specified that the receiver `SHOULD' use Change- 1. Currently it is specified that the receiver `SHOULD' use Change-
Triggered ACKs. It is controversial whether this ought to be a Triggered ACKs. It is controversial whether this ought to be a
`MUST' instead. A `SHOULD' would leave the Data Sender uncertain `MUST' instead. A `SHOULD' would leave the Data Sender uncertain
whether it can rely on the timing and ordering information in whether it can rely on the timing and ordering information in
ACKs. If the sender guesses wrongly, it will probably introduce ACKs. If the sender guesses wrongly, it will probably introduce
at least 1 RTT of delay before it can use this timing at least 1 RTT of delay before it can use this timing
information. Ironically it will most likely be wanting this information. Ironically it will most likely be wanting this
skipping to change at page 36, line 46 skipping to change at page 40, line 38
here is critical. Before that choice is made, a clear use-case here is critical. Before that choice is made, a clear use-case
for certainty of timing and ordering information is needed, plus for certainty of timing and ordering information is needed, plus
well-informed discussion about hardware offload constraints. well-informed discussion about hardware offload constraints.
2. There is possibly a concern that a receiver could deliberately 2. There is possibly a concern that a receiver could deliberately
omit the AccECN Option pretending that it had been stripped by a omit the AccECN Option pretending that it had been stripped by a
middlebox. No known way can yet be contrived to take advantage middlebox. No known way can yet be contrived to take advantage
of this downgrade attack, but it is mentioned here in case of this downgrade attack, but it is mentioned here in case
someone else can contrive one. someone else can contrive one.
3. The s.cep counter might increase even if the s.ceb counter does
not (e.g. due to a CE-marked control packet). The sender's
response to such a situation is considered out of scope, because
this ought to be dealt with in whatever future specification
allows ECN-capable control packets. However, it is possible that
the situation might arise even if the sender has not sent ECN-
capable control packets, in which case, this draft might need to
give some advice on how the sender should respond.
Appendix D. Changes in This Version (To Be Removed Before Publication) Appendix D. Changes in This Version (To Be Removed Before Publication)
The difference between any pair of versions can be displayed at The difference between any pair of versions can be displayed at
<http://datatracker.ietf.org/doc/draft-kuehlewind-tcpm-accurate-ecn/ http://datatracker.ietf.org/doc/draft-kuehlewind-tcpm-accurate-ecn/
history/> history/
From kuehlewind-05 to ietf-00: Filename change to reflect WG
adoption.
Authors' Addresses Authors' Addresses
Bob Briscoe Bob Briscoe
Simula Research Laboratory Simula Research Laboratory
EMail: ietf@bobbriscoe.net EMail: ietf@bobbriscoe.net
URI: http://bobbriscoe.net/ URI: http://bobbriscoe.net/
Mirja Kuehlewind Mirja Kuehlewind
ETH Zurich ETH Zurich
Zurich Zurich
Switzerland Switzerland
EMail: mirja.kuehlewind@tik.ee.ethz.ch EMail: mirja.kuehlewind@tik.ee.ethz.ch
Richard Scheffenegger Richard Scheffenegger
Vienna Vienna
Austria Austria
 End of changes. 98 change blocks. 
355 lines changed or deleted 520 lines changed or added

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