Transmission Control Protocol (TCP) along with the Internet Protocol (IP) works together as a team. While TCP determines how a network conversation will be established and maintained, IP determines how the computers connected to each other will exchange packets of data. In this network conversation established through TCP, application programs exchange data.
TCP/IP Suite Model – an application layer is from where an application requests a connection with the server. Information is transferred from the application layer to the transfer layer. There are two protocols for this transfer in the transport layer :
- TCP (Transmission Control Protocol)– TCP provides reliability for the established connection and prevents data from being sent to the out of order upper layer application. Sometimes it may help to reduce the congestion in the network.
- UDP (User Datagram Protocol) – UDP is a connectionless protocol meant only for sending data packages after that work is done the connection is terminated altogether. It also does not need the acknowledgments to work. Routing protocol updates and server availability, multicast applications and streaming applications for videos and audios are one of the uses of this lightweight protocol.
TCP is a connection-based protocol and for two devices to communicate and exchange data, a network connection needs to be established which connects them and allows them to share information and data within themselves. To provide reliable connections, TCP needs Positive Acknowledgement with Retransmission (PAR).
Three steps
Transmission Control Protocol and Synchronized sequence number – a client who wants a connection send the Protocol Data Unit (PDU) or as it is simply called, segment and along with this segment, Synchronize Sequence Number (SYN). Together they’re called TCP SYN Packet. This packet provides the information to the server that a connection has been requested and with the sent sequence number, the segment starts.
Synchronize sequence Number and ACK – SYN number is the number with which usually the segment begins. After the server has received the request, it acknowledges it and responds with SYN-ACK (abbreviation. ACK = Acknowledgement). ACK carries the response to the request and along with it, the SYN number which will initiate the segment.
Acknowledgments and the establishment of the connection – In the third and last step both the client and the server acknowledge the responses of each other and the connection is established to exchange the data.
A similar kind of procedure is needed to close the connection as well, consisting of all the previous protocols and acknowledgments.
Download three-way handshake Process in pdf – Click here