程序代写案例-COMP3234
时间:2021-03-19
1 | P a g e

COMP3234 Computer and Communication Networks

Problem Set Assignment Two
Total 6 points

Due date: 17:00 March 24, 2021

Answer all questions. Hand-in the assignment via the Moodle System.

Question 1 (1.2 points) (This question is related to ILO2a – “be able to comprehend the challenges and explain
the principles in providing reliable communication in an unreliable medium”, and ILO3 – “be able to calculate
packet delay, throughput, and channel efficiency according to different network protocols”.)
The Trivial File Transfer Protocol (TFTP) is an application layer protocol that uses the Stop-and-
Wait ARQ and runs on top of UDP to support reliable data transfer. To transfer a file from a
server to a client, the server breaks the file into blocks of 1024 bytes and sends these blocks to
the client using Stop-and-Wait ARQ.
Consider transferring a 2 MiB file from a server to a client using TFTP over a 1 Gb/s network
with a propagation delay of 3 milliseconds between the two ends. Suppose that each TFTP data
packet consists of a 1024-byte file block and 46 bytes of headers (from various layers including
TFTP header), and each TFTP acknowledgment packet consists of 46 bytes of headers only.
a) (0.6) Assume the transmissions are error-free (no corruption & loss), find the total time
used by the system to reliably transfer that 2 MiB file and the application file transfer
throughput. (As the size of the TFTP acknowledgment packet is given, please include it in
the analysis.)
b) (0.6) Assume TFTP adopts a fixed retransmission timeout duration of 1 second and the
underlying network is moderately congested with a loss rate of 1/64, estimate the total
time used by the system to reliable transfer that 2 MiB file and the average throughput of
the transfer.
Ignore queuing delay and processing delay.

Question 2 (1 point) (This question is related to ILO2a – “be able to comprehend the challenges and explain
the principles in providing reliable communication in an unreliable medium”, and ILO3 – “be able to calculate
packet delay, throughput, and channel efficiency according to different network protocols”.)
Consider the GBN and SR protocols. Suppose you are designing a sliding window protocol for a
30 Mbps point-to-point satellite link with a propagation delay of 420 milliseconds (between the
two ends). Assume that the size of each segment is 1500 bytes (including the data payload and
headers). To achieve the best throughput, what is the minimum number of bits in the header
for storing the sequence number in the following cases?
a) (0.5) Go-Back-N
b) (0.5) Selective Repeat

2 | P a g e

Question 3 (1.4 points) (This question is related to ILO2 –“be able to describe the working principles behind
key protocols used in modern computer networks – TCP”.)
Host A and B are communicating over a TCP connection, and both hosts have some data to
send to each other. At this instance, Host B has received from A all bytes up to and includes
byte 2034, and Host A has received from B all bytes up to and includes byte 3123. Assume Host
B does not send any data to A after this point, and B always sends acknowledgment whenever it
receives a data segment from Host A (i.e., no delayed acknowledgment).
Consider that Host A then sends two segments to Host B. The two segments contain 320 and
1005 bytes of data, respectively. In the second segment, the sequence number is 62354, the
acknowledgment number is 31258, the source port number is 32345, and the destination port
number is 11112.
a) (0.2) In the first segment sent from Host A to B, what are the sequence number, the
acknowledgment number, the source port number, and the destination port number?
b) (0.2) If the first segment arrives before the second segment, in the acknowledgment of
the first arriving segment, what are the sequence number, the acknowledgment number,
the source port number, and the destination port number?
c) (0.2) If the second segment arrives before the first segment, in the acknowledgment of
this segment, what are the sequence number, the acknowledgment number, the source
port number, and the destination port number?
d) (0.1) What is the initial sequence number used by Host A on this TCP connection?
e) (0.1) What is the initial sequence number used by Host B on this TCP connection?
f) (0.6) Suppose the two segments sent by A arrived in order at B. The first
acknowledgment is lost and the second acknowledgment arrives after the first timeout
interval. Draw a timing diagram (similar to Figure 3.34 in the textbook), showing these
segments and all other segments and acknowledgments sent. (Assume there is no
additional packet loss.) For each segment in your diagram, provide the sequence number
and the number of bytes of data; for each acknowledgment that you add, provide the
acknowledgment number.



Question 4 (1 point) (This question is related to ILO2 – “be able to describe the working principles behind key
protocols used in modern computer networks - TCP”.)
Suppose the TCP layer records five consecutively measured SampleRTT values: 98 ms, 118 ms,
130 ms, 115 ms, and 122 ms. Suppose the EstimatedRTT value was 121 ms and the DevRTT
value was 10 ms before the five observations. This TCP layer uses a slightly different α and β
values than the standard, which are: α = 0.15 and β = 0.3.
a) After obtaining these five observations, TCP sends out one segment, what is the TCP
TimeoutInterval for this segment?
b) Unfortunately, TCP experiences two timeouts on this segment and has to retransmit the
segment twice. What is the TCP TimeoutInterval for the first retransmission? for the second
retransmission?
3 | P a g e

c) After that, TCP receives the acknowledgment of the 2nd retransmission and the measured
SampleRTT is 150 ms. Now TCP sends a new segment, what is the TCP TimeoutInterval for
this segment?

Question 5 (1.4 points) (This question is related to ILO2 – “be able to describe the working principles behind
key protocols used in modern computer networks – TCP”and ILO3 – “calculate packet delay, throughput, channel
efficiency according to different network protocols”.)
Assume that TCP allows the size of receive window to be larger than 64KiB. Suppose that you
are using this extended TCP over 1 Gb/s link with RTT latency of 0.25 second to transfer an 80-
MiB file, and the TCP receive window is 4 MiB. Consider the MSS is 2 KiB and the initial value of
ssthresh is 8 MiB. Assume no congestion and no lost packets:
a) (0.3) How many RTTs does it take until slow start opens the congestion window to 4 MiB?
b) (0.8) How many RTTs does it take to send the whole file?
c) (0.3) If the time to send the file is estimated by the number of required RTTs multiplied by
the link RTT latency, what is the effective throughput for the transfer? What percentage of
the link bandwidth is utilized?













































































































学霸联盟


essay、essay代写
essay、essay代写