Rainer:

> I have to admit I am not 100% sure what the UDP spec says: If
> a UDP packet becomes fragmented (due to MTU), is it
> guaranteed that the packet will be re-assembled by the
> receivers IP stack before it is passed up to the app layer?
> What if a fragment is missing? Will the whole packet be
> discarded by the stack (UDP is best effort, after all...)?

Postel's UDP RFC768 from 1980 is 3 pages long with references. Ah, the
good old times! :) It talks about very few things.  Besides,
fragmentation is an IP layer issue and not UDP.  IP layer must
reassemble the whole packet before providing it to the next layer - be
it UDP or TCP.  So, yes, if one fragment is lost, the whole datagram is
discarded.

>From what I understand fragmentation should be avoided (but not at all
costs) due to the following:

 - performance of fragmenting & reassembly
 - higher risk of datagram loss due to fragment loss
 - broken "stateless" firewalls

Any other reasons we know of?

> I would appreciate if someone saves me the time of reading
> the UDP RFCs...

Some pointer on fragmentation and MTU size:

RFC1122 Section 3.3.3:

"It is generally desirable to avoid local fragmentation and to choose
EMTU_S low enough to avoid fragmentation in any gateway along the path.
In the absence of actual knowledge of the minimum MTU along the path,
the IP layer SHOULD use EMTU_S <= 576 whenever the destination address
is not on a connected network, and otherwise use the connected network's
MTU."

...

"In general, no host is required to accept an IP datagram larger than
576 bytes (including header and data), so a host must not send a larger
datagram without explicit knowledge or prior arrangement with the
destination host."

------

I think it would not hurt to point out some the potential fragmentation
issues in -transport and *recommend* a message size smaller than 548
bytes (576 minus IP/UDP headers).

>From Stevens: "Many UDP applications are designed to restrict their
application data to 512 bytes or less, to stay below the [576 byte]
limit".  He also mentions his experiments in which very few OS actually
support transmitting or receiving maximum UDP packet size of 64Kb. So, I
guess 64Kb limit is problematic for reasons other than fragmentation.

But if we impose 1024 byte limit, let's at least make it something that
is closer to using the whole Ethernet 1500 frame or at least close to
IPv6 minimum MTU, which I think is 1280 bytes. This would still be
consistent with SNMP requirements, which seems to stem from the same
limitation of 1500 byte frame minus IP/UDP header of 28 bytes = 1472.

Thanks,
Anton.



Reply via email to