Answer:
Consider the given data
There are two host S and R communicating over a TCP connection.
Host R received from S all bytes from 1 through 233.
Host S sends three segments to Host R.
The sizes of the three segments are 50, 70, and 90 bytes.
In the first segment, the source port number is 212 and the destination port number is 80.
a)
For segment 1:
As, Host R received 233 bytes from Host S, the sequence number of the first segment is 234.
The source port number = 212
The destination port number = 80.
For segment 2:
As the first segment size is 50 bytes and the sequence number of the first segment is 234, the sequence number of the second segment will be 50+ 234= 284.
The source and destination ports of all the segments are same.
The source port number = 212
The destination port number = 80.
For segment 3:
As the second segment size is 70 bytes and the sequence number of the second segment is 284, the sequence number of the third segment will be 70+ 284= 354.
The source and destination ports of all the segments are same.
The source port number = 212
The destination port number = 80.
b)
In TCP, the acknowledgement number is the sequence number of the next byte to be expected.
The order of the segment arrive at R is 1, 2, 3.
The acknowledgement number of the second segment arriving is the sequence number of the next byte to be expected. The next byte is segment 3. The sequence number of the segment 3 is 354.
Therefore, the acknowledgement number of the second segment arriving is 354.
In the server side, the source and destination ports are swapped.
Then, the source port number = 80
The destination port number = 212.
c)
In TCP, the acknowledgement number is the sequence number of the next byte to be expected.
The order of the segment arrive at R is 1, 3, 2.
The acknowledgement number of the second segment arriving is the sequence number of the next byte to be expected. The next byte is segment 2. The sequence number of the segment 2 is 284.
Therefore, the acknowledgement number of the second segment arriving is 284.
In the server side, the source and destination ports are swapped.
Then, the source port number = 80
The destination port number = 212.
d)
The first segment acknowledge is the sequence number of the second segment that is lost.
The second and third segment acknowledgements arrive after the timeout interval. The timing diagram of these segments along with their sequence number and the number of bytes of data is shown in the below diagram.
Explanation:
See the attached picture for timing diagram.