The Wayback Machine - https://web.archive.org/web/20240628112650/https://www.geeksforgeeks.org/why-is-tcp-called-a-connection-oriented-protocol/
Open In App

Why is TCP Called a Connection Oriented Protocol?

Last Updated : 11 Sep, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

TCP is a standard connection-oriented protocol that works under the following conditions before any transmission takes place between both devices:

Establish a logical connection with the device on receiver’s end

The Transmission Control Protocol (TCP) is a protocol of the transport layer, which is the “Heart of OSI“. And it’s a connection-oriented protocol, and two primary reasons for that are:

  1. The sender and the receiver stay connected until the transmission process is fully completed and also ensures that the data reaches its destination. If any data is lost, then the receiver asks the sender to re-transmit it.
  2. The order of the data sent by the sender is the same on the receiver’s end as well.

The path from which the packet transmission will take place will be decided prior to the transmission process, and it basically uses a method called – “The 3-way Hand-shake Method”.

What is the Hand-Shake Method?

The basic idea of the hand-shake method is based on the general rule that before starting the transmission of data, some series of steps are taken in a logical order by the sender and the receiver in order to ensure delivery of the data. Below are those operations described in brief :

  • SYN (Synchronize) : The SYN is a simple flag to indicate that some node (sender) will start communication with it soon. And is sent to the receiver by the sender.
  • Response of the receiver in SYN-ACK format: ACK is for acknowledging to the sender about the SYN flag received and the other flag SYN is for indicating the sequence number from which transmission is to be started.
  • Finally, the sender again sends an ACK to the receiver, acknowledging the response and hence establishing a reliable connection.

Only after the above steps are performed, the actual data transmission will start.

For more details, refer to the article: TCP-3 way handshake.

Basic Terminologies

  • SYN: A simple flag, used to indicate initiation of a transmission.
  • ACK: Its also a simple flag used for acknowledgement purposes and reliable delivery
  • Reliability: TCP assigns a sequence number to every data segment sent to the sender to keep track of the data being transmitted. If the packet is lost, or some error is detected at the receiver end then the receiver will send the ACK asking for retransmission of the data.
  • Ordered Delivery: Every data segment received by the receiver will be in the order of being sent by the sender . Ex: If the data sent by the sender is : 1234, then the receiver will also receive the data in the form – 4321. Some possible out of order sequence is 2134, 3214, 1324 etc. But, TCP ensures the order of the data received on the sender’s end.
  • Error Detection and correction: Error detection is one way to ensure that the data received at the receiver’s end is exactly what was sent by the sender.

TCP Data Transfer

Here’s how the data transmission using TCP as a connection oriented protocol takes place.

As an step1 we have to first establish a connection with the system so that we can transmit the data.

Establishment of connection

Connection Establishment using 3-way handshake

In step2 the transmission takes place with proper reordering the packets or segments at the receivers end.

Data transmission

Data Transmision

Notice in the above image of step-2, data sent was in the following sequence : 1,2,3 then the data received at the receiver’s end is also in the same sequence 1,2,3.

Frequently Asked Questions

1. How does TCP ensure reliable data delivery ?

TCP does so by making use of various flags to indicate whether the data transmitted is received by the sender or not. And further more, it also ensures the ordered delivery by assigning a sequence number to every data segment so that they can be re-ordered at the receiver’s end on the basis of this sequence number.

2. In what scenarios, TCP can be useful?

TCP can be useful in various scenarios depending on your use case like – if you need data to be delivered and there’s no specific time frame to do so then TCP can be useful. Real world application where TCP is used : E-mails, File transfer (One to One) and while browsing.

3. What tradeoffs might arise when one prefer’s connection-oriented protocol over connection-less ?

The tradeoffs would be – the delay in transmitting the data to the destination as the connection establishment process is itself a very heavy process that could generate a slight overhead and doesn’t proves to be useful in scenarios where faster transmission is required like gaming and live video streaming.



Similar Reads

Difference between Connection-oriented and Connection-less Services
Both Connection-oriented service and Connection-less service are used for the connection establishment between two or more two devices. These types of services are offered by the network layer. Connection-oriented service is related to the telephone system. It includes connection establishment and connection termination. In a connection-oriented se
2 min read
Why is the IP address called a "logical" address, and the MAC address is called a "physical" address?
Let us try to deeply understand, why IP address is known as "Logical" while, MAC Address is known as "Physical" address. The IP address and the MAC address are both used for addressing and identifying devices on a computer network, but they serve different purposes and operate at different levels of the network stack. An IP address is a logical add
7 min read
TCP with explicit link failure notification (TCP-ELFN)
TCP with Explicit Link Failure Notification (TCP-ELFN) is an end to end approach used in TCP Ad Hoc wireless networks to improve the performance by decoupling the path break information from congestion information. TCP-ELFN does not depend upon any routing protocols as it requires explicitly only the link failure notification when there is a path f
2 min read
TCP Tahoe and TCP Reno
TCP is known as a connection-oriented protocol, which ensures reliability and is also responsible for congestion control mechanisms in the network. TCP Tahoe and TCP Reno are two techniques of TCP congestion control, these are used when the sender receives three duplicate acknowledgments. TCP Tahoe where Tahoe is a lake in the USA. This particular
4 min read
TCP Fast Open and TCP/IP Acceleration
The TCP Fast Open (TFO) and TCP/IP Acceleration are techniques used to improve the performance and efficiency of TCP connections in computer networks. These techniques aim to reduce the latency and improve the throughput of the TCP connections, especially for short-lived connections and web browsing scenarios. TCP Fast Open (TFO): The TCP Fast Open
3 min read
TCP Connection Establishment
Prerequisite – TCP 3-Way Handshake Process TCP is a connection-oriented protocol and every connection-oriented protocol needs to establish a connection in order to reserve resources at both the communicating ends. Connection Establishment - 1. Sender starts the process with the following: Sequence number (Seq=521): contains the random initial seque
3 min read
TCP Connection Termination
In TCP 3-way Handshake Process we studied that how connections are established between client and server in Transmission Control Protocol (TCP) using SYN bit segments. In this article, we will study how TCP close connection between Client and Server. Here we will also need to send bit segments to a server which FIN bit is set to 1. TCP supports two
5 min read
Connection-Oriented Service
Connection-Oriented Service is basically a technique that is typically used to transport and send data at session layer. The data streams or packets are transferred or delivered to receiver in a similar order in which they have seen transferred by sender. It is actually a data transfer method among two devices or computers in a different network, t
3 min read
Construct a simple HTTP request on TCP protocol
HTTP Request : HTTP messages are how data is exchanged between a server and a client. In this, there are two types of messages where one is HTTP client request and the second is the response from the server.Messages in textual form and it is encoded in ASCII form, and span over multiple lines. And messages were openly sent across the connection in
3 min read
When Transmission Control Protocol (TCP) most appropriate?
TCP(Transmission Control Protocol) is a protocol of the Transport layer. TCP is a connection-oriented, reliable, and secured protocol. To provide reliable service TCP implements Error control, Congestion control, Flow control. Services provide by TCP : The process to process communication -It is achieved using the port number.Stream Delivery Servic
2 min read
Article Tags :