Task 3
Task 3
problem 1
An application needs to send 100KB of data using a stop-and-wait reliable protocol. The
protocol splits the data into segments that have a 1KB application data payload. Each
segment fits in a single IP packet. The RTT is 50ms, there is no packetization delay, and
no queueing delay. The protocol uses a fixed retransmission timeout of 200ms and has no
retransmission limit.
a) How long will the transmission take, in seconds, if the network does not drop, duplicate
or corrupt any packets? You may assume the connection is established when you start
your measurement, so there is no additional latency from connection setup and consists
only of data transmissions.
b) Let us now suppose that the network drops each segment with a probability of 10%,
independently from segment to segment. The network drops both data and acknowl-
edgements. What is the expected duration of the transmission?
problem 2
Suppose two hosts are about to open a TCP connection. The TCP headers used in the
communication are only 20 bytes long and regular (no-options) IPv4 is being used for Layer
3. If the MTU of the link is 1260 bytes, what is the MSS?
problem 3
Alice thinks that Bob is onto something and wants to design a transport protocol that uses
fewer acknowledgments (ACKs). She proposes a scheme with the following rules:
Rule: Let P2i be the i-th even packet. The receiver sends an ACK if and only if the
receiver has received both P2i and P2i+1 . Note that packet indexing starts at 0 for the
first packet.
Sender’s behavior: The sender continues to send packets until all even-numbered
packets have been acknowledged.
b) Is there a modification to the protocol that you could make in order to fix it?
۱
problem 4
Suppose instead of a Three-Way Handshake, we use a Two-Way Handshake. Would there be
any problem with this method? If there is a problem, provide an example; otherwise, prove
that there is no problem.
problem 5
The sequence number in a TCP header is a 32-bit number that is sufficient to cover more than
4 billion bytes of data! Considering that in practice the probability of sending this amount
of data is low, what is the reason for using 32 bits?
problem 6
Suppose host A wants to send 10 segments of equal length to host B. For sending these
segments, a reliable protocol is used where the sender must send an acknowledgement (Ack)
for each segment it receives, and if the receiver does not receive an acknowledgment for each
segment after 2RTT, it resends it. Assume RTT is constant, the sending capacity is unlimited,
and the processing time for packets at each host and along the route is negligible. If the third
segment gets lost in each of the following three scenarios, explain how long it would take to
send all 10 segments in RTTs. Explain how you arrived at this answer in each case:
a) Stop-and-wait