Hi<div><br></div><div>I just checked these parameters in runtime (using sysctl -a | grep &quot;tcp_keepalive&quot;) and I get:</div><div><br></div><div><div>net.ipv4.tcp_keepalive_time = 7200</div><div>net.ipv4.tcp_keepalive_probes = 9</div>

<div>net.ipv4.tcp_keepalive_intvl = 75</div><div><br></div><div>I recognize the &quot;75&quot; value used in the delay between my k.a. ! It gets clearer :-)</div><div><br></div><div>My question is: does kamailio set somewhow (parameter of source code constant definition) this net.ipv4.tcp_keepalive_intvl parameter ? Or should I fine tune myself in the OS kernel configuration ?</div>

<div><br></div><div>Cheers</div><div>Pascal</div><div><br></div><br><div class="gmail_quote">On Mon, May 10, 2010 at 2:33 PM, Klaus Darilion <span dir="ltr">&lt;<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Pascal!<br>
<br>
The TCP keepalive is not an application layer keep alive, but Kamailio just sets the SO_KEEPALIVE socket option. The the TCP keep alive is implemented and performed by the operating systems.<br>
<br>
Thus, if you want to tweak the TCP keep alive, then you have to tweak the kernel.<br>
<br>
regards<br>
Klaus<br>
<br>
Am 07.05.2010 16:20, schrieb Pascal Maugeri:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&quot;kamailio&quot; &lt;<a href="mailto:users@lists.kamailio.org" target="_blank">users@lists.kamailio.org</a> &lt;mailto:<a href="mailto:users@lists.kamailio.org" target="_blank">users@lists.kamailio.org</a>&gt;&gt;,<div>

<div></div><div class="h5"><br>
<br>
Hi<br>
<br>
I am sorry to ask again about this topic but I don&#39;t understand yet how<br>
the TCP keep-alive are sent.<br>
<br>
With Kamailio 3.0.1 and the following configuration:<br>
<br>
    tcp_keepalive=yes<br>
    tcp_keepidle=10<br>
    tcp_connection_lifetime=3600<br>
<br>
<br>
The TCP connection is kept alive and TCP Keep-Alive packets are sent<br>
when the TCP connection is idle.<br>
<br>
But I don&#39;t understand why the time between KA is not linear:<br>
<br>
first KA is sent 10 seconds after last last TCP message. This is logical<br>
and connected with the tcp_keepidle=10 configuration.<br>
<br>
then 2nd KA is sent 75 seconds after first KA<br>
<br>
Then my client sends some traffic and 23 seconds after last message, a<br>
new KA is sent. Another time it was 54 seconds. etc. etc.<br>
<br>
Could you explain me where do come from these values of 75 seconds, 23, 54 ?<br>
<br>
Everything works well: my client behind NAT is kept connected but I&#39;d<br>
like to understand why it does work :-)<br>
<br>
Thanks in advance,<br>
Pascal<br>
<br>
<br>
<br></div></div><div class="im">
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></blockquote>
</blockquote></div><br></div>