|TCP option 5, Selective Acknowledgment|
|Protocol type:||Transport layer protocol.|
|Option length:||Variable length.|
|Links:||IANA: TCP option numbers.|
RFC 2018, pg 1:
TCP may experience poor performance when multiple packets are lost from one window of data. With the limited information available from cumulative acknowledgments, a TCP sender can only learn about a single lost packet per round trip time. An aggressive sender could choose to retransmit packets early, but such retransmitted segments may have already been successfully received.
SACK is a strategy which corrects this behavior in the face of multiple dropped segments. With selective acknowledgments, the data receiver can inform the sender about all segments that have arrived successfully, so the sender need retransmit only the segments that have actually been lost.
RFC 2018, pg 4:
The SACK option is to be sent by a data receiver to inform the data sender of non-contiguous blocks of data that have been received and queued. The data receiver awaits the receipt of data (perhaps by means of retransmissions) to fill the gaps in sequence space between received blocks. When missing segments are received, the data receiver acknowledges the data normally by advancing the left window edge in the Acknowledgement Number Field of the TCP header. The SACK option does not change the meaning of the Acknowledgement Number field.
RFC 2883, pg.1:
This note defines an extension of the SACK option for TCP. RFC 2018 specified the use of the SACK option for acknowledging out-of-sequence data not covered by TCP's cumulative acknowledgement field. This note extends RFC 2018 by specifying the use of the SACK option for acknowledging duplicate packets. This note suggests that when duplicate packets are received, the first block of the SACK option field can be used to report the sequence numbers of the packet that triggered the acknowledgement. This extension to the SACK option allows the TCP sender to infer the order of packets received at the receiver, allowing the sender to infer when it has unnecessarily retransmitted a packet. A TCP sender could then use this information for more robust operation in an environment of reordered packets, ACK loss, packet replication, and/or early retransmit timeouts.
|MAC header||IP header||TCP header||TCP option 5||Data|
TCP Option 5:
|SACK Block  :::|
Kind. 8 bits. Set to 5.
Length. 8 bits. unsigned. 4 to ?
SACK Block .
One or more SACK block structures.
SACK block. 64 bits.
|Left Edge of Block|
|Right Edge of Block|
Left Edge of Block.
The first sequence number of this block.
Right Edge of Block.
The sequence number immediately following the last sequence number of this block.
[RFC 2018] TCP Selective Acknowledgment Options.
[RFC 2883] An Extension to the Selective Acknowledgement (SACK) Option for TCP.
[RFC 1072] TCP Extensions for Long-Delay Paths.