[Devel] tcp keepalive question

Juha Heinanen jh at tutpro.com
Mon Dec 18 08:31:03 CET 2006


i did some tcp tests using nokia N80 phone and it turned out that if
there was no other activity, it kept on sending 4 byte tcp messages
every 20 minutes, which wireshark reported as "continuation" messages.
they wre enough to keep linux iptables nat binding open.  i have been
told that it is possible to configure the keepalive interval in N80
using some special means.

 > I think there was a discussion on sip-implementors discussing this topic
 > and the conclusion was, that this is different an every OS and often not
 > configurable (or least only per system, not per application/connection).
 > Thus it is to unreliable.

my understanding is tcp keepalive options are supported in linux are
they are configurable per tcp session.

 > If the client sends keep-alive (like eyebeam) there wont be a problem. IMO
 > a client should do this. Of course there should be also an option at the
 > server.

yes, it is best if tcp keepalives are sent by the UA, like it is the
case with N80.  however, because there may be sip UAs that do not sent
any keepalives, it might be a good idea if also openser would support
sending them.  this would be possible at least on linux, which i believe
is the most popular host os for openser.

 > One workaround would be to set expire to small values forcing keep-alive
 > with REGISTER.
 > 
 > I wonder if the keep-alive from nathelper module can be used to send keep
 > alive (CRLF or OPTIONS). I have not tested it yet - maybe it already
 > works. IMO there is no reason why the UDP mechanisms should not work with
 > TCP/TLS too.

i consider both of these too heavy and cumbersome when the same effect
can be achieved automatically by tcp keepalives.

-- juha



More information about the Devel mailing list