2 2 votes In TCP checksum is mandatory but in UDP checksum is optional. Why ? Computer Networks computer-networks tcp udp + – Ashish Roy 2.2k views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply Jatin18 commented Aug 21, 2017 reply Follow flag Can you please state the source where this(UDP checksum is optional) is mentioned. 0 0 replyShare smsubham commented Dec 6, 2019 reply Follow flag The checksum field may be used for error-checking of the header and data. This field is optional in IPv4, and mandatory in IPv6. The field carries all-zeros if unused. Source: https://en.wikipedia.org/wiki/User_Datagram_Protocol @Jatin18 0 0 replyShare Please log in or register to add a comment.
0 0 votes IPv4 is optional but mandatory in IPv6 Source - https://stackoverflow.com/questions/23373764/udp-optional-checksum nephron answered Sep 24, 2018 nephron comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes TCP is a guaranteed delivery protocol which not only give guarantee of delivery of packets but also correctness whereas USP does not provide any such guarantee. That is the precise reason why UDP packets include checksum field as optional (16 bit CRC checksum) which the receiving operating system will use to check for packet corruption. If the checksum is present and fails, then the packet will be silently discarded. It is up to the application to notice that the packet disappeared and take corrective action, where in case of TCP re-transmission takes place. Yes unlike TCP, Checksum calculation is not mandatory in UDP. No Error control or flow control is provided by UDP. Hence UDP depends on IP and ICMP for error reporting. So it depends on other layers hence not mandatory requirement. Ref: https://www.queryhome.com/tech/157481/why-tcp-checksum-is-mandatory-but-in-udp-checksum-is-optional smsubham answered Mar 5, 2020 smsubham comment Share Follow 0 reply Please log in or register to add a comment.