| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
TCP Non-Contiguous Acknowledgment Handling and Selective Acknowledgment (SACK) (Page 4 of 4) A Better Solution: Selective Acknowledgment (SACK) It is in fact this lack of knowledge about non-contiguous segments that is the core of the problem with non-contiguous segments. The solution is to extend the basic TCP sliding window algorithm with an optional feature that allows a device to acknowledge non-contiguous segments individually. This feature, introduced in RFC 1072 and refined in RFC 2018, is called TCP selective acknowledgment, abbreviated SACK. To use SACK, the two devices on the connection must both support the feature, and must enable it by negotiating the Selective Acknowledge Permitted (SACK-Permitted) option in the SYN segment they use to establish the connection. Assuming this is done, either device is then permitted to include in a regular TCP segment a Selective Acknowledgment (SACK) option. This option contains a list of sequence number ranges of segments of data that have been received but have not been acknowledged since they are non-contiguous. Each device modifies its retransmission queue so that each segment includes a flag that is set to 1 if the segment has been selectively acknowledgedthe SACK bit. The device then uses a modified version of the aggressive method above, where upon retransmission of a segment all later segments are also retransmitted unless their SACK bits are set to 1. For example, in our four-segment case, if the client receives Segment #4 but not Segment #3, when it sends back a segment with an Acknowledgment Number field value of 201 (for #1 and #2), it can include a SACK option that specifies I have received bytes 361 through 500, but they are not yet acknowledged. This can also be done in a second acknowledgment segment if Segment #4 arrives well after #1 and #2. The server recognizes this as the range of bytes for Segment #4, and turns on the SACK bit for Segment #4. When Segment #3 is retransmitted, the server sees the SACK bit for Segment #4 on and does not retransmit it. This is illustrated in Figure 225. After Segment #3 is retransmitted, the SACK bit for Segment #4 is cleared. This is done for robustness, to handle cases where for whatever reason the client changes its mind about having received Segment #4. The client should send an acknowledgment with an Acknowledgment Number of 501 or higher, indicating official receipt of Segments #3 and #4. If this does not happen, the server must receive another selective acknowledge for Segment #4 to turn its SACK bit back on. Otherwise it will be automatically re-sent when its timer expires, or when Segment #3 is retransmitted.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. |