[Serdev] SIP UDP / dont fragment issue
Valentin Nechayev
netch at portaone.com
Wed Jun 1 11:50:27 UTC 2005
Wed, Jun 01, 2005 at 13:28:31, martin.koenig wrote about "Re: [Serdev] SIP UDP / dont fragment issue":
> it is implemented via ICMP type 3 (dest. unreachable) code 4
> (fragmentation needed), and the MTU of the next hop specified in this
> ICMP message.
Yes, it is defined on IP level (regardless of fact that MTU isn't
obligatory). But setting DF on UDP packets raises a bunch of
problems. First, one should add reliable, portable and well-known
mechanism to pass MTU limitation from kernel to userland. BSD
sockets interface doesn't provide that. Second, even if one knows
maximal available data size ont the path, how can it be applied to
real protocols which doesn't allow arbitrary splitting? Almost any
UDP-based protocol (including SIP over UDP) doesn't allow splitting
of a message to a few packets and (for efficiency) gathering parts
of a few messages to one packet. TCP allows this due to its concept
of established flow and possibility to cut the flow on any octet
boundary. SIP doesn't have such mechanism.
> It is very correct to set the dont fragment bit here, because the
> message is already fragmented and an endpoint would not be able to
> aggregate these further fragmented messages.
NO! IP fragmentation isn't very efficient, but it is reliable to
multiple fragmentation stages: fragment can be re-splitted and such
parts can be again gathered in correct way. And we again return to
the previous paragraph: unless you have reliable way to notify
stream splitter for a minimum of full-way-through maximal segment
size, as in TCP implementation, you can't detect correct MSS in
other way than test-and-fail technique.
> Thats why the packet will be dropped at the router and ICMP dest.
> unreachable must be responded.
HOW it will be responded? Please name the mechanism how simple
program without root privileges and with one UDP socket can get the
MTU returned to the kernel. Mechanism must be well-portable and
widely known.
--
Valentin Nechayev
Porta Software Ltd., Software Engineer
mailto:netch at portaone.com
More information about the Serdev
mailing list