Q1)
Suppose you have following two bytes data (although UDP uses a 16-bit word but we use 8-bit here for the sake of simplicity)
Byte1: 00110100
Byte2: 01101001
a) Compute the checksum (this checksum is sent by the sender in UDP header)
b) In flight (over the network), least significant bit is corrupted to 1 for Byte1, and least significant bit is corrupted to 0 for Byte2. With this data, what checksum will be computed at the receiver side
c) If UDP receiver computes the Internet checksum for the received UDP segment and finds that it matches the value carried in the checksum field, can the receiver be absolutely certain that no bit error have occurred? Explain.
Question 2:
a) In Stop and wait protocol, sender wait for ACK before sending next packet. But what if an ACK is dropped in the network and never reached to sender. What sender should do in that case?
b) A sender process transmits 100 packets towards destination process. Out of 100, 80 packets successfully reach the destination whereas 20 packets drop in the network. How many ACKs will be sent by the receiver towards sender while using:
• ACK (positive/ normal ACK)
• NACK
c) Why do we need length field in UDP header when we know that the length of the UDP header is always fixed (i.e. 8 Bytes)?