TCP Header

Hello Attila

The Checksum field in the TCP header plays a similar role to the FCS field in the trailer of Ethernet frames in that they both check the integrity of the transmitted data. However, because they exist at different layers, they perform and behave very differently and thus serve somewhat different purposes.

The FCS field in the Ethernet frames ensures that a received frame has not been corrupted during transit. Remember that communication at Layer 2, which is where Ethernet resides, is performed on a hop-by-hop basis. The FCS is actually recalculated at every hop. If the FCS fails when transmitted from one router to another, the frame is simply dropped. It is up to higher-layer protocols to recover from such a failure.

On the contrary, the Checksum field in the TCP header is used to ensure data integrity for end-to-end communications (as opposed to hop by hop). The checksum provides end-to-end error detection between the source and destination application and is tested when received by the intended application. This means that it checks for errors across the entire path of the communication. If the checksum fails, the receiver will not accept the segment but will inform the sender to resend the segment that was not received correctly. TCP does not simply drop the segment. This is part of why TCP is considered a “reliable” protocol because it has mechanisms to correct faults rather than simply discarding the segment.

One final difference between the two is that the TCP checksum checks the integrity of the TCP header and payload, while the FCS in the Ethernet frame covers the entire frame, including the Ethernet header and payload, and the IP header and payload. These different scopes are important to ensure data integrity across the different layers of the network stack.

I hope this has been helpful!

Laz

1 Like