RE: [GD-General] UDP practical limits
Brought to you by:
vexxed72
From: Nicolas R. <nic...@fr...> - 2004-04-13 07:18:54
|
> (1) What size limit on UDP packets is imposed by the > UDP specification? IP Packet maximal size is 65535. When removing IP/UDP headers (28 bytes), you get a max data size of 65507 bytes. > > (2) What size limit on UDP packets is imposed by the > operating system (Windows, Linux, ...), and how > can I query the OS for these limits? Don't know any OS "adding" limits on UDP packets. Wouldn't be compliant with standards. Some socket options do contain the max size for a given socket. > > (3) What is the practical limit of UDP packets going across the > wild Internet, through dozens of routers with various > policies? Strictly speaking of UDP packets, nothing else. Note however that when a packet size is greater than a given value (MTU), it might be fragmented into several packets and recombined later when possible. This can happen several time on each router. Usually that MTU is around 1500 bytes. It is strongly encouraged when communicating with another host to discover the MTU on the path. Though the path may change (and therefode MTU) it is unlikely to happen very often. Using MTU max size for packets will avoid adding extra IP/UDP headers during communication. > > (I know UDP is "unreliable", but I'd like to push UDP > packet size as high as possible without significantly > increasing the risk of UDP packets being quietly > dropped along the route to their destinations.) > Simple: If your packet is fragmented into 'n' smaller ones, the final packet will be lost 'n' times more often ! :) So basically, the chance to loose a packet is around (Size/MTU) bigger. Nicolas --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.656 / Virus Database: 421 - Release Date: 09/04/2004 |