"kamailio" users@lists.kamailio.org,
Hi
I am sorry to ask again about this topic but I don't understand yet how the TCP keep-alive are sent.
With Kamailio 3.0.1 and the following configuration:
tcp_keepalive=yes tcp_keepidle=10 tcp_connection_lifetime=3600
The TCP connection is kept alive and TCP Keep-Alive packets are sent when the TCP connection is idle.
But I don't understand why the time between KA is not linear:
first KA is sent 10 seconds after last last TCP message. This is logical and connected with the tcp_keepidle=10 configuration.
then 2nd KA is sent 75 seconds after first KA
Then my client sends some traffic and 23 seconds after last message, a new KA is sent. Another time it was 54 seconds. etc. etc.
Could you explain me where do come from these values of 75 seconds, 23, 54 ?
Everything works well: my client behind NAT is kept connected but I'd like to understand why it does work :-)
Thanks in advance, Pascal
On Friday 07 May 2010, Pascal Maugeri wrote:
tcp_keepalive=yes tcp_keepidle=10 tcp_connection_lifetime=3600
The TCP connection is kept alive and TCP Keep-Alive packets are sent when the TCP connection is idle.
But I don't understand why the time between KA is not linear: [..] Could you explain me where do come from these values of 75 seconds, 23, 54 ?
Everything works well: my client behind NAT is kept connected but I'd like to understand why it does work :-)
Hi Pascal,
sounds indeed interesting. :-) Perhaps a problem with the internal timers.. Do noticed also other timer related problems, like for internal INVITE 408 replies or similar?
Cheers,
Henning
Thanks for your Henning, at least I will sleep better knowing I am not completly idiot :-))
I haven't noticed related to INVITE timers (such as the 408) because I only make my client behind NAT to register and re-register and verify it is always reachable in time thanks to this TCP keep-alive. Tomorrow I will try to make a couple a calls to see if I get this 408 you mentionned.
Is there a way (either with a parameter or changing source code) a to control the frequency of TCP k.a. ?
Cheers Pascal
2010/5/7 Henning Westerholt henning.westerholt@1und1.de
On Friday 07 May 2010, Pascal Maugeri wrote:
tcp_keepalive=yes tcp_keepidle=10 tcp_connection_lifetime=3600
The TCP connection is kept alive and TCP Keep-Alive packets are sent when the TCP connection is idle.
But I don't understand why the time between KA is not linear: [..] Could you explain me where do come from these values of 75 seconds, 23,
54
?
Everything works well: my client behind NAT is kept connected but I'd
like
to understand why it does work :-)
Hi Pascal,
sounds indeed interesting. :-) Perhaps a problem with the internal timers.. Do noticed also other timer related problems, like for internal INVITE 408 replies or similar?
Cheers,
Henning
Hello,
On 5/9/10 12:42 PM, Pascal Maugeri wrote:
Thanks for your Henning, at least I will sleep better knowing I am not completly idiot :-))
I haven't noticed related to INVITE timers (such as the 408) because I only make my client behind NAT to register and re-register and verify it is always reachable in time thanks to this TCP keep-alive. Tomorrow I will try to make a couple a calls to see if I get this 408 you mentionned.
Is there a way (either with a parameter or changing source code) a to control the frequency of TCP k.a. ?
Starting with 3.0, most of tcp parameters are changeable at runtime via RPC (you can use sercmd): http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x#transport_la...
The initial value can be set via global parameters: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.0.x#tcp_parameters
Cheers, Daniel
Cheers Pascal
2010/5/7 Henning Westerholt <henning.westerholt@1und1.de mailto:henning.westerholt@1und1.de>
On Friday 07 May 2010, Pascal Maugeri wrote: > tcp_keepalive=yes > tcp_keepidle=10 > tcp_connection_lifetime=3600 > > > The TCP connection is kept alive and TCP Keep-Alive packets are sent when > the TCP connection is idle. > > But I don't understand why the time between KA is not linear: > [..] > Could you explain me where do come from these values of 75 seconds, 23, 54 > ? > > Everything works well: my client behind NAT is kept connected but I'd like > to understand why it does work :-) Hi Pascal, sounds indeed interesting. :-) Perhaps a problem with the internal timers.. Do noticed also other timer related problems, like for internal INVITE 408 replies or similar? Cheers, Henning
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Pascal!
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.
Thus, if you want to tweak the TCP keep alive, then you have to tweak the kernel.
regards Klaus
Am 07.05.2010 16:20, schrieb Pascal Maugeri:
"kamailio" <users@lists.kamailio.org mailto:users@lists.kamailio.org>,
Hi
I am sorry to ask again about this topic but I don't understand yet how the TCP keep-alive are sent.
With Kamailio 3.0.1 and the following configuration:
tcp_keepalive=yes tcp_keepidle=10 tcp_connection_lifetime=3600
The TCP connection is kept alive and TCP Keep-Alive packets are sent when the TCP connection is idle.
But I don't understand why the time between KA is not linear:
first KA is sent 10 seconds after last last TCP message. This is logical and connected with the tcp_keepidle=10 configuration.
then 2nd KA is sent 75 seconds after first KA
Then my client sends some traffic and 23 seconds after last message, a new KA is sent. Another time it was 54 seconds. etc. etc.
Could you explain me where do come from these values of 75 seconds, 23, 54 ?
Everything works well: my client behind NAT is kept connected but I'd like to understand why it does work :-)
Thanks in advance, Pascal
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi
I just checked these parameters in runtime (using sysctl -a | grep "tcp_keepalive") and I get:
net.ipv4.tcp_keepalive_time = 7200 net.ipv4.tcp_keepalive_probes = 9 net.ipv4.tcp_keepalive_intvl = 75
I recognize the "75" value used in the delay between my k.a. ! It gets clearer :-)
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 ?
Cheers Pascal
On Mon, May 10, 2010 at 2:33 PM, Klaus Darilion < klaus.mailinglists@pernau.at> wrote:
Hi Pascal!
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.
Thus, if you want to tweak the TCP keep alive, then you have to tweak the kernel.
regards Klaus
Am 07.05.2010 16:20, schrieb Pascal Maugeri:
"kamailio" <users@lists.kamailio.org mailto:users@lists.kamailio.org>,
Hi
I am sorry to ask again about this topic but I don't understand yet how the TCP keep-alive are sent.
With Kamailio 3.0.1 and the following configuration:
tcp_keepalive=yes tcp_keepidle=10 tcp_connection_lifetime=3600
The TCP connection is kept alive and TCP Keep-Alive packets are sent when the TCP connection is idle.
But I don't understand why the time between KA is not linear:
first KA is sent 10 seconds after last last TCP message. This is logical and connected with the tcp_keepidle=10 configuration.
then 2nd KA is sent 75 seconds after first KA
Then my client sends some traffic and 23 seconds after last message, a new KA is sent. Another time it was 54 seconds. etc. etc.
Could you explain me where do come from these values of 75 seconds, 23, 54 ?
Everything works well: my client behind NAT is kept connected but I'd like to understand why it does work :-)
Thanks in advance, Pascal
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Am 11.05.2010 10:04, schrieb Pascal Maugeri:
Hi
I just checked these parameters in runtime (using sysctl -a | grep "tcp_keepalive") and I get:
net.ipv4.tcp_keepalive_time = 7200 net.ipv4.tcp_keepalive_probes = 9 net.ipv4.tcp_keepalive_intvl = 75
I recognize the "75" value used in the delay between my k.a. ! It gets clearer :-)
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 ?
Probably the fastest way is to grep the source code for tcp_keepalive_intvl and similar (tcp_keepidle ...)
regards klaus
Cheers Pascal
On Mon, May 10, 2010 at 2:33 PM, Klaus Darilion <klaus.mailinglists@pernau.at mailto:klaus.mailinglists@pernau.at> wrote:
Hi Pascal! 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. Thus, if you want to tweak the TCP keep alive, then you have to tweak the kernel. regards Klaus Am 07.05.2010 16:20, schrieb Pascal Maugeri: "kamailio" <users@lists.kamailio.org <mailto:users@lists.kamailio.org> <mailto:users@lists.kamailio.org <mailto:users@lists.kamailio.org>>>, Hi I am sorry to ask again about this topic but I don't understand yet how the TCP keep-alive are sent. With Kamailio 3.0.1 and the following configuration: tcp_keepalive=yes tcp_keepidle=10 tcp_connection_lifetime=3600 The TCP connection is kept alive and TCP Keep-Alive packets are sent when the TCP connection is idle. But I don't understand why the time between KA is not linear: first KA is sent 10 seconds after last last TCP message. This is logical and connected with the tcp_keepidle=10 configuration. then 2nd KA is sent 75 seconds after first KA Then my client sends some traffic and 23 seconds after last message, a new KA is sent. Another time it was 54 seconds. etc. etc. Could you explain me where do come from these values of 75 seconds, 23, 54 ? Everything works well: my client behind NAT is kept connected but I'd like to understand why it does work :-) Thanks in advance, Pascal _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users