2

I am developing an Ethernet driver and implementing TCP exchange code. To test my TCP code this is the scenario (monitored on wireshark):

Server: Custom Ethernet device

Client: PC

  1. I opened TCP client socket from hercules utility.
  2. I am able to see ARP request and response exchange from the ethernet device and hercules.
  3. After ARP request is served, client sends TCP SYN packet and server repsonses with SYN-ACK.
  4. To complete 3 way handshake client should send ACK at the end which I am not getting and hercules says TCP connection time out.

I need to diagnose the possible issue of why the client is not acknowledging SYN-ACK to complete 3-way handshake.

TCP SYN ACK packet exchange image

1 Answer 1

2

Where are you capturing, on the client or the server? If you're capturing on the client, then try enabling IP header checksum validation via "Edit -> Preferences -> Protocols -> IPv4 -> Validate the IPv4 checksum if possible".

It looks to me like the IP header checksum of the server's SYN/ACK packet is 0, thus invalid, and if that's the case, you'll have to compute it; otherwise the client machine will drop the IP packet as being invalid.

Note that if you're capturing on the client and the client's IP header checksum of the SYN packet is 0, then as Wireshark indicates, that's probably because the client machine is configured for "IP checksum offload" and Wireshark is receiving the packets before the checksum is computed by the hardware.

If you really want to see what's going on, you should capture on a separate machine using a SPAN port or TAP; that way you will receive packets with proper checksums computed. For more information on capturing, you might want to have a look at Wireshark's Ethernet capture setup wiki page, or Jasper Bongertz' very helpful 6-part Network Capture Playbook, beginning with Part 1 - Ethernet Basics in which is referenced another one of his articles, The drawbacks of local packet captures.

1
  • Thanks Christopher. I am new user to superuser and don't have much credit score to up vote you. You gave nice and useful explanation solved my problem. Thanks once again. Some please up vote Christopher's answer.
    – RAJ JOHRI
    Commented Apr 10, 2019 at 10:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .