Personal Miscellaneous TCP/IP GRID Quality of ServiceMulti-Cast  
Background high-speed tcp Transfer Tests Web 100TCP Tuning  

TCP Selective Acknowledgements (SACKS)

REF: RFC2018 RFC2883

used by the TCP data receiver to acknowledge non-contiguous blocks of data not covered by the Cumulative Acknowledgement field

use of the SACK option when acknowledging the receipt of a duplicate packet [F99]. We use the term D-SACK (for duplicate-SACK) to refer to a SACK block that reports a duplicate segment.

                            | Kind=5 | Length |
          |      Left Edge of 1st Block       |
          |      Right Edge of 1st Block      |
          |                                   |
          /            . . .                  /
          |                                   |
          |      Left Edge of nth Block       |
          |      Right Edge of nth Block      |

"the first SACK block ... MUST specify the contiguous block of data containing the segment which triggered this ACK, unless that segment advanced the Acknowledgment Number field in the header."

A SACK option that specifies n blocks will have a length of 8*n+2 bytes, so the 40 bytes available for TCP options can specify a maximum of 4 blocks. It is expected that SACK will often be used in conjunction with the Timestamp option used for RTTM [Jacobson92], which takes an additional 10 bytes (plus two bytes of padding); thus a maximum of 3 SACK blocks will be allowed in this case.



The SACK option is to be included in a segment sent from a TCP that is receiving data to the TCP that is sending that data; we will refer to these TCP's as the data receiver and the data sender, respectively.

The current TCP stacks implement several algorithms to recover from a single loss within one window of data (Fast Retransmit & Fast Recovery). But the performance of TCP can suffer dramatically when more than one segment is lost in one window. To prevent this, TCP with Selective Acknowledgement was proposed.

Selective Acknowledgment (SACK) attaches detailed information in SACK options on ACKs. Each SACK block specifies a block of data which has been successfully received. The sender can use this information to quickly retransmit only those segments which have been lost. This enables holes to be filled within roughly one RTT.

SACK enables receiver to give more information to sender about received packets allowing sender to recover from multiple-packet losses faster and more efficiently

There are two SACK options:

  • a 'SACK permitted' option in the tcp header that constitutes 2 bytes. It may only be send on a SYN segment to signal that the sender supports the SACK option. It is used only if both endpoints send the SACK permitted option in their first SYN-flagged segment.
  • The SCAK option itself which has variable length.

The SACK option is sent by the reciever and contains a series of out-of-order blocks successfully received and queued by the reciever. The blocks are described using absolute sequence numbers, with two sequence numbers describing each block:

  • 1st: left edge of the block, ie the first byte of the block successfully received.
  • 2nd: right edge of the block; ie, the sequence number of the byte immediated following the last byte in the block.

The receiver always reports the most recently received segement in the first SACK block. Other arrived segments are reported if the TCP option space permits.

The SACK blocks the receiver reports in the ack segments help the sender to identify 'hole's in the sequence numbers at the reciever: on the reciept of an ack containing the SACK option, the sender can infer which segmetns are lost and have to be resent from the 'transmitted but not yet acked' segment numbers. Therefore, SACKS enables sender to maintain image of receiver’s queue

This allows the sender to resend all missing segments without waiting for a timeout.


Duplicate SACKS

As a extension of the SACK mechanism. It proposes that tell the sender about duplicate segments at the receiver. As such, it is called Duplicate SACK (DSACK) and requires that if a dup segment was recieved, then the receiver should send an ack containing as its first SACK block, the duplicate data. As the sequence number space of the dup data is independet of the value of the ack field in the tcp header.



Wed, 23 July, 2003 13:07 Previous PageNext Page


    email me!
2001-2003, Yee-Ting Li, email:, Tel: +44 (0) 20 7679 1376, Fax: +44 (0) 20 7679 7145
Room D14, High Energy Particle Physics, Dept. of Physics & Astronomy, UCL, Gower St, London, WC1E 6BT