[Devel] tcp keepalive question

Juha Heinanen jh at tutpro.com
Fri Dec 15 19:31:35 CET 2006


in case registrar module tcp_persistent_flag is set, openser keeps tcp
connection open to the registered UA for the duration of the
registration by setting lifetime of tcp connection to suitable value.
does this mean that the such connection remains idle and that no tcp
keepalive probes are send to the the registered phone?

if there are no keepalives isn't there possibility that nat binding from
tcp UA will expire and requests to the UA will fail?  

looking at tcp(7) man page, there are tcp socket related variables such as:

      tcp_keepalive_intvl (integer; default: 75)
              The number of seconds between TCP keep-alive probes.

       tcp_keepalive_probes (integer; default: 9)
              The  maximum number of TCP keep-alive probes to send before giv-
              ing up and killing the connection if  no  response  is  obtained
              from the other end.

       tcp_keepalive_time (integer; default: 7200)
              The  number  of seconds a connection needs to be idle before TCP
              begins sending out keep-alive probes.  Keep-alives are only sent
              when  the  SO_KEEPALIVE  socket  option is enabled.  The default
              value is 7200 seconds (2 hours).  An idle connection  is  termi-
              nated  after approximately an additional 11 minutes (9 probes an
              interval of 75 seconds apart) when keep-alive is enabled.

i didn't find openser tcp source code using them, however.  is there
some other strategy in place for keeping nat bindings open to tcp UAs?

-- juha



More information about the Devel mailing list