lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE : [lwip-users] Questions about LwIP KEEPALIVE...


From: Frédéric BERNON
Subject: RE : [lwip-users] Questions about LwIP KEEPALIVE...
Date: Thu, 15 Feb 2007 18:29:51 +0100

Ok, I didn't think that was to be RFC compliant...

But don't you think these values would have to be settable in lwipopts.h ? 
Because, even with TCP_KEEPALIVE to 0, the minimum delay to detect a loss of 
stream connection is TCP_MAXIDLE (75000*9 = 675000ms =~ 11.25 min).


/* Keepalive values */
#define  TCP_KEEPINTVL     75000                         /* Time between 
KEEPALIVE probes in miliseconds */
#define  TCP_KEEPCNT       9                             /* Counter for 
KEEPALIVE probes */
#define  TCP_MAXIDLE       TCP_KEEPCNT * TCP_KEEPINTVL   /* Maximum KEEPALIVE 
probe time */


On a basic XP pc (yes, I know, this is not the "best" reference), registry 
values (in 
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters") seems 
to be TCP_KEEPCNT=5 ("TcpMaxDataRetransmissions"), TCP_KEEPINTVL=1000 
("KeepAliveInterval"), and TCP_KEEPDEFAULT=7200000 ("KeepAliveTime"). 
http://support.microsoft.com/kb/314053/en-us 
 
What do you think about this idea?
  
====================================
Frédéric BERNON 
HYMATOM SA 
Chef de projet informatique 
Microsoft Certified Professional 
Tél. : +33 (0)4-67-87-61-10 
Fax. : +33 (0)4-67-70-85-44 
Email : address@hidden 
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : address@hidden [mailto:address@hidden De la part de Kieran Mansley
Envoyé : jeudi 15 février 2007 16:35
À : Mailing list for lwIP users
Objet : Re: [lwip-users] Questions about LwIP KEEPALIVE...


On Thu, 2007-02-15 at 16:17 +0100, Frédéric BERNON wrote:

> So, if I dont do any mistake, if a router between my lwip devices 
> crashs, the connection will detect it in... 39375*200 ms = 7875 sec = 
> 131.25 min !?!?!
> 
> I suppose I do a mistake somewhere, or I don't understand (because 
> more than 2 hours - by default - to detect a connection failure seems 
> to be very very long)...

I think you've read it right.  To comply with the TCP RFCs a stack MUST default 
to a TCP keepalive timeout of no less that 2 hours.  See 
http://www.freesoft.org/CIE/RFC/1122/114.htm

If you were to send any data you'd find out sooner of course - TCP keepalive is 
really only of use for connections that are idle (or I suppose uni-directional).

The algorithm is quite conservative on the side of not closing connections 
until it's really sure they are dead.

Kieran



_______________________________________________
lwip-users mailing list
address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-users

Attachment: Frédéric BERNON.vcf
Description: Frédéric BERNON.vcf


reply via email to

[Prev in Thread] Current Thread [Next in Thread]