Sequence of TCP Connection

--

TCP stands for Transmission Control Protocol which indicates that it controls the transmission of the data in a reliable way.

The process of communication between devices over the internet happens according to the current TCP/IP suite model (stripped out version of the OSI reference model). The Application layer is a top pile of a stack of TCP/IP model from where network referenced application like web browser on the client-side establish a connection with the server and information is transferred to the transport layer. The two important protocols of this layer are — TCP, UDP (User Datagram Protocol) out of which TCP is dominant (since it provides reliability for the connection established).

TCP provides reliable communication with something called Positive Acknowledgement with Re-transmission (PAR). The Protocol Data Unit (PDU) of the transport layer is called a segment. Now a device using PAR resend the data unit until it receives an acknowledgement. If the data unit received at the receiver’s end is damaged (It checks the data with checksum functionality of the transport layer that is used for Error Detection), the receiver discards the segment. So the sender has to resend the data unit for which positive acknowledgement is not received. You can realize from the above mechanism that three segments are exchanged between sender (client) and receiver (server) for a reliable TCP connection to get established

  • Step 1 (SYN): In the first step, the client wants to establish a connection with the server, so it sends a segment with SYN(Synchronize Sequence Number) which informs the server that client is likely to start communication and with what sequence number it starts segments with
  • Step 2 (SYN + ACK): Server responds to the client request with SYN-ACK signal bits set. Acknowledgement(ACK) signifies the response of segment it received and SYN signifies with what sequence number it is likely to start the segments with
  • Step 3 (ACK): In the final part client acknowledges the response of server and they both establish a reliable connection with which they will start the actual data transfer

The steps 1, 2 establish the connection parameter (sequence number) for one direction and it is acknowledged. The steps 2, 3 establish the connection parameter (sequence number) for the other direction and it is acknowledged. With these, a full-duplex communication is established.

--

--

Adroit Information Technology Academy

AITA provides professional and expert level training on Amazon AWS, Microsoft Azure, Google Cloud, Cisco CCNA, CCNP and CCIE, Check Point, Palo Alto etc.