Question

In: Computer Science

What's the point of having a checksum in the UDP datagram header when the source host...

What's the point of having a checksum in the UDP datagram header when the source host doesnt care if some parts of the message do not arrive at the destination?

Solutions

Expert Solution

User Datagram Protocol (UDP) is a Transport Layer protocol. It is unreliable and connectionless protocol. So, there is no need to establish connection prior to data transfer.

UDP header is of 8-bytes in which Checksum is of 2bytes. The main purpose of UDP checksum is to detect errors in transmitted segment. This field is optional in IPv4, and mandatory in IPv6.

UDP uses the checksum in order to determine whether the received data is corrupted along the network or not. The sender will compute the checksum value based on the data and embed it in the frame. At the receiver side checksum is calculated again and matched with sender’s checksum if error is detected then packet is discarded by receiver and not delivered to the socket.

Thus by using checksum you have a reasonable amount of assurance that the data has not been corrupted. Without any checksum, there would be no guarantee that the bytes received are the same as the bytes sent.

Please Rate the answer and if you have any query please ask .


Related Solutions

A program at host A sends a UDP datagram carrying 4500 octets1 of data (or payload)...
A program at host A sends a UDP datagram carrying 4500 octets1 of data (or payload) to its counterpart at host C. In between A and C is router B. The MTU between A and B is 1500 octets while between that B and C 1320 octets. Show IP packets and fragments along the path. For each IP packet and fragment, show key header fields like Total Length, Identification, More Flag, and Fragmented Offset
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT