The correct maximum UDP message size is 65507, as determined by the following formula: 0xffff - (sizeof (IP Header) + sizeof (UDP Header)) = 65535- (20+8) = 65507 That being said, most protocols limit to a much smaller size - usually either 512 or occasionally 8192. No. The maximum IPv4 packet length of 65,6535 minus the IPv4 header length (minimum 20, maximum 60) gives you the maximum UDP datagram length. Then, you subtract the UDP header size of 8 to get the maximum UDP payload size. This is the theoretical maximum, but the real maximum size will depend on the link MTU, and that will not be anything near.