Are there Unix tools to troubleshoot UDP packet corruption? I'd like to avoid writing my own...

I think ping might report when a packet is corrupted, but it doesn't really seem to have options targeting corruption. I guess I'd like to find the BER and also—if possible—where in the path its occurring.

(Background: I have three OpenVPN VPNs (all in UDP mode, using certificates) running between two Linux machines, over different ISPs. One of the VPNs occasionally spits out "Authenticate/Decrypt packet error: packet HMAC authentication failed", which I believe means either that one of the VPN packets was corrupted in transit, or alternatively someone spewed random junk to the OpenVPN port. I'm guessing corruption, as it occurs mainly during a bulk transfer at night.)

  • 1
    This is a problem above the UDP level, it is the VPN detecting the problem. If there are broken UDP packages, your application won't find out. – vonbrand Mar 18 '13 at 16:48
  • @vonbrand It happens on only one of the the three VPNs (with the same software and same config, except for IP/port). The UDP checksum should discard bad packets, bit its only a 16-bit checksum, so 1/65536 should make it through by chance. – derobert Mar 18 '13 at 19:24
  • Check cabling, etc. Is some cable passing near a fluorescent light (copious eletromagnetic interference, might be turned on only during the night)? – vonbrand Mar 18 '13 at 19:25
  • @vonbrand The lights here are off at night (this side is in a small office, so all of that is turned off at night) But I'm hoping to find some tool to just blast several mbps of UDP traffic across to confirm its actually packet corruption. – derobert Mar 18 '13 at 19:30
  • 1
    Hmm... could tshark be useful here? Maybe tshark -o 'udp.check_checksum: TRUE' ...? – Martin von Wittich Jan 27 '14 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.