Home » Computer Network » What is TCP? Connection termination in TCP is symmetric, whereas connection establishment is not. Why?

What is TCP? Connection termination in TCP is symmetric, whereas connection establishment is not. Why?

Last updated:

Support this post with a reaction:

3,082 views

What is TCP?

TCP (Transmission Control Protocol) is one of the most important protocols used in computer networks for reliable communication. It ensures that data is delivered correctly, in order, and without errors between sender and receiver.
It is widely used in applications like web browsing, email services, file transfer, and online communication systems. TCP builds a stable connection before sending data.
Because of its reliability, TCP is considered a connection-oriented protocol. It manages proper delivery of data using acknowledgment and retransmission techniques.

In modern networking, TCP plays a major role in ensuring smooth and secure data exchange over the internet. It works closely with IP to form the TCP/IP model used globally.
Every time you open a website or send a message, TCP helps in establishing and managing that connection. It guarantees that data reaches the correct destination.
Understanding TCP is important because it explains how communication is made reliable in computer networks.

Features of TCP

  1. Connection-Oriented: TCP establishes a connection between the sender and receiver before transferring data.
  2. Reliable Data Transmission: It ensures that data reaches the destination correctly using acknowledgements and retransmission.
  3. Error Detection: TCP uses a checksum to detect errors in transmitted segments.
  4. Flow Control: It controls the amount of data sent to prevent the receiver from being overloaded.
  5. Congestion Control: It adjusts the transmission rate to reduce network congestion.
  6. Ordered Delivery: TCP delivers data to the receiving application in the correct sequence.
  7. Full-Duplex Communication: Both sender and receiver can transmit and receive data simultaneously.

Why is Connection Termination in TCP Symmetric but Connection Establishment is Not?

Connection establishment is asymmetric because one endpoint performs an active open and sends SYN; the passive opener can combine its own SYN with the ACK as SYN-ACK, so setup normally takes three segments. Termination is symmetric because TCP is full duplex: each endpoint independently closes its sending direction with FIN, and each FIN is acknowledged, normally producing FIN, ACK, FIN, ACK (though ACK and FIN may sometimes be combined).

Connection Establishment (Not Symmetric)

Figure: 3 – Way Handshake

1. Client Starts the Process

In the usual client-server case, the client is the active opener; more generally, either endpoint can perform the active open. The client sends a SYN (synchronization) request to the server. This means both sides do not start the connection at the same time, so the process is not equal or symmetric.

2. Three-Way Handshake

TCP uses a special process called the three-way handshake to establish a connection safely:

  • First, the client sends a SYN message.
  • Then, the server replies with a SYN-ACK message.
  • Finally, the client sends an ACK message back.

This ensures both devices are ready before data transfer begins. The server only responds; it does not start the process.

3. Different Roles (Asymmetry in Roles)

In this process, the client and server have different roles:

  • The client is the active initiator (starts communication).
  • The server is the passive responder (waits and replies).

Because their roles are not equal, the process is called asymmetric.

4. Controlled Direction of Communication

During connection setup, the flow of control moves mainly from the client to the server. The server only reacts to requests, rather than initiating them. This controlled direction helps maintain order and reliability in communication.

5. Purpose of Asymmetric Setup

This design ensures:

  • Smooth and error-free data transfer later
  • Proper synchronization between devices
  • Reliable connection establishment
  • Avoidance of confusion or duplicate connections

Connection Termination (Symmetric)

TCP connection termination is called symmetric because both the client and server take equal responsibility to close the connection. Unlike connection establishment, here both sides actively participate in shutting down communication in a structured way.

Figure: 4-Way Handshake

1. Both Sides Can Initiate Close

In TCP, either side (client or server) can start the termination process by sending a FIN (finish) message. This means there is no fixed rule that only one side must begin closing. For example, a web server can close the connection after sending data, or a client can close it after receiving the response.

2. Four-Way Process (4-Way Handshake)

TCP uses a four-step process to ensure safe and complete closure:

  • First, one side sends a FIN (request to close).
  • The other side responds with an ACK (acknowledgement).
  • Then the second side sends its own FIN when it is ready to close.
  • Finally, the first side sends the last ACK.

This ensures both directions are closed properly without data loss.

3. Equal Responsibility (Symmetric Nature)

In termination, both devices have equal responsibility:

  • Each side must independently close its sending path.
  • One side closing does not automatically close the other side.

This is why the process is called symmetric, because both participate equally in ending the connection.

4. Full-Duplex Closure

TCP supports full-duplex communication, meaning data can flow in both directions at the same time. Because of this:

  • One direction (A → B) is closed separately
  • Then the other direction (B → A) is closed separately

This independent closing ensures that no data is lost and both sides finish sending all remaining information before shutting down.

5. Why TCP Uses This Method

This structured termination helps in:

  • Giving both sides time to finish communication
  • Preventing sudden disconnection
  • Ensuring all data is delivered properly
  • Avoiding data loss during shutdown

Types of TCP Connection Release

TCP provides two methods to close a connection: Abrupt Connection Release and Graceful Connection Release. These methods define how communication between two devices ends after data transfer is completed.

1. Abrupt Connection Release

In an abrupt connection release, the TCP connection is closed suddenly without waiting for all remaining data to be transferred properly. This happens when one side forcefully terminates the connection or when an unexpected problem occurs in the network or system.

In this method:

  • One TCP entity immediately closes the connection.
  • Both directions of communication are stopped at once.
  • Any remaining or unsent data may be lost.
  • The connection ends quickly without following the normal termination process.

Abrupt release is usually performed using a RST (Reset) segment in TCP. The reset signal informs the other side that the connection has been terminated instantly.

Features of Abrupt Connection Release

  • Fast connection termination
  • No waiting for pending data
  • May cause data loss
  • Used during errors or abnormal situations

For example, If a server crashes suddenly during file transfer, the TCP connection may close abruptly and the remaining file data will not reach the receiver.

2. Graceful Connection Release

In a graceful connection release, TCP closes the connection in a proper and organized manner. Both communicating devices independently close their side of the connection after completing all data transmission.

Figure: Graceful Connection Release

How mechanism works In TCP : 

  • Step 1 (FIN from Client): The client sends a FIN to the server to start closing and enters the FIN_WAIT_1 state.
  • Step 2 (ACK from Server): The server acknowledges the FIN and the client moves to FIN_WAIT_2.
  • Step 3 (Client Waiting): The client waits for the server’s FIN while in the FIN_WAIT_2 state.
  • Step 4 (FIN from Server): The server sends its FIN after completing its closing tasks.
  • Step 5 (ACK from Client): The client acknowledges the server’s FIN, enters TIME_WAIT, and after a set delay, the connection closes fully.

The connection remains active until both sides finish sending all remaining data. Therefore, graceful release prevents data loss and ensures reliable communication.

Features of Graceful Connection Release

  • Safe and reliable termination
  • No loss of remaining data
  • Both sides participate equally
  • Uses FIN and ACK segments

For example, When downloading a file from a website, the browser and server close the TCP connection gracefully after the complete file is transferred successfully.

Difference Between Abrupt and Graceful Connection Release

BasisAbrupt ReleaseGraceful Release
Connection ClosingSuddenProper and organized
Data SafetyData may be lostData is safely delivered
TCP Message UsedRSTFIN and ACK
CommunicationStops immediatelyEnds step-by-step
ReliabilityLess reliableMore reliable

Conclusion

TCP (Transmission Control Protocol) is a reliable and connection-oriented protocol used for secure and accurate data transmission over networks. It ensures that data reaches the destination in the correct order without loss or duplication. TCP is commonly used in applications such as web browsing, email services, and file transfers because it provides stable and error-free communication.

Connection establishment in TCP is not symmetric because only the client initiates the communication using the three-way handshake, while the server responds to the request. However, connection termination is symmetric because both the client and server independently participate in closing the connection using the four-way handshake. This symmetric termination ensures that both sides safely complete communication before disconnecting.

How the three setup segments work is in the three-way handshake.