3

Suppose a client has received 0 to 500, 900 to 1100 and 1300 to 2000 how will ACK and SACK look like? Does it look like this ACK: 500 SACK:900-1100 and then it asks for the packets 1100 to 1300 in new request.

5

The Selective ACK Option can specify more than one "block" of received traffic. Here is what the option looks like on the wire (taken from RFC 2018, Section 3):

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

According your example:

Suppose a client has received 0 to 500, 900 to 1100 and 1300 to 2000 how will ACK and SACK look like?

Your suggestion is almost correct, except for accounting for the additional Left and Right edge of the received bytes.

TCP ACK - 501 (in TCP header, not in SACK Option)
TCP SACK - 1st block Left Edge  - 900
TCP SACK - 1st block Right Edge - 1100
TCP SACK - 2nd block Left Edge  - 1300
TCP SACK - 2nd block Right Edge - 2000
(all in the same Segment)

There are additional examples and use cases in RFC 2018 Section 7. They are worth reading through to fully wrap your mind around it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.