How to fix TcpClient Ip Header Bad Checksum

powerbox picture powerbox · Nov 15, 2010 · Viewed 9.7k times · Source

I'm using System.Net.Sockets.TcpClient class but whenever I send custom packet over the network I'm seeing bad checksum on my wireshark capture. How can I fix it?

Answer

Pieter van Ginkel picture Pieter van Ginkel · Nov 15, 2010

The problem is that you have checksum offloading set on your network interface.

This causes your network card to calculate the checksum and not Windows. WireShark will detect this as incorrect checksums, but they really aren't.

In the properties of your network interface, if you click [Configure], the [Advanced] tab has a [Offload Checksum] item. If you set that to [Disabled], WireShark will display that the checksums are correct.