Presentation is loading. Please wait.

Presentation is loading. Please wait.

SELECTIVE ACKNOWLEDGEMENT (SACK) DUPLICATE SELECTIVE ACKNOWLEDGMENT

Similar presentations


Presentation on theme: "SELECTIVE ACKNOWLEDGEMENT (SACK) DUPLICATE SELECTIVE ACKNOWLEDGMENT"— Presentation transcript:

1 SELECTIVE ACKNOWLEDGEMENT (SACK) DUPLICATE SELECTIVE ACKNOWLEDGMENT
CISC 856 – TCP OPTIONS SELECTIVE ACKNOWLEDGEMENT (SACK) RFC 2018 DUPLICATE SELECTIVE ACKNOWLEDGMENT (DSACK) RFC 2883 Thanks to Dr.Paul Amer and Pallavi Mahajan Rajesh Ponnurangam Computers & Information Sciences University of Delaware

2 TCP without SACK TCP uses cumulative ACKs
Receiver identifies the last byte of data successfully received Out of rrder segments are not ACKed Receiver sends duplicate ACKs TCP without SACK forces the TCP sender Either to wait an RTT to find out a segment was lost Or, unnecessarily retransmit data that has been correctly received Can result in reduced overall throughput

3 TCP with Selective Ack (SACK)
SACK + Selective Repeat Retransmission Policy allows receiver informs sender about all segments that are successfully received. sender fast retransmits only the missing data segments SACK is implemented using two TCP Options SACK-Permitted Option SACK Option

4 SACK-Permitted Option
is allowed only in a SYN Segment. indicates sender handles SACKs, and receiver should send SACKs if possible. SACK option can be used once connection is established TCP Header NOP options kind=1 Source port address Destination port address Sequence Number 6 TCP header length Cumulative Ack No. 1 SYN bit Window size Checksum Urgent pointer SACK-permitted kind=4 length=2

5 SACK-Permitted Option and SACK
SENDER RECEIVER SYN “SACK-permitted” TCP connection establishment phase SYN/ACK “SACK-permitted” ACK Cumulative Ack No. Sequence Number Source port address Destination port address SACK-permitted kind=4 length=2 Window size Urgent pointer Checksum NOP options kind=1 1 SYN bit ACK bit Cumulative Ack No. Sequence Number Source port address Destination port address SACK-permitted kind=4 length=2 Window size Urgent pointer Checksum NOP options kind=1 1 SYN bit Cumulative Ack No. Sequence Number Source port address Destination port address Window size Urgent pointer Checksum kind=1 1 ACK bit data transfer phase cum ack and optional SACKs

6 SACK Option Sequence Number Cumulative Ack No. HLEN Window size
Source port address Destination port address Length of SACK with n blocks? = (2 + 8 * n) bytes Sequence Number Cumulative Ack No. HLEN Window size Max number bytes available for TCP Options? Checksum Urgent pointer = 40 bytes Kind=1 Kind=1 Kind=5 Length=?? Left edge of 1st block Max number of SACK blocks possible? Right edge of 1st block = 4 SACK blocks (barring no other TCP Options) Left edge of nth block Right edge of nth block

7 SACK Example 1 - 100 receiver’s buffer 101 - 200 ACK 201 201-300
1-100 ACK 201 sender receiver ACK 201 SACK 1-100

8 SACK Rules With SACKs, the ACK field is still a cum ACK
A SACK cannot be sent unless the SACK-Permitted option has been received (in the SYN) The 1st SACK block MUST specify the contiguous block of data containing the segment which triggered this acknowledgment If SACKs are sent, SACK option should be included in all ACK’s which do not ACK the highest sequence number in the data receiver’s queue

9 Generating SACKs – data receiver behavior
If the data receiver has not received a SACK-Permitted Option for a given connection, the receiver must not send SACK options on that connection The receiver should send an ACK for every valid segment that arrives containing new data The data receiver should include as many distinct SACK blocks as possible in the SACK option SACK option should be filled out by repeating the most recently reported SACK blocks The data receiver provides the sender with the most up-to-date info about the state of the network and the receiver’s queue

10 Interpreting SACKs - Data Sender behavior
The sender records the SACK for future reference Maintains a retransmission queue containing unacknowledged segments One possible implementation Turns on SACK bit for the segment in retransmission queue when it receives a SACK Skips SACKed data during any later fast retransmission On fast retransmit, retransmits data not SACKed so far and less than the highest SACKed data Turns off SACK bit after retransmission time out

11 Another SACK Example receiver sender Receiver Buffer 100 299 100-299
500 300 699 ACK 300, SACK 699 300 500 900 1099 ACK 300, SACK ,

12 Another SACK Example (cont’d)
699 300 500 900 1099 sender receiver 699 300 500 900 1099 ACK 700, SACK 700 300 500 900 1099 ACK 1100 1100

13 Without SACK vs. With SACK
TCP with SACK TCP without SACK sender receiver ACK 200 ACK 200, SACK ACK 200, SACK fast retransmit ACK 600 ACK 200, SACK sender receiver ACK 200 fast retransmit ACK 600

14 Data Receiver Reneging
Reneging – fail to fulfill a promise or obligation Data receiver is permitted to discard data in its queue that has not been acknowledged to the data sender, even if the data has already been SACKed Such discarding of SACKed segments is discouraged, but may occur if the receiver must give buffer space back to the OS If reneging occurs first SACK should reflect the newest segment even if its going to be discarded Except for the newest segment, all SACK blocks MUST NOT report any old data which is no longer actually held by the receiver

15 reneg occurs; window decreases
Reneging Example sender receiver 100 199 ACK 200 200 399 300 ACK 200; SACK reneg occurs; window decreases 200 200 window increases 599 500 200 ACK 200; SACK

16 Consequences of Reneging
Sender must maintain normal TCP timeouts Data cannot be considered “communicated” until a cum ACK is sent Sender must retransmit the data at the left window edge after a retransmit timeout, even if that data has been SACKed by the receiver Sender MUST NOT discard data before being acked by the Cum Ack

17 SACK Observations SACK TCP follows standard TCP congestion control; Adding SACK to TCP does not change the basic underlying congestion control algorithms SACK TCP has major advantages when compared TCP Tahoe, Reno, Vegas and New Reno, as PDUs have been provided with additional information due to the SACK Difference in behavior when multiple packets are dropped from one window of data SACK information allows the sender to better decide what to retransmit and what not to

18 Duplicate SACK (D-SACK)
Extension to SACK – RFC 2883 How is SACK option used when duplicate segments are received? D-SACK does not require separate negotiation between a TCP sender and receiver that have already negotiated SACK When D-SACK is used, the first block of the SACK option should be a D-SACK block specifying a duplicate segment A D-SACK block is only used to report a duplicate contiguous sequence of data received by the receiver in the most recent segment Each duplicate contiguous sequence of data received is reported in at most one D-SACK block

19 Segment replicated by the network
D-SACK Example Segment replicated by the network Receiver Buffer sender receiver 200 399 ACK 400 600 400 799 ACK 400, SACK 800 400 600 999 ACK 400, SACK 800 400 600 999 ACK 400, SACK ,

20 DSACK – Another example
Receiver Buffer sender receiver 500 599 600 1100 1199 1100 600 699 1199 ACK 600, SACK 1100 600 699 1199 800 899 ACK 700, SACK ACK 700, SACK , 700 800 899 1100 1199 ACK 900, SACK ,

21 Interpreting D-SACK - Data Sender Behavior
The loss of a single ACK can prevent this information from reaching the sender. How does sender knows the first SACK block is a D-SACK? Compares the sequence space in the 1st SACK block to the cum ACK if seq_space < cum_ACK, then duplicate data has been received if seq_space > cum_ACK, then sender compares seq_space with the seq_space in 2nd SACK block (if there is one) if the 1st SACK block is reporting duplicate data that lies above the cumulative ACK, then the 1st SACK block will be a subset of the 2nd SACK block.

22 DSACK Example TCP with SACK & without D-SACK TCP with SACK and D-SACK
sender receiver ACK 200 ACK 200, SACK ACK 200, SACK fast retransmit ACK 600 ACK 200, SACK cwnd =10 cwnd =5 sender receiver ACK 200 ACK 200, SACK ACK 200, SACK fast retransmit ACK 600 ACK 200, SACK ACK 600, SACK cwnd =10 cwnd =5

23 D-SACK and Retransmissions
D-SACK allows TCP sender to determine when a retransmission was “spurious” (ie, unnecessary) and then undo congestion control measures D-SACK allows TCP sender to determine if the network is duplicating TCP-PDUs D-SACK does not allow a sender to determine if both the original and retransmitted data are received, or the original is lost and the retransmitted data is duplicated by the network.

24 SACK and D-SACK Interaction
There is no difference between SACK and D-SACK, except that the first SACK block is used to report a duplicate segment in D-SACK. D-SACK does not require separate negotiation between a TCP sender and receiver that have already negotiated SACK capability. D-SACK is compatible with current implementations of SACK option in TCP.

25 Current Implementations of SACK
Windows 2000/XP Controlled by a registry parameter – SackOpts in “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters” - SackOpts="1" Windows Vista Windows Server 2008 and Windows Vista support TCP SACK Free BSD and NetBSD have optional modules Solaris 7 and later

26 References RFC 2018 – TCP Selective Acknowledgement Options.
RFC 2883 – An Extension to SACK option for TCP. Kevin Fall and Sally Floyd, “Simulation-based Comparisons of Tahoe, Reno, and SACK TCP”, Lawrence Berkley National Laboratory.


Download ppt "SELECTIVE ACKNOWLEDGEMENT (SACK) DUPLICATE SELECTIVE ACKNOWLEDGMENT"

Similar presentations


Ads by Google