
The checksum value represents the bits in the transmission message. The checksum is an error detections mechanism that determines data integrity.
#ICMP CHECKSUM CODE#
Hence, each message type with the same code value gives different network information. Moreover, type 8 code 0 and type 0 code 0 represent echo-request and echo reply messages. Similarly, for type 3 code 1, the message specifies that the host is unreachable.
For instance, ICMP type 3 with code 0-15 specifies why the destination is unreachable that is, if the code is 0, then it's because the network is unavailable. The ICMP code provides additional information about the messages. For instance, the difference in calculated checksum at the destination from the source generates this ICMP error message.
Parameter Problem: The source device receives this message when there is any missing value in the datagram header. As such, it updates the source about the change in its route. Redirection: A router in a non-optimal path redirects the packet to a router with an optimal path between the source and destination. The error reporting message adds flow control in the network layer by informing the source device about congestion in the path and slowing down the data sending process. Source Quench: When the devices fail to deliver the datagram due to network congestion, they send an ICMP "source quench message" to the message sender. Consequently, the devices discard the datagram. Destination Unreachable: The connection initiating device receives an unreachable destination error message when the router or intermediary host fails to deliver it. The message is also sent when the destination does not receive all data fragments. Time Exceeded: The ICMP packet has a time-to-live parameter that when it reaches 0, the router or host discards the datagram and sends a time exceeded error message. These are the messages that the router or intermediary host may face in datagram processing: