[e2e] tcp connection timeout

Bob Braden braden at ISI.EDU
Wed Mar 1 12:29:13 PST 2006


 
  *> 
  *> Hi,
  *> 
  *> I recently got a TCP connection timeout error.
  *> 
  *> If both side don't send packets for a long time while connection is open, is 
  *> there a default time out to abort the connection?
  *> 
  *> Thanks a lot!
  *> 
  *> - Kun 
  *> 

Sigh.  This is periodic question #13, which recurs about every 2.3
years.  Those who have been around the Internet more than 2.3 years can
stop reading now.

The inventors of TCP, and in particular Jon Postel, were religiously
opposed to a TCP idle timer ("keep alive").  The knowledge of when to
time out an idle connection belongs logically to the application layer;
TCP itself does not know.  But the OS guys (beginning with the Berkeley
Unix folks) disagreed on pragmatic grounds, so BSD TCP had a
keep-alive.

When the Host Requirements Working Group came to this issue, there was
nearly unanimous agreement with Postel, that TCP should not have a keep
alive.  The dissenter was the programmer responsible for the BSD code,
which probably powered the majority of hosts at the time!  So, the Host
Requirements group set requirements on Keep-Alives that were
designed to come as close to outlawing them as possible without
actually outlawing them.  Thus, keep-alives must be optional, they must
default to "off", the default timeout interval must be very large,
etc.

Bob Braden



More information about the end2end-interest mailing list