Re: Hardening the TCP/IP Stack Qt. - KeepAliveTime

From: Ray (res0cu5i@verizon@net)
Date: 03/20/03


From: "Ray" <res0cu5i@verizon@net>
Date: Thu, 20 Mar 2003 11:01:18 -0500


    This brings up a couple more questions. I've configured the Web server
as follows: ISM | WWW Service | Edit | Web site tab | Connection Timeout =
300 seconds| & Home Directory tab | Configuration | App Options Tab |
Session timeout = 5 minutes. I was under the impression these settings were
all different. For instance the TCP resources would be held (by default)
for 2 hours while the http connection resources (10 kb per connection) would
be for 5 minutes (15 by default but I reduced it). In addition, the App
Session State was something else too. Maybe if you had an example of an
application that did not close the connection after the transaction was
complete. I think what adds to my confusion is that http is stateless.
>From that, I assume that the http (layer 7) session will be closed while the
tcp (layer 4) will still allocate the resources until 2 hours has expired
(default setting) or when KeepAliveTime is enabled as long as the remote
host responds to a keep alive packet.
Thanks
Ray

"Keith W. McCammon" <km@km.com> wrote in message
news:#umAmav7CHA.2184@TK2MSFTNGP11.phx.gbl...
> > Does this mean that once a tcp session is established those resources
> remain
> > allocated for 2 hours (assuming there is not activity)?
>
> If the connection is not closed, then yes. However, most applications
close
> connections once a transaction is complete. Thus, something like a HTTP
> connection would not just sit there for two hours--once the transaction
> completes, the TCP connection is closed. In cases such as this, the
> connection only lingers during the time_wait and close_wait states (four
> minutes).
>
> > If I enable
> > KeepAliveTime and the recommended value of 5 minutes how exactly does it
> > work? Is a keep alive packet sent every 5 minutes (assuming no
activity)?
>
> The application requesting the keep-alive would send the remote host a
> segment with a sequence number of [Current Seq. Number]-1. The remote
host
> would then respond with the current sequence number.
>
> > Does it mean as long as computer is on the network and answers a keep
> alive
> > packet that those resource will remain allocated?
>
> Generally speaking, yes. However, keep-alives can be handled by
> applications any way that you want.
>
> > Is there additional
> > information available on this subject?
>
> RFC 1122 discusses the underlying principles. I don't know off-hand of
any
> additional resources. You may be able to find the windows sockets
> (setsockopt) info. on MSDN, but I'm not sure of the URL.
>
> --
> Keith W. McCammon
>
>
>



Relevant Pages

  • [NEWS] Vulnerability in the TCP Protocol Allows RST Spoofing (Cisco Advisory)
    ... A vulnerability in the Transmission Control Protocol (TCP) specification ... the connection may get automatically ... Here is an example of a normal termination of a TCP session: ... Access control lists should also be deployed as close to the edge ...
    (Securiteam)
  • Re: Hardening the TCP/IP Stack Qt. - KeepAliveTime
    ... TCP resources are not held for two hours. ... connection, makes the request, receives the reply, and then closes the TCP ... HTTP 1.1, on the other hand, uses HTTP keep-alives by default. ... App session state controls application-side sessions created using ASP, PHP, ...
    (microsoft.public.win2000.security)
  • Re: headers sent issue
    ... What is a waste of resources? ... if form is submitted and answer is yes, destroy session and redirect ... The largest single wait is for an Oracle connection to be established. ...
    (comp.lang.php)
  • Re: Hardening the TCP/IP Stack Qt. - KeepAliveTime
    ... the session is never fully ... > TCP resources are not held for two hours. ... > connection, makes the request, receives the reply, and then closes the TCP ... HTTP 1.1, on the other hand, uses HTTP keep-alives by ...
    (microsoft.public.win2000.security)
  • Re: headers sent issue
    ... huge waste of resources, cpu & memory. ... You are using memory for buffering that hypothetically could be needed ... will keep the use of memory & CPU to a minimum. ... start session ...
    (comp.lang.php)