☼
⌃
☰

Transmission Control Protocol

Table of Contents

Transmission Control Protocol

Overview

TCP (Transmission Control Protocol) is a reliable, connection-oriented protocol used for data transmission over the internet. It ensures that data is delivered correctly and in the correct order, making it suitable for applications that require reliable communication, such as web browsing, email, and file transfers.

Key Features

  • Connection-oriented: TCP establishes a connection between two communicating parties before data is transmitted. This allows for reliable delivery and flow control.
  • Error checking: TCP uses checksums to detect errors in transmitted data and requests retransmission if necessary.
  • Flow control: TCP adjusts the rate of data transmission to prevent the receiver from being overwhelmed.
  • Sequence numbering: TCP assigns a sequence number to each data packet, ensuring that they are delivered in the correct order.
  • Acknowledgment: TCP requires acknowledgments from the receiver to confirm that data packets have been received successfully.
  • Congestion control: TCP implements Algorithms to avoid network congestion and ensure efficient use of network resources.

TCP Connection Establishment (Three Way Handshake )

  • SYN: The sender sends a SYN packet to initiate a connection.
  • SYN-ACK: The receiver responds with a SYN-ACK packet, acknowledging the SYN and requesting a connection.
  • ACK: The sender responds with an ACK packet, confirming the connection.

TCP Connection Termination

  • FIN: One party sends a FIN packet to terminate the connection.
  • ACK: The other party acknowledges the FIN and sends its own FIN packet.
  • ACK: The original sender acknowledges the FIN, terminating the connection.

TCP Applications

TCP is used in many applications, including:

  • Web browsing: Hypertext Transfer Protocol|HTTP uses TCP to transfer web pages and other data.
  • Email: Simple Mail Transfer Protocol|SMTP and IMAP use TCP for sending and receiving email.
  • File transfer: FTP and SFTP use TCP for transferring files.
  • Remote access: SSH and RDP use TCP for secure remote access.