Suppose Host A sends two TCP segments back to back to Host B over a TCP connection. The first segment has sequence number 90; the second has sequence number 110.
a. How much data is in the first segment?
b. Suppose that the first segment is lost but the second segment arrives at B. In the acknowledgment that Host B sends to Host A, what will be the acknowledgment number?
a)
Consider sequence numbers,First segment=90
Second segment=110
Data in the first segment=110-90
=20
b) Consider the first segment is lost but the second segment arrives at B. In the acknowledgment that Host B sends to Host A, then the acknowledgment number will be first segment of sequence number, that is 90.
a. We cannot determine the exact amount of data in the first segment just from its sequence number. However, we can make an assumption that each TCP segment contains the same amount of data, which is equal to the Maximum Segment Size (MSS) negotiated between the hosts. Let's assume that the MSS is 1000 bytes. Then, the first segment contains data from byte 90 to byte 109, which is a total of 20 bytes.
b. When Host B receives the second segment with sequence number 110, it will send an acknowledgment with an acknowledgment number equal to the next expected sequence number, which is 91. The acknowledgment number indicates the sequence number of the next byte that Host B is expecting to receive. Since the first segment with sequence number 90 was lost, Host B will assume that the next byte it expects to receive is byte 90, which is the first byte of the lost segment. Therefore, the acknowledgment number in the acknowledgment sent by Host B to Host A will be 90.
Post the discussion to improve the above solution.