[comp.protocols.tcp-ip] terminating connections

sandy@TOVE.UMD.EDU (Sandy Murphy) (02/01/89)

A few months ago I posted a message to this list asking for comments of the
difference between the ISO TP and TCP connection establishment services --
specifically, the reason for / necessity for TCP's symmetric system.
Encouraged by the number of kind people who had very interesting answers,
I would like to pose a similar question (you knew there was a reason to
ignore such requests!):

TCP and ISO TP differ in how they handle connection termination.  TCP
performs a graceful close, ensuring that data in transit is received 
before the connection is closed.  ISO moves this up to the session layer
with the two session entities doing their own exchange of I'm-done-transmitting
messages.  Since TCP accomplishes the graceful close by FIN messages
that are given sequence numbers one greater than the last data sent,
it looks to me like TCP is doing something similar.  That is, it is 
as if TCP were inserting its own I'm-done-transmitting message in the
data stream.  Because the session layer can count on the transport layer
to deliver data in sequence, it need only check the data for the
I'm-done message.  But TCP must devote considerable processing to
ensure that the FIN is acted upon at the appropriate time, etc.

Does anyone have any comments on whether this belongs in the transport
or session layers, further effects of doing it TCP's (ISO's) way,
agreements/disagreements with my interpretation, etc.

--Sandy Murphy

mckenzie@bbn.com (Alex McKenzie) (02/02/89)

TCP and ISO TP handle the closing of a connection differently because of
different assumptions about the environment in which they will be
embedded.

TCP assumes that it (alone) is responsible for the reliability of the
data transport; a user application which doesn't want to be concerned
with transport reliability may be built directly on top of it.  This
might even be an application which has only a one-way data flow.  The
application can just hand a lot of data to the TCP module and the give
the module a command like "when you are done sending the data, close the
connection".  So TCP better be sure that all the data has been correctly
received by the receiver befor the connection is closed and the TCP
resources are deallocated.

ISO TP assumes that it is in the middle of a protocol stack.  It is
responsible for ensuring reliable transmission (let's not argue about
this phrase - I know it is not literally correct) but that higher layers
of protocol will be doing their own handshaking to be sure their
resources are not prematurely deallocated.  In particular, since the
Transport layer "knows" that the Session layer will perform a handshake
which must be completed before either Session entity asks the Transport
layer to close the connection, no value is added by having the Transport
entities also shake hands; the pipe is truely empty when the "Close
Transport" command comes down from Session.

Hope this helps,
Alex McKenzie

aprm@HAWAII-EMH.ARPA (02/15/89)

In this discussion TCP is being compared to ISO TP.  The
network we run at Ft. Shafter, OpenNET by Intel, uses TP4 in the
transport layer.  Is TP the same as TP4?

Gary Dunn
WESTCOM DCSRM IMO
Ft. Shafter, HI