CS 118 Homework 4

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (3 votes)

Problem 1
Answer True or False to the following questions and briefly justify your answer:
(a) With the Selective Repeat protocol, it is possible for the sender to receive an ACK for a packet that
falls outside of its current window.
(b) With Go-Back-N, it is possible for the sender to receive an ACK for a packet that falls outside of its
current window.
(c) The Stop&Wait protocol is the same as the SR protocol with a sender and receiver window size of 1.
(d) Selective Repeat can buffer out-of-order-delivered packets, while GBN cannot. Therefore, SR saves
network communication cost (by transmitting less) at the cost of additional memory.
Write your solution to Problem 1 in this box
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 226. 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 227,
the source port number is 30002, and the destination port number is 80. Host B sends an acknowledgment
whenever it receives a segment from Host A. Fill in the blanks for questions (a) – (c) directly; work out the
diagram in the box for question (d).
(a) In the second segment sent from Host A to B, the sequence number is , source port number is
, and destination port number is .
(b) If the first segment arrives before the second segment, in the acknowledgment of the first arriving
segment, the ACK number is , the source port number is , and the destination port
number is .
(c) If the second segment arrives before the first segment, in the acknowledgment of the first arriving
segment, the ACK number is .
(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 in the box below,
showing these segments and all other segments and acknowledgment sent. Assume no additional packet
loss. For each segment in your diagram, provide the sequence number and the number of bytes of data;
for each acknowledgment that you add, provide the ACK number.
Write your solution to Problem 2 in this box

Problem 3
In Fast Retransmit algorithm, we saw TCP waits until it has received three duplicate ACKs before performing
a fast retransmit. Why do you think the TCP designers chose not to perform a fast retransmit after the first
or second duplicate ACKs for a segment received?
Write your solution to Problem 3 in this box
Problem 4
Suppose that three measured SampleRTT values are 106 ms, 120 ms, and 140 ms. Compute the EstimatedRTT
after each of these SampleRTT values is obtained, assuming that the value of EstimatedRTT was 100 ms
just before the first of these three samples were obtained. Compute also the DevRTT after each sample is
obtained, assuming the value of DevRTT was 5 ms just before the first of these three samples was obtained.
Last, compute the TCP TimeoutInterval after each of these samples is obtained.
Write your solution to Problem 4 in this box
Problem 5
Compare Go-Back-N, Selective Repeat, and TCP (no delayed ACK). Assume that timeout values for all
three protocols are sufficiently long, such that 5 consecutive data segments and their corresponding ACKs
can be received (if not lost in the channel) by the receiving host (Host B) and the sending host (Host A),
respectively. Suppose Host A sends 5 data segments to Host B, and the 2nd segment (sent from A) is lost.
In the end, all 5 data segments have been correctly received by Host B.
(a) How many segments has Host A sent in total and how many ACKs has Host B sent in total? What
are their sequence numbers? Answer this question for all three protocols.
(b) If the timeout values for all three protocols are much longer than 5RTT, then which protocol successfully
delivers all five data segments in shortest time interval?
Write your solution to Problem 5 in this box
Page 5 of 5