Apr 272008
 

TCP

Create a connection

It uses a three-way handshake

  1. The
    client [a machine/device requesting a service/connection] sends a SYN flag
    & the server port number of the service it wants to communicate (i.e.
    Port 80 for http/web services)
    The packet also includes the client’s Initial Sequence Number (ISN)
  2. Server
    – Resplies with it’s own SYN flag & ISN to the client’s TCP port
    An ACK flag is included in the packet in reply to the client’s SYN flag
  3. Client
    replies with an ACK flag that acknowledges the server’s SYN Flag


Terminate a
connection

After all data is sent or session no longer needs the
session is terminated. This can be done either by client or server. Here is an
example of what is called an active
close

  1. The
    application (i.e. Web browser –Firefore) on the client sends a close command to the application
    (i.e. Web Server – Apache) on the
    server
  2. Server
    sends a FIN flag to client
  3. Client
    sends an ACK flag to acknowledge the FIN flag
  4. Client
    sends a FIN flag to server
  5. Server
    replies with ACK flag –acknowledging the termination of the TCP connection

Flags used in TCP
Connections?

SYN Synchronized sequence number
FIN Sender FINished sending data –end connection
RST Reset Connection
PSH Push the data
ACK Acknowledgment
URG Urgent


Warning: fopen(/home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/lib/standard.txt) [function.fopen]: failed to open stream: No such file or directory in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 104

Warning: fread(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 105

Warning: fclose(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 106
.