Description

5/5 - (2 votes)

Host A sends 5 data segments to Host B, the 2nd segment (sent from A) is lost. This loss is then detected by the protocol-speci c means and the protocol invokes recovery actions. In the end, all 5 data segments are correctly received by Host B.

1. If A and B use Go-back-N for the data delivery, what is the total number of segments that Host A sent out (including retransmissions)? And what is the total number ACKs that Host B sent?

2. If A and B use TCP for the data delivery (no delayed ACKs), what is the total number of segments that Host A sent out (including retransmissions)? And what is the total number ACKs that Host B sent?

3. Assume that the retransmission timer is set to 10*RTT, which of the above two protocols (Go-back-N and TCP) nish the data delivery rst?

Note: Answering questions 2 and 3 requires the knowledge about TCP fast retransmit, which is described on Lecture-7, slides 24-25, that will be discussed in next Monday lecture. If anyone wants to nish the homework this weekend, you probably can gure out how TCP fast retransmit works by taking a careful look at Lecture-7, slides 24-25.

Write your answer here

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page 1 of 5
CS 118 Winter 2019 : Homework 4

Problem 2

Host 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 rst and second segments contain 80 and 40 bytes of data, respectively. In the rst 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.

1. In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number?

2. If the rst segment arrives before the second segment, in the acknowledgment of the rst arriving segment, what is the acknowledgment number, the source port number, and the destination port number?

3. If the second segment arrives before the rst segment, in the acknowledgment of the rst arriving segment, what is the acknowledgment number?

Write your answer here

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page 2 of 5
CS 118 Winter 2019 : Homework 4

Problem 3

Follow the same problem setting in Page 37 of Slides lecture-06. Suppose packet size is 4000 bits, bandwidth is 2Mbps, and propagation delay is 15 msec. Ignore packet loss.

1. Suppose window size is 10, will the sender be kept busy? If yes, explain why. If not, What is the e ective throughput?

2. What is the minimum window size to achieve full utilization? Then how many bits would be needed for the sequence number eld?

Write your answer here

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page 3 of 5
CS 118 Winter 2019 : Homework 4

Problem 4

Consider a reliable data transfer protocol that uses only negative acknowledgments. Suppose the sender has a lot of data to send and the end-to-end connection experiences few losses. Would a NAK-only protocol be preferable to a protocol that uses ACKs? Why? Now suppose the sender sends data only infrequently. In this second case, would a NAK-only protocol be preferable to a protocol that uses ACKs? Why?

Write your answer here

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page 4 of 5
CS 118 Winter 2019 : Homework 4

Problem 5

A sends a TCP FIN message to B to close the TCP connection with B, the TCP header of A’s FIN message is shown below. When B receives A’s TCP FIN, it also decides to close the connection, so B sends a combined FIN and FIN-ACK message, whose TCP header is also shown below. Please ll in all the elds with a question mark in this TCP header.

 

s port: d port: seq no: ack no:

control bits (6-bit):

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page 5 of 5