Hosts A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 80 and 40 bytes of data, respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80. Host B sends an acknowledgment whenever it receives a segment from Host A.
(c) If the second segment arrives before the first segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number?
(d) Suppose the two segments sent by A arrive in order at B. The first acknowledgment is lost and the second acknowledgment arrives after the first timeout interval. Draw a timing diagram, showing these segments and all other segments and acknowledgments sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the sequence number and the number of bytes of data; for each acknowledgment that you add, provide the acknowledgment number
Answer:
c) Suppose the second segment appears before the first segment, in the acknowledgment of the first arriving segment. In that case, the acknowledgment number is 127, meaning that it is already waiting for bytes 127 and onwards.
d) Following is the Timing Diagram for the given problem:
Here the Host A sends data of 80 bytes with sequence number 127. Acknowledgment 207 from Host B is lost while traveling to Host A. Then again Host sends data of 40 bytes with sequence number 207 and acknowledgment is reached to Host A from B after the end of the first timeout interval.
Get Answers For Free
Most questions answered within 1 hours.