TCP Checksum errors

When analysing packet traces from ZXTMs with a program such as Ethereal, you may occasionally see outbound packets that have been flagged as having incorrect TCP checksums, although the IP checksum will be correct.

One possible reason for this is if your network cards are capable of performing TCP Checksum Offload. Broadcom and Intel gigabit cards are among those that can offload TCP checksum calculation. Linux enabled TCP Checksum Offload automatically when it is available.

With TCP Checksum Offload, the packets are captured before the card calculates the checksum -- so the checksums may not be correct. The checksum actually transmitted on the wire and received by the destination host will be correct.

On Linux, it is possible to disable TCP checksum offload with the following command:

ethtool -K <interface> rx off tx off

Taking another trace after running this command should give you packets where all the checksums are correct.

Offload can be re-enabled with this command:

ethtool -K <interface> rx on tx off

Martin [Zeus Consultancy] 26 May 2006 Bookmark with del.icio.us Post this article to Digg Post this article to reddit Post this article to Facebook Tweet this article 3 comments  

Comments:

This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.

Comment from: Lin Chen [Visitor]
I tried
ethtool -K rx off , it yields error :
Cannot set device rx csum settings: Operation not supported
in RHEL kernel 2.6.9-67.

Do you know why?

Thanks
Permalink 15 December 2008 @ 18:33
Comment from: Raghu Gandham [Visitor]
Are you sure you are doing this as root ?
Permalink 18 February 2010 @ 04:28
Comment from: Raghu Gandham [Visitor]
Ok.. I missed the point that the error message was Operation not supported. This happens if the ethernet driver does not support setting of rx csum value.
Permalink 18 February 2010 @ 04:30
Leave a comment ...
Your email address will not be displayed.
Your URL will be displayed.
This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.
Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)

Recently...

Other Resources