Content-Length: 3100080 | pFad | https://www.scribd.com/document/809284277/Assignment
7Assignment
Assignment
Assignment
A. The sender's window size is 10 packets. Selecting the best answer from the choices
below, at what approximate rate (in packets per second) will the protocol deliver a
multi-gigabyte file from the sender to the receiver? Assume that there is no other
traffic in the network and packets can only be lost because the queues overflow.
a. Between 900 and 1000.
b. Between 450 and 500.
c. Between 225 and 250.
d. Depends on the timeout value used.
B. You would like to double the throughput of this sliding window transport protocol
running on the network shown on the previous page. To do so, you can apply one of
the following techniques alone:
a. Double the window size.
b. Halve the propagation time of the links.
c. Double the speed of the link between the Switch and Receiver.
For each of the following sender window sizes, list which of the above techniques, if
any, can approximately double the throughput. If no technique does the job, answer
"None". There might be more than one answer for each window size, in which case
you should list them all. Note that each technique works in isolation. Explain your
answers.
Malaviya National Institute of Technology Jaipur
Department of Computer Science and Engineering
Transport Layer Assignment –II
1. W = 10.
2. W = 50.
3. W = 30.
Question 2. A sender uses the stop and wait ARQ protocol for reliable transmission of
segments. Segments are of size 1000 bytes and the transmission rate at the sender is 80 Kbps.
Size of an acknowledgement is 100 bytes and the transmission rate at the receiver is 8 Kbps.
The one way propagation delay is 100 msec. Assuming no segment is lost, the sender
throughput is __________ bytes/sec.
Question 3. Consider two hosts X and Y connected by a single direct link of rate
106 bits/sec. The distance between the two hosts is 10,000 km and the propagation speed
along the link is 2 x 108 m/sec. Host X sends a file of 50,000 bytes as one large message to
host Y continuously. Let the transmission and propagation delays be p milliseconds and q
milliseconds respectively.
Then the value of p and q are-
1. p = 50 and q = 100
2. p = 50 and q = 400
3. p = 100 and q = 50
4. p = 400 and q = 50
Question 4. In the reliable transport protocols we studied, the receiver sends an
acknowledgment (ACK) saying “I got k” whenever it receives a packet with sequence
number k. Ben Bitdiddle invents a different method using cumulative ACKs: whenever the
receiver gets a packet, whether in order or not, it sends an ACK saying “I got every packet up
to and including `”, where ` is the highest, in-order packet received so far. The definition of
the window is the same as before: a window size of W means that the maximum number of
unacknowledged packets is W. Every time the sender gets an ACK, it may transmit one or
more packets, within the constraint of the window size. It also implements a timeout
mechanism to retransmit packets that it believes are lost using the algorithm from. Network
assumptions. The protocol runs over a best-effort network, but no packet or ACK is
duplicated at the network or link layers. The sender sends a stream of new packets according
to the sliding window protocol, and in response gets the following cumulative ACKs from the
receiver: 1 2 3 4 4 4 4 4 4 4
Malaviya National Institute of Technology Jaipur
Department of Computer Science and Engineering
Transport Layer Assignment –II
a) Now, suppose that the sender times out and retransmits the first unacknowledged
packet. When the receiver gets that retransmitted packet, what can you say about the
ACK, a, that it sends? (Circle the BEST answer)
(a) a = 5. (b) a ≥ 5. (c) 5 ≤ a ≤ 11. (d) a = 11. (e) a ≤ 11.
b) Is it possible for the given sequence of cumulative ACKs to have arrived at the sender
even when no packets were lost en route to the receiver when they were sent?
Question 5. Give one example of a situation where the cumulative ACK protocol gets higher
throughput than the sliding window protocol.
Question 6. A little bit into the data transfer, the sender observes the following sequence of
cumulative ACKs sent from the receiver: 21 22 23 25 28 The window size is 8 packets. What
packet(s) should the sender transmit upon receiving each of the above ACKs, if it wants to
maximize the number of unacknowledged packets?
Question 7. Ben Bitdiddle implements a reliable data transport protocol intended to provide
"exactly once" semantics. Each packet has an 8-bit incrementing sequence number, starting at
0. As the connection progresses, the sender "wraps around" the sequence number once it
reaches 255, going back to 0 and incrementing it for successive packets. Each packet size is S
= 1000 bytes long (including all packet headers).
Suppose the link capacity between sender and receiver is C = 1 Mbyte per second and the
round-trip time is R = 100 milliseconds.
a) What is the highest throughput achievable if Ben's implementation is stop-and-wait?
b) To improve performance, Ben implements a sliding window protocol. Assuming no
packet losses, what should Ben set the window size to in order to saturate the link
capacity?
c) Ben runs his protocol on increasingly higher-speed bottleneck links. At a certain link
speed, he finds that his implementation stops working properly. Can you explain what
might be happening? What threshold link speed causes this protocol to stop
functioning properly?
Question 8. A sender S and receiver R are connected over a network that has k links that can
each lose packets. Link i has a packet loss rate of p_i in one direction (on the path from S to
R) and q_i in the other (on the path from R to S). Assume that each packet on a link is
received or lost independent of other packets, and that each packet's loss probability is the
Malaviya National Institute of Technology Jaipur
Department of Computer Science and Engineering
Transport Layer Assignment –II
same as any other's (i.e., the random process causing packet losses is indepedent and
identically distributed).
A. Suppose that the probability that a data packet does not reach R when sent by S is p
and the probability that an ACK packet sent by R does not reach S is q. Write
expressions for p and q in terms of the p_i's and q_i's.
B. If all p's are equal to some value α << 1 (much smaller than 1), then what is p (defined
above) approximately equal to?
C. Suppose S and R use a stop-and-wait protocol to communicate. What is the expected
number of transmissions of a packet before S can send the next packet in sequence?
Write your answer in terms of p and q (both defined above).
Question 9. You are hired to design a reliable byte-stream protocol that uses a sliding
window (like TCP). This protocol will run over a 1-Gbps network. The RTT of the network
is 100 ms, and the maximum segment lifetime is 30 seconds.
a. How many bits would you include in the AdvertisedWindow and SequenceNum fields
of your protocol header?
b. How would you determine the numbers given above, and which values might be less
certain?
Question 10. Suppose you are designing a sliding window protocol for a 1-Mbps point-to-
point link to the moon, which has a one-way latency of 1.25 seconds. Assuming that each
segment carries 1 KB of data, what is the minimum number of bits you need for the sequence
number?
Question 11. Draw a timeline diagram for the sliding window algorithm with SWS = RWS =
3 Segment’s, for the following two situations. Use a timeout interval of about 2 × RTT.
(a) Segment 4 is lost.
(b) Segment 4 to 6 are lost.
Question 12. Suppose that we attempt to run the sliding window algorithm with SWS =
RWS = 3 and with MaxSeqNum = 5. The Nth packet DATA[N] thus actually contains N
mod 5 in its sequence number field. Give an example in which the algorithm becomes
confused; that is, a scenario in which the receiver expects DATA[5] and accepts
DATA[0]—which has the same transmitted sequence number—in its stead. No packets may
arrive out of order. Note that this implies MaxSeqNum ≥ 6 is necessary as well as sufficient.
Malaviya National Institute of Technology Jaipur
Department of Computer Science and Engineering
Transport Layer Assignment –II
Question 13. Consider the sliding window algorithm with SWS = RWS = 3, with no out-of-
order arrivals and with infinite-precision sequence numbers.
a. Show that if DATA[6] is in the receive window, then DATA[0] (or in general any older
data) cannot arrive at the receiver (and hence that MaxSeqNum = 6 would have
sufficed).
b. Show that if ACK[6] may be sent (or, more literally, that DATA[5] is in the sending
window), then ACK[2] (or earlier) cannot be received. Note that part (b) implies that the
scenario of the previous problem cannot be reversed to involve a failure to distinguish
ACK[0] and ACK[5].
Question 14. Suppose that we run the sliding window algorithm with SWS = 5 and RWS =
3, and no out-of-order arrivals.
a. Find the smallest value for MaxSeqNum. You may assume that it suffices to find the
smallest MaxSeqNum such that if DATA[MaxSeqNum] is in the receive window, then
DATA[0] can no longer arrive.
b. Give an example showing that MaxSeqNum − 1 is not sufficient.
c. State a general rule for the minimum MaxSeqNum in terms of SWS and RWS.
A R B
Fetched URL: https://www.scribd.com/document/809284277/Assignment
Alternative Proxies: