HOWTO: Use ethtool to configure checksum offload for NICs under Linux

來源:互聯網
上載者:User

What is checksum offloading

From http://www.wireshark.org/docs/wsug_html_chunked/ChAdvChecksums.html

The checksum calculation might be done by the network driver, protocol driver or even in hardware.

For example: The Ethernet transmitting hardware calculates the
Ethernet CRC32 checksum and the receiving hardware validates this
checksum. If the received checksum is wrong Wireshark won’t even see
the packet, as the Ethernet hardware internally throws away the packet.

Higher level checksums are “traditionally” calculated by the
protocol implementation and the completed packet is then handed over to
the hardware.

Recent network hardware can perform advanced features such as IP
checksum calculation, also known as checksum offloading. The network
driver won’t calculate the checksum itself but will simply hand over an
empty (zero or garbage filled) checksum field to the hardware.
Checksum offloading often causes confusion as the network packets to be
transmitted are handed over to Wireshark before the checksums are
actually calculated. Wireshark gets these “empty” checksums and
displays them as invalid, even though the packets will contain valid
checksums when they leave the network hardware later.

Checksum offloading can be confusing and having a lot of [invalid]
messages on the screen can be quite annoying. As mentioned above,
invalid checksums may lead to unreassembled packets, making the
analysis of the packet data much harder.

You can do two things to avoid this checksum offloading problem:
* Turn off the checksum offloading in the network driver, if this option is available.
* Turn off checksum validation of the specific protocol in the Wireshark preferences.

How to turn off checksum offload?

Under linux, check the status of offload parameters for the interface (eth0):
ethtool -k eth0


Then turn off tx-checksumming by:
ethtool -K eth0 tx off


Refer to man page of ethtool for more.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.