Its a slighlty different question. I'm asking what is the largest packet I can send over the internet (without any knowledge of the other networks, or probing) which is not going to have fragmentation. Essentially the maximum safe size, that will work on evereything without having to worry about probing the connection.
–
docflabbyJul 8 '09 at 15:58

7 Answers
7

It is true that a typical IPv4 header is 20 bytes, and the UDP header is 8 bytes. However it is possible to include IP options which can increase the size of the IP header to as much as 60 bytes. In addition, sometimes it is necessary for intermediate nodes to encapsulate datagrams inside of another protocol such as IPsec (used for VPNs and the like) in order to route the packet to its destination. So if you do not know the MTU on your particular network path, it is best to leave a reasonable margin for other header information that you may not have anticipated. A 512-byte UDP payload is generally considered to do that, although even that does not leave quite enough space for a maximum size IP header.

Just to be clear: having a small size to avoid fragmentation does not make delivery of the packet "Safe", there are still an infinite amount of possibilities making delivery unreliable such as dog ate my network cable. That said; having less fragments makes delivery "safer" because if there were more than one and any one of those never made it - the whole packet (datagram) is dropped by UDP.
–
markmnlJan 5 '13 at 9:28

That being said, most protocols limit to a much smaller size - usually either 512 or occasionally 8192. You can often go higher than 548 safely if you are on a reliable network - but if you're broadcasting across the internet at large, the larger you go, the more likely you'll be to run into packet transmission problems and loss.

Given that IPV6 has a size of 1500, I would assert that carriers would not provide separate paths for IPV4 and IPV6 (they are both IP with different types), forcing them to equipment for ipv4 that would be old, redundant, more costly to maintain and less reliable. It wouldn't make any sense. Besides, doing so might easily be considered providing preferential treatment for some traffic -- a no no under rules they probably don't care much about (unless they get caught).

So 1472 should be safe for external use (though that doesn't mean an app like DNS that doesn't know about EDNS will accept it), and if you are talking internal nets, you can more likely know your network layout in which case jumbo packet sizes apply for for non-fragmented packets so for 4096 - 4068 bytes, and for intel's cards with 9014 byte buffers, a package size of ...
wait...8086 bytes, would be the max...coincidence? snicker

how are you calculating 1472? ethernet has an MTU of 1500, is that what you're referring to?
–
rogerdpackNov 15 '13 at 14:00

2

@rogerdpack I think he means that because IPv4 and IPv6 are likely to share a lot of infrastructure, and that IPv6 is getting relatively popular, it should be safe to assume IPv6 limits (thus the 1500). How valid this reasoning is, however, I cannot tell.
–
ThomasDec 18 '13 at 12:39

This article describes maximum transmission unit (MTU) http://en.wikipedia.org/wiki/Maximum_transmission_unit. It states that IP hosts must be able to process 576 bytes for an IP packet. However, it notes the minumum is 68. RFC 791: "Every internet module must be able to forward a datagram of 68 octets without further fragmentation. This is because an internet header may be up to 60 octets, and the minimum fragment is 8 octets."

Thus, you can be fairly certain that most if not all packets received will be received at the generally accepted 512 bytes, but are not guaranteed that they will not be fragmented by other network layers; the article mentions tunneling as an example.