You are on page 1of 2

COMSATS University, Islamabad

CSC 339 Data Communications and Computer Networks


BSSE-VB

Assignment #2
Due Date: 2 May 2020 Total Marks: 50

---------------------------------------------------------------------------------------------------
Important Note: Copying Assignment or a part, from any source would be considered as a
serious offense that will results in Zero Marks.

1) UDP and TCP use 1s complement for their checksums. Suppose you have the following three
8-bit bytes: 01010011, 01100110, 01110100. What is the 1s complement of the sum of these 8-bit
bytes? (Note that although UDP and TCP use 16-bit words in computing the checksum, for this
problem you are being asked to consider 8-bit sums.) Show all work.

2) Consider the rdt 3.0 protocol. Draw a diagram showing that if the network connection between
the sender and receiver can reorder messages (that is, that two messages propagating in the medium
between the sender and receiver can be reordered), then the alternating-bit protocol will not work
correctly (make sure you clearly identify the sense in which it will not work correctly). Your
diagram should have the sender on the left and the receiver on the right, with the time axis running
down the page, showing data (D) and acknowledgment (A) message exchange. Make sure you
indicate the sequence number associated with any data or acknowledgment segment.

3) Consider the cross-country example shown in Figure below. How big would the window size
have to be for the channel utilization to be greater than 98 percent? Suppose that the size of a
packet is 1,500 bytes, including both header fields and data.

Page 1 of 2
(4) Answer true or false to the following questions and briefly justify your answer:
a. With the SR protocol, it is possible for the sender to receive an ACK for a packet that falls
outside of its current window.
b. With GBN, it is possible for the sender to receive an ACK for a packet that falls outside of its
current window.

(5A) Suppose a TCP connection is transferring a file of 1000 bytes. The first byte is numbered
10001. What is the sequence number of the segment if all data is sent in only one segment.

(5B) Consider the TCP reliable data transport protocol. The sender sends two packets, first one
with 15 bytes of data and second one with 25 bytes of data. The initial sequence number is 107
and the first ACK is lost. Draw a space time diagram to show the sequence of events.

Page 2 of 2

You might also like