Java Socket: TCP Checker

I am experimenting with w / java sockets. I can connect to the socket and send / receive bytes of data without a problem. However, I also sniff traffic with wirehark and notice that every packet that comes from the java socket is marked as wirehark as "invalid tcp checksum."

Does anyone have an understanding?

java version "1.6.0_12" Java (TM) SE Runtime Environment (build 1.6.0_12-b04) Java client virtual machine HotSpot (TM) (build 11.2-b01, mixed mode, shared)

Wireshark v1.0.6 w / WinPcap 4.0.2

+6
java sockets tcp
source share
2 answers

I found that in many cases using a tool like Wireshark will give you the wrong tcp checksums for local packages.

This is due to the fact that the OS reasonably spends no effort filling tcp checksums on packets destined for the local host (in the end, they cannot be incorrect).

In addition, locally generated packets coming out on a real physical interface probably have hardware Tcp checksums. This means that sent packets usually look as if they have the wrong checksums (they will be correct on the wire).

Configure the monitor port on your switch, launch Wireshark in a separate window connected to it, and you will see the true image.

+13
source share

This is described on the Wireshark wiki here .

+7
source share

All Articles