sam sneed wrote: > > Lets say we have host A 22.12.12.12 and host B 99.99.99.99. > Host B is a > server listening on port 3055. Host A connects to the server B > and sends > data. Now neither host A or B send anything to each other for > 1 hour. Is > the connection still there? Is there a timeout for the > connection? I do not > see anything in the RFC's about keepalives for TCP connections,
The TCP RFC doesn't include keepalives, as you say. But some implementations use them. It's actually a controversial issue. Some protocol experts consider it a bad feature. It can cause an otherwise good connection to be terminated due to a temporary problem. The host requirements RFC, RFC 1112, says that implementations may implement a TCP keepalive but it must default to off. There's an entire discussion of it in section 4.2.3.6 of that RFC. Keepalive packets are sent when no data or acknowledgement packets have been received for the connection within an interval. This interval must be configurable and must default to no less than two hours. BSD UNIX has a tcp_keepidle variable which is the number of 500-ms clock ticks before sending a keepalive probe. I'm not sure about recent versions, but the default value used to be 14,400 (2 hours). Changing this would affect all TCP sessions that are using the keepalive function. I think I've seen a lot of implementations that have the keepalive set to much shorter than 2 hours, even though the RFC says it shouldn't be shorter. I know I've seen implementations repeatedly resend the previous sequence number with no data, which is what a keepalive looks like, before two hours have elapsed. An application can do its own application-layer probing of the connection, of course, and that's less controversial. For example, BGP sends its own keepalive every 60 seconds. An application can also make sure that connections don't stay open unnecessarily by cleanly closing the connection with FINs or by sending a RESET. A lot of HTTP servers send resets, for example. So that's some info. Not all the pieces of the puzzle. I hope someone else will know more about other specific operating systems and application timers. Good question! Thanks. ________________________ Priscilla Oppenheimer http://www.priscilla.com > so how would > Host B know the difference between host A not sneding data for > a long time > or host A crashes? > If I unplug the power on host A while the TCP connection is up > and leave it > unplugged for a week and will the server still have the the > connection in > its tables when I do a netstat -an? I doubt it, so I figure the > server must > have its own timeout on idle connections? > > Anyone known any real values for these timeouts for various > OS's? > > Thanks. > > Message Posted at: http://www.groupstudy.com/form/read.php?f=7&i=48940&t=48934 -------------------------------------------------- FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]