Starting from:

$29

CS 118 Homework 5

CS 118 Homework 5, 
Problem 1
Host A and B are directly connected with a 100 Mbps link. There is one TCP connection between the two
hosts, and Host A is sending to Host B an enormous file over this connection. Host A can send its application
data into its TCP socket at a rate as high as 120 Mbps but Host B can read out of its TCP receive buffer
at a maximum rate of 50 Mbps. Describe the effect of TCP flow control.
Write your solution to Problem 1 in this box
Page 1 of 6
CS 118 Spring 2020 : Homework 5, Due 6PM PDT May 7
Problem 2
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 fill in all the fields with a
question mark in this TCP header.
Write your solution to Problem 2 in this box
Page 2 of 6
CS 118 Spring 2020 : Homework 5, Due 6PM PDT May 7
Problem 3
Recall the macroscopic description of TCP throughput (Slide 134), in the period of time from when the
connection’s rate varies from W/(2 RTT) to W/RTT, only one packet is lost (at the very end of the period).
(a) Show that the loss rate (fraction of packets lost) is equal to L=lossrate= 1/(3/8W2 + 3/4W)
(b) Use the result above to show that if a connection has loss rate L, then its average rate is approximately
given by ' 1.22 × MSS/(RT T ×

L). (Hint: average rate = 3
4
·
W
RT T )
Write your solution to Problem 3 in this box
Page 3 of 6
CS 118 Spring 2020 : Homework 5, Due 6PM PDT May 7
Problem 4
You are designing a reliable, sliding window, byte-stream protocol similar to TCP. It will be used for
communication with a geosynchronous satellite network, for which the bandwidth is 800 Mbps and the
RTT is 400 ms. Assume the maximum segment lifetime is 25 seconds.
(a) How many bits wide should you make the ReceiveWindow and SequenceNum fields? (ReceiveWindow is
also called “Advertised Window” in some other textbooks.)
(b) If ReceiveWindow is 16 bits, what upper bound would that impose on the effective bandwidth?
Write your solution to Problem 4 in this box
Page 4 of 6
CS 118 Spring 2020 : Homework 5, Due 6PM PDT May 7
Problem 5
Consider the evolution of a TCP connection with the following characteristics. Assume that all the following
algorithms are implemented in TCP congestion control: slow start, congestions avoidance, fast retransmit
and fast recovery, and retransmission upon timeout. If ssthresh equals to cwnd, use the slow start algorithm
in your calculation.
• The TCP receiver acknowledges every segment in cumulative way, and the sender always has data
segments available for transmission.
• The RTT is 100 ms for all transmissions, consists of the network latency of 60 ms in sending a segment
(header and payload) from the sender to the receiver and 40 ms in sending an acknowledgment (header
only) from the receiver to the sender. Ignore packet-processing delays at the sender and the receiver.
• Initially ssthresh at the sender is set to 5. Assume cwnd and ssthresh are measured in segments, and
the transmission time for each segment is negligible.
• Retransmission timeout (RTO) is initially set to 500ms at the sender and is unchanged during the
connection lifetime.
• The connection starts to transmit data at time t = 0, and the initial sequence number starts from 1.
TCP segment with sequence number 6 is lost once (i.e., it sees segment loss during its first transmission).
No other segments are lost during transmissions.
What are the values for cwnd and ssthreshold when the sender receives the TCP ACK with number 15?
Show your intermediate steps or your diagram in your solution.
Problem 5 continued on next page. . . Page 5 of 6
CS 118 Spring 2020 : Homework 5, Due 6PM PDT May 7
Write your solution to Problem 5 in this box
Page 6 of 6

More products