[Serusers] UDP fragmentation

Nils Ohlmeier nils at iptel.org
Fri Jan 2 18:42:56 CET 2004


Hello,

On Friday 02 January 2004 11:29, Thilo Salmon wrote:
> Happy near year everybody,

i wish also a happy new year to all the readers here too :)

> this year started with a surprise: UACs I had behind a NAT would not
> take calls. Further research revealed, that my INVITE messages would be
> to large to fit my MTU of 1500 of traversing three proxies.
> Unfortunately, the fragmented UDP packets would NAT traverse my NATs.
>
> Now, looking at the INVITE messages, my first idea was to strip some
> header fields which are not strictly required to set up a call at the
> last proxy - such as 'User-Agent'. Would that be a way to go? If so, is
> there a way of doing this with ser? Or would I need tunnel those
> messages through a B2BUA (if so, which one would you use)?

You can remove header fields with the remove_hf() function from the textops 
module. You should verify that you do not remove required header fields, but 
basicly it should be possible to do it that way. Allthough i think this not a 
very good solution because you will never know to which size the request will 
grow and if you will be able to strip it down under 1500.

I think the better choice is to switch to TCP to eliminate the MTU problem. 
Either directly at the starting UA, or you can also switch the transport at 
SER with forcing the transport for forwarding to TCP.

> Naturally my favourite option would be to find a univeral solution to
> force UDP fragments through a NAT. However, my understanding as of now
> is, that UDP fragments do not carry port information so they will not
> make it through a NAT which does not keep state, suahc as my D-Link
> residential router.

Yes, you are right. But i assume that your router should answer with an ICMP 
error that fragmentation is not allowed. Maybe this is ignored by the UA.
BTW fragmentation is bad for several other reasons :)

Greets
  Nils




More information about the sr-users mailing list