$29
CS 118 : Homework 3
Problem 1
The sender side of rdt3.0 simply ignores (that is, takes no action on) all received packets that are either
in error or have the wrong value in the acknum field of an acknowledged packet. Suppose that in such
circumstances, rdt3.0 were simply to retransmit the current data packet. Would the protocol still work?
(Hint: Consider what would happen if there were only bit errors; there are no packet losses but premature
timeouts can occur. Consider how many times the nth packet is sent, in the limit as n approaches infinity).
Page 1 of 5
CS 118 Spring 2020 : Homework 3
Problem 2
Consider a reliable data transfer protocol that uses only negative acknowledgments. Suppose the sender
sends data only infrequently. Would a NAK-only protocol be preferable to a protocol that uses ACKs?
Why? Now suppose the sender has a lot of data to send and the end-to-end connection experiences few
losses. In this second case, would a NAK-only protocol be preferable to a protocol that uses ACKs? Why?
Page 2 of 5
CS 118 Spring 2020 : Homework 3
Problem 3
Consider the GBN protocol with a sender window size of 6 and a sequence number range of 1,024. Suppose
that at time t, the next in-order packet that the receiver is expecting has a sequence number of k. Assume
that the medium does not reorder messages. Answer the following questions:
(a) What are the possible sets of sequence numbers inside the senders window at time t? Justify your
answer.
(b) What are all possible values of the ACK field in all possible messages currently propagating back to
the sender at time t? Justify your answer.
Page 3 of 5
CS 118 Spring 2020 : Homework 3
Problem 4
Follow the same problem setting in Page 62 of Slides Chapter3-2020.ppt. Suppose packet size is 4KB (i.e.
4000 bytes), bandwidth is 8Mbps, and one-way propagation delay is 20 msec. Assume there is no packet
corruption and packet loss.
(a) Suppose sener window size is 5, will the sender be kept busy? If yes, explain why. If not, What is the
effective throughput?
(b) What is the minimum sender window size to achieve full utilization? Then how many bits would be
needed for the sequence number field?
Page 4 of 5
CS 118 Spring 2020 : Homework 3
Problem 5
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-and-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.
Page 5 of 5