UDP checksum error - TCP-IP

This is a discussion on UDP checksum error - TCP-IP ; In my application I send the same UDP packet 3 times. I trace the packets with a sniffer (Wireshark) and I can see them clearly. The first packet is being sent without any error. The second packet is an exact ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: UDP checksum error

  1. UDP checksum error

    In my application I send the same UDP packet 3 times. I trace the packets
    with a sniffer (Wireshark) and I can see them clearly.
    The first packet is being sent without any error.
    The second packet is an exact duplication of the first one and being sent
    without any error also.
    In the third packet I just modify the IP checksum error with my own
    algorithm and leave all the other bytes unchanged. It ends up with an
    identical checksum to the original checksum. In the sniffer I see that the
    packet is similar to the original - but there is a UDP checksum error though
    I didn't modify anything appart from the IP checksum(no other change from
    the original)
    Can someone explain this error please?
    Regards

    Jack



  2. Re: UDP checksum error

    On Nov 3, 10:22*am, "Jack" wrote:
    > In my application I send the same UDP packet 3 times. I trace the packets
    > with a sniffer (Wireshark) and I can see them clearly.
    > *The first packet is being sent without any error.
    > The second packet is an exact duplication of the first one and being sent
    > without any error also.
    > In the third packet I just modify the IP checksum error with my own
    > algorithm and leave all the other bytes unchanged. It ends up with an
    > identical checksum to the original checksum.

    I am not sure that I understood it correctly: you changed the checksum
    calculation function on the SENDER, the result of checksum calculation
    is the same as before (you decided to improve speed maybe and nothing
    else...), so the resulting packet should be identical to the original
    packets? Or is the calculated checksum different after all? If it is
    different, did you let the RECEIVER know that you are using
    alternative checksum calculation function? Does the RECEIVER know how
    to check it?
    > In the sniffer I see that the
    > packet is similar to the original - but there is a UDP checksum error though
    > I didn't modify anything appart from the IP checksum(no other change from
    > the original)
    > Can someone explain this error please?
    > Regards
    >
    > Jack



  3. Re: UDP checksum error

    Jack wrote:
    > In my application I send the same UDP packet 3 times. I trace the packets
    > with a sniffer (Wireshark) and I can see them clearly.
    > The first packet is being sent without any error.
    > The second packet is an exact duplication of the first one and being sent
    > without any error also.
    > In the third packet I just modify the IP checksum error with my own
    > algorithm and leave all the other bytes unchanged. It ends up with an
    > identical checksum to the original checksum. In the sniffer I see that the
    > packet is similar to the original - but there is a UDP checksum error though
    > I didn't modify anything appart from the IP checksum(no other change from
    > the original)
    > Can someone explain this error please?


    Are you seeing the "corrected" checksum on the sending or receiving
    side?

    If it's on the receiving side, it's because many modern network
    adapter drivers offload checksum calculation to the hardware (the
    adapter) for speed. If you trace on the sending side it looks like
    every packet has a checksum error, since the driver doesn't calculate
    the checksum at all. It gets filled in on the adapter card before
    being put on the wire.

    This is why Wireshark has an option to disable checksum verification
    -- you can turn it on for the sending side to avoid a bunch of
    spurious checksum error flags.

+ Reply to Thread