Search for question
Question

4. UDP and TCP checksum. a. UDP and TCP use 1s complement for their checksums. Suppose you have the following three 8-bit bytes: 01010011, 01100110, 01110100. What is the Is complement

of the sum of these 8-bit bytes? (Note that UDP and TCP use 16-bit words in computing the checksum, you are being asked to consider 8-bit sum for simplicity.) Show all work. With the 1s complement scheme, how does the receiver detect errors? Is it possible that a 1-bit error will go undetected? How about a 2-bit error? b. UDP and TCP checksum calculation includes 3 sections: a pseudoheader containing part of the information of the IP header (in particular, source IP address and destination IP address), the UDP/TCP header and the payload. Please explain why the checksum calculation includes the pseudoheader. c. [extra pts] The sender of a UDP packet can choose not to calculate the checksum. In this case, the checksum field is filled with all Os. What if the sender decides to calculate the checksum, but it happens that the result is all Os? Please explain why this does not create confusion on the receiver side.

Fig: 1