IS 504 – Homework #2
Due: April 5, 2020 Sunday – 23:30
Submission and Grading Policy
• Submit your assignments to the corresponding assignment link in https://odtuclass.metu.edu.tr.
• You can solve the questions on paper and send the pictures of your solutions.
• Solutions should be submitted in a single doc, docx or pdf file named: <metu-username>_HW_2.<extension> (e.g.,
“e123456_HW_2.pdf”).
• Late submissions will be accepted by April 10, 2020, 23:30 with 5% per day penalty.
• This is an individual assignment. You have to adhere to the academic integrity principles.
Questions
1. Consider the following one hop network shown on the right. Suppose one-way propagation delay over the link is
1 second, timeout is set to 5 seconds when needed, and transmission and processing delays for data and
acknowledgement packets are short and can be ignored.
Propagation delay = 1 sec
X Y
Timeout = 5 sec
For each of the following cases, draw a time-space diagram to show the packet exchange between X and Y until
both sides stabilize. In the diagram, indicate the window contents (where applicable) and important events (such
as “timeout”, “duplicate detected”, “packet discarded”, and “deliver data to app”).
a. (15 pts) The stop and wait protocol (i.e., rdt 3.0 in the lecture notes) to reliably transfer three data packets
“a”, ”b”, and “c” from host X to host Y. The first data packet containing “b” and the first acknowledgement
sent for “c” (the acknowledgement sent for “c” sent for the first time) are lost and there is no other bit
error/packet loss in the network.
b. (15 pts) The Go-Back-N protocol with window size=3 is used to reliably transfer five data packets “a”, ”b”,
“c”, “d”, and “e” (with sequence numbers 0, 1, 2, 3, and 4, respectively) from host X to host Y and there is
no bit-error/packet loss in the network.
c. The following sliding window protocols are used to reliably transfer five data packets “a”, ”b”, “c”, “d”,
and “e” (with sequence numbers 0, 1, 2, 3, 4, and 5 respectively) from host X to host Y. Suppose,
• the first acknowledgement sent for the data packets “b” is lost,
• the data packet containing “d” is lost on the first transmission attempt,
• there is no other bit-error/packet loss in the network.
i. (20 pts) Go-Back-N, window size=3
ii. (20 pts) Selective Repeat, window size=3
2. Consider the network shown below:
A 100 km B
1 Mbps
Where A and B are hosts interconnected by a 100 km-long (100 * 103 m) full duplex link, the link rate is 1Mbps
(1*106 bits/sec) in both directions, signal propagation speed in the medium is 2*108 m/sec, A sends 10000 data
packets to B, the length of each data packet sent by A is 100 bytes, the length of each acknowledgement packet
sent by B is 25 bytes, processing delays can be ignored and the link is reliable (i.e., there is no error/loss in the
network).
a. (10 pts) Suppose A and B are using stop-and-wait reliable data transfer protocol. How long does it take to
transfer 10000 data packets from host A to host B?
b. (20 pts) Suppose A and B are using Selective-Repeat reliable data transfer protocol. What should the
minimum window size be to minimize the time required to transfer 10000 data packets from host A to
host B?