Subject: RE: Connection Establishment

From: "Naidu, Venkata" <[email-masked]>
Date: Wed, 6 Feb 2002 10:23:16 -0500

Sebastian:

->     May the server send the data already with the final ACK of the 
-> connection establishment (piggyback), or must it send two 
-> packets (ACK 
-> and data), or must it wait for the clients ACK of the ACK 
-> (and then send 
-> data)?

  As per TCP standard (not w.r.t. any API implementations, 
  like sockets)

  Machine A initiates a connection to machine B.
  A sends a segment with ISN x, chosen according
  A's clock, and with SYN bit set to 1, this is the
  connection request message.
	- the ACK flag is set to 0
	- this segment is still a regular TCP segment; it
	  can carry data too (piggyback 1)
      - however, if it does contain data, machine B
        cannot deliver the data to application until the
        connection is successfully established

  B returns a segment whose Ack=x+1, Seq=y,theISN
  of B chosen according to B's clock, and SYN=1.
	- this is the connection acceptance message.
	- if the first segment from A contains b bytes of
	  data, then Ack=x+b+1.
	- this segment itself can contain data too. (piggyback 2)
	  After receiving the acceptance, A considers the
	  connection established.

  A then sends B a segment with Ack=y+1 and SYN=0.
	- this is the connection confirmation message
      - This ack is mostly sent by TCP with out user
        interaction. But TCP can still piggyback data
        in this segment. (piggyback 3)
	- all segments from this point on will have SYN=0
	  After receiving the confirmation, B considers the
	  connection established.

  But most of the APIs don't have any provision for this.

Venkata Naidu

This e-mail and any attachments are confidential. If you are not the
intended recipient, please notify us immediately by reply e-mail and then
delete this message from your system. Do not copy this e-mail or any
attachment, use the contents for any purposes, or disclose the contents to
any other person: to do so could be a breach of confidence.

---

From: Sebastian Zimmermann <[email-masked]>
Date: Fri, 08 Feb 2002 16:05:19 +0100

Thank you for all your answers. It looks like I didn't think far enough :-)

Sebastian

-- 

+----------------------------------------+
| Technische Universität Hamburg-Harburg |
|        Kommunikationsnetze (4-06)      |
|            Denickestraße 17            |
|             21071 Hamburg              |
|----------------------------------------|
|   Fernsprecher:  +49 40 42878-3387     |
|      Fernkopie:  +49 40 42878-2941     |
|    Elektropost:  [email-masked]  |
|      http://www.tu-harburg.de/et6      |
+----------------------------------------+