When WireShark captures packets, the TCP packet may be caused by ip checksum offload

Source: Internet
Author: User

When we captured packets with WireShark recently, we found that an error occurred in the TCP packet: IP Checksum Offload. After reading the information, we finally found the cause.

In summary, the packet captured by wireshark prompts a Checksum error because it intercepts the overfilled checksum of the operating system, while the Gigabit Nic enables Checksum Offload, the calculation work will be handed over to the NIC. The NIC finally calculates the correct checksum and sends it out.

That is, the checksum was previously implemented by the system protocol stack and is now implemented by the NIC hardware, which can save a lot of CPU resources. Microsoft's test shows that it can save up to 30% of CPU resources. Ibm aix documentation pointed out: for PCI interface Gigabit Nic is not as good as let the CPU above MHz to calculate the checksum, And the PCI-X Gigabit Nic can achieve line speed after enabling this, this saves CPU resources.

In windows, you can open the Device Manager and find the corresponding nic. in the Advanced properties of the NIC, change the checksum offload attribute to none.

In linux, run the ethtool command to disable checksum offload. The specific command is as follows:

# Ethtool-K eth0 tx off rx off

In this way, the inspection is not completed by the NIC hardware, but is implemented by the system, and no error is reported.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.