Transmission Control Protocol (TCP)

TCP is a commonly used Protocol# in #Internet Protocol Suite (TCP/IP). It is a #Transport Layer protocol according to the classification of #Open Systems Interconnection (OSI) Model.

TCP is designed to be connection-oriented and reliable, in contrast to User Datagram Protocol (UDP). This means that connection must be established first (using three-way handshake) via a full-duplex channel and maintained by the protocol during a transmission. The requester will first send out a control bit SYN (stand for synchronisation) and its Initial Sequence Number (ISN) to the server. The server sends back a packet to the requester that contains the control bit ACK (stand for acknowledgement) and its ISN. From now on, the requester will assume the connection is well established, and it will send packets to the server with incremented SYN and ACK (same to the server). This way, TCP can guarantee the eventual orderly delivery of the packets.

It breaks messages into segments (its Protocol Data Units (PDU)#) and reassemble at the destination. If there is a failure on sending such messages, TCP will resend it. It also provides virtual circuits between application. At the end, the connection will be torn down if there is no need for it.

To improve the performance, the overhead of the connection tunnel must be addressed. This could be done by windowing, a method where the device sends ACK only when it has received enough packets. The consensus about the size of window can be reached after the server send back an ACK packet with the information of the window size that it can achieve (usually after a packet has failed to be sent to the server). Furthermore, it has an additional benefit of handling the edge case where the sender could send too much, too fast which could overflow the receiver’s buffer.

Examples of TCP:

Links to this page
#networking #)