Mid2 Solution - CN Sp24
Q1: [3+4+4 = 10 Marks]
a) List down any three responsibilities of the rdt_send() i.e reliable data send function in reliable
data transfer protocol.
i. timeout management, ii. packet transmission, iii. sequence number assignment,
iv. error detection, v. packet resend
b) Checksum is an error-detecting code used in many Internet standard protocols, including IP,
TCP, and UDP. Following data blocks are received with Checksum= 0001111001101110.
You need to verify the integrity of the received data using the given checksum.
0111001010110011 1011001110101000 1011101100110111
c) A computer with IP Address: 192.28.33.21 sends a
request to another computer. The request contains
following UDP header: 0050CB84001C001C.
Categorize content of above UDP header by
answering the following questions
i. What is the source port number?
ii. What is the socket address of the sender end?
iii. What is the total length of the user datagram?
iv. What is the length of data? Figure 1. UDP header and payload format
Solution:
(b) (c)
Page 1 of 2
Q2: [5+5 = 10 Marks]
a) Let’s suppose a window size of 4 and sequence number range from 0 to 8. Assume that 2nd
packet in the window is lost. Apply TCP fast retransmission. Also, Generate Acknowledgements
and complete the process until the lost packet is properly received by the receiver.
b) Let's suppose a window size of 4 and sequence number range from 0 to 8. Apply Go-Back-N
(GBN) for sender and receiver events and actions. Assume that 3rd packet in the window is lost.
Show the GBN operations using the diagram in the presence of the lost packet
Solution: (b) (c)
Q3: [2 + 4 + 4 = 10 Marks]
(a) Justify your answer.
i. Does TCP guarantees, meeting the delay requirement(s)? If yes, then discuss in brief, how such delay
guarantee is provided by TCP?No
ii. Is TCP segment of size 128KB is possible? If no, then what could be the maximum segment size
(MSS) possible?No. 64K
(b) Using a simple telnet scenario, illustrate with the help of a timing sequence diagram, how the TCP
handles sequence numbers and ACKs. The telnet client is Host A, and the server that is accessed
remotely, is Host B. The initial sequence number 42 and 78 are selected by Host A and Host B
respectively.
Solution:
(c) What action on the following events, will be taken by the TCP Receiver, for the ACK generation:
i. arrival of in-order segment with expected seq #. All data up to expected seq # already ACKed
ii. arrival of segment that partially or completely fills gap
Solution:
i. delayed ACK. Wait up to 500ms for next segment. If no next segment, send ACK
ii. immediate send ACK, provided that segment starts at lower end of gap
Page 2 of 2