Windows corrupting UDP datagrams
blog.geeky-boy.com
blog.geeky-boy.com
Additionally, I've seen the effects of weird bugs with receive offloading in Linux routers as well: If packets get combined before forwarding, they can be dropped because of the mtu on the next hop interface, so the performance enhancement is actually decreasing performance (and since it's a middle box, I can't do anything except hope my packets don't arrive close enough in time to get aggregated)
1. UDP protocol. (Duh!) 2. Multicast sends. (Does not happen with unicast UDP.) 3. A process on the same machine must be joined to the same multicast group as being sent. 4. Window's IP MTU size set to smaller than the default 1500 (I tested 1300).
5. Sending datagrams large enough to require fragmentation by the reduced MTU, but still small enough not to require fragmentation with a 1500-byte MTU.
I mean, I guess, but I kinda assumed as much, since if Windows was corrupting UDP at any significant frequency certainly it would have been noticed by now.
I might have to try this myself to see if I can replicate it.
In fact, some versions of Linux didn't do UDP reassembly properly until a year ago (was a topic here on HN). Reordered UDP wasn't dealt with properly if I recall.
There are routers that drop UDP for any reason or no reason. And so on. So UDP is the red-headed stepchild of protocols, with little testing going on and lots of issues.
I recommend putting a protocol on top of any UDP transfer you code, and never increasing the MTU.
For basically everything TCP is used. UDP is just used by DNS and they usually weight 100 - 200 bytes.
Look into your wireshark!
I also made a long-winded answer to your question submitted to the blog, if you're interested.