Answer the question
In order to leave comments, you need to log in
How to handle data overlap in different TCP segments?
I study the mechanism of work of TCP and there was one interesting case. There are 3 segments with data
1) Seq = 1, Len = 10 (fill data 0x00)
2) Seq = 11, Len = 10 (fill data 0x01 byte)
3) Seq = 15, Len = 10 (fill 0x02 byte)
To the receiver the segments arrived in the following order: 1, 3, 2
The data of the second segment is superimposed on the data of the third. What should the receiver do? What should the receiver do if the data came in the order 1, 2, 3
Answer the question
In order to leave comments, you need to log in
Obviously, the segments are buffered.
Here is a Very good extensive material on how TCP works. Read all chapters thoughtfully and carefully.
If bytes 0-N are successfully delivered, and then a segment with byte numbers (N+k) - (N+k+m) is received, the segment will be buffered but not acknowledged. Instead, a response is sent, coded with the octet number that should come next =(N+1). If a segment with an incorrect checksum is received, a response identical to the previous one will be sent. Duplicate responses allow packet loss to be detected.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question