assignment01-2024-solution
assignment01-2024-solution
2. (25 points) Suppose that the selective repeat protocol is used. The sequence number
Homework 1, 2024 (100 points) space is {0,1,2,3}. Assume that the sender window size is N=3. At the start, the
sender sends packets with sequence numbers in 0, 1, and 2, respectively. The receiver
Due on October 13 at 23:59 receives these packets and sends ACK 0, ACK 1, and ACK 2, respectively. However,
these three ACK messages are lost.
Please submit your solution as a PDF on Canvas.
a. After the timeout interval for packet 0, the sender retransmits packet 0.
Make sure to include enough details to make it clear how you have arrived at your Suppose that the receiver receives the packet. What happens when the receiver
answers. The marks you received in each question is proportional to the solution quality receives this packet? Moreover, will the application layer process on the
of the solution. The total mark for this assignment is 6 points towards the final mark. receiving host receive exactly the same data as it was sent by the application
process on the sending host?
1. (15 points) Consider the figure below, which follows the analogy between store-and-
forward link transmission and propagation of bits in a packet along a link, and cars in Since we have rcv_base=3, and 0 is in [rcvbase, rcvbase+N], the receiver will
a caravan are serviced at a toll booth and then drive along a road to the next tollbooth, (wrongly) think this is the 4th packet in the stream that has arrived out-of-order
as discussed in the lecture. and it will buffer the packet. Thus, the application on the receiver side will
not receive the same data as it was sent by the sender.
b. Given a sequence number space of size K, what is the maximum size we can
choose for the sender window N ? Justify your answer by describing a
concrete scenario where the protocol behaves incorrectly if we make the
Suppose the caravan has 25 cars, and that the tollbooth services (that is, “transmits”) a window too large.
car at a rate of one car per 3 seconds. Once a car has been serviced, it proceeds to the
next tool both, which is 450 kilometers away, at a rate of 15 kilometers per second. It needs to be the case where N ≤ K/2. One concrete example is already given
Also, assume that whenever the first car of the caravan arrives at a tollbooth, it must by Part a) of this question, but students may come up with other examples.
wait at the entrance to the tollbooth until all of the other cars in its caravan have [Some students have assumed that K is the number of bits of the sequence
arrived, and lined up behind it before being serviced at the toll booth. That is, the number. We will consider that to be fine. In that case, the correct answer is N
entire caravan must be “stored” at the tollbooth (like a packet at a router) before the ≤ 2K / 2. ]
first car in the caravan can pay its toll and begin driving towards the next tollbooth.
a. How long does it take for the entire caravan to receive service at the tollbooth c. Suppose that the window size is N=5. What is the maximum number of
(that is the time from when the first car enters service until the last car leaves packets that the receiver may deliver instantaneously to the application layer
the tollbooth)? upon the receipt of a new packet?
It takes 25*3=75s. (This corresponds to the transmission delay.) Since the receive window is of size 5, this is also the limit on the number of
packets that can be delivered simultaneously.
b. Once the first car leaves the tollbooth, how long does it take until it is serviced 3. (20 points) Alice and Bob are connected by a communication link with bandwidth of
60 Mbps (i.e. 6*107 bits per second). The link has a (one-way) propagation delay of
at the next tollbooth?
50msec (milliseconds). Alice would like to send a file to Bob using the Go-back-N
protocol. However, Alice’s ISP is monitoring the link usage and is going to charge
When the first car leaves the tollbooth, there are 24 cars waiting to be serviced. her if her link utilization exceeds 85%. Note that she would not be charged as long as
her link utilization is no more than 85%, where the utilization at a sender side is
The first car must wait until the last car has lined up at the next toll booth. defined as the fraction of time that the sender is busy with sending.
(a) Suppose that the segment size is 2Mb, what is the largest sender window that
Thus, it takes 24*3+450/15=102s. Alice can use without being charged?
(b) Assuming a send window of size N=4 to ensure that Alice can send messages a. With non-persistent HTTP, how much time (in msec) elapses from when the
reliably to Bob, what is the minimum segment size that ensures a link utilization client clicks on the URL until the base object and the 17 objects have been
of at least 65%? Justify your answer. received from the web server?
(b) Let L be the segment size in bits, we then have RTT=100msec=0.1s, thus The client needs RTT0+RTT1+RTT2=5+50+40=95ms to get the IP address
4w*(L/6*107)/(L/6*107+0.2) ≤ 0.65,
L=2.32M bits In persistent (pipelined) HTTP, two RTTHTTP for base html and one RTTHTTP for 17
objects (parallel connection does not affect the result).
4. (20 points) Suppose that a user clicks on a link to obtain a Web page. Initially, the IP
address for the associated URL is not cached in the user’s machine, so a DNS lookup In total, RTT0+RTT1+RTT2+3*RTTHTTP=95+3*30=185 ms
is necessary to obtain the IP address. Suppose that three DNS servers are visited
before the user’s host receives the IP address. (From that point on, you can assume 5. [20 points] Consider a TCP connection between Alex and Jenny that Alex sends a large file to
that the user’s host stores the IP address for future use.) The first DNS server visited Jenny. The figure below plots the evolution of the TCP's congestion window at the beginning of
each time unit (where the unit of time is equal to one RTT, and the y-axis shows the size of the
is the local DNS cache, with an RTT delay of RTT0 = 5 msecs. The second and third congestion window in MSS units). Assume that the TCP connection uses TCP Reno to respond to
DNS servers contacted have RTTs of 50 and 40 msecs, respectively. Assume that the loss events.
RTT between the local host and the Web server containing objects is RTTHTTP = 30
msecs.
Moreover, suppose the HTML base file references 17 objects on the same server, and,
assume that the client is configured to support a maximum of 5 parallel TCP
connections, with persistent HTTP. All the web objects are very small and hence we
neglect their transmission times.
d) Since the TCP window is the minimum of the congestion window and the receive
window, it will be limited to 10 MSS during times 7-12 and 19.
--END---
Answer: