Categories: Computer Networks

TCP Connection, Establishment & Flow Control

 

Transport Control Protocol Connection

TCP connection is a full duplex connection which is not actually a wired connection but it maintains connectivity between two end processes. This is established between a single sender and a single receiver and is thus referred as a “point to point” connection. Before, one application process can send data over a TCP connection, a handshake is essentially required which involves initialization of many TCP variables. It provides a reliable connection by preventing packets from getting corrupted and dropped.

TCP connection serves two important purposes with respect to the health of a network which are flow control and congestion control.

TCP Connection Establishment

The TCP connection establishment involves the following three steps:

  1. Client sends SYN=1 and seq = client_isn
  2. Server acknowledges it, so it sends SYN = 1, seq = server_isn, ACK = client_isn+1
  3. Client acknowledges the connection establishment, so now the connection is established, so SYN = 0, seq = client_isn+1, ACK = server_isn +1

 

TCP Flow Control

In connection oriented protocols buffers are present at the sender and the receiver side. Due to finite buffer size at the receiver, we need a mechanism which will tell the sender about the buffer size of the receiver beforehand. This is catered by TCP flow control. “Receive Window” (16 bits) in the TCP caters for flow control. We have to synchronize the sender and receiver in way, such that:

Receive Window = Receive buffer – {Last byte received –last byte Read}

Last byte sent – last byte acknowledged ≤ Receive Window

Related Post

Receive Window indicates the amount of data that can travel over the network, while Receive Buffer indicates is the amount of data that can be buffered at the receiver.

TCP sender needs to maintain only the smallest sequence number of a transmitted but unacknowledged byte (Send Base) and the sequence number of the next byte to be sent (NextSeqNum). Thus TCP resembles GBN (Go Back N) protocol.

GBN and TCP protocols differ from each other in a way that when packet is lost, GBN will transmit all the subsequent packets from n, n+1, n+2………N. On the other hand TCP will only retransmit one segment n, or it may not retransmit segment n, if the acknowledgement for segment “n+1” arrived before the timeout for segment n.

 

Read Further

 

 




  • Mikel

    View Comments

    Recent Posts

    Heart Attack Causes and its Solution

    What is the Main Cause of a Heart Attack? What is its Solution? A heart attack is the blockage of… Read More

    1 year ago

    Understanding the Debt Ceiling: Its Impact, Importance, and Implications

    In the vast economic arena, one term that often takes center stage, inciting extensive debates and discussions, is the "debt… Read More

    2 years ago

    De-Dollarization: The New World Order of Currency and Its Global Impact

    De-Dollarization: The Changing Face of Global Finance The financial landscape is in a state of flux, with an intriguing economic… Read More

    2 years ago

    Unstoppable Bayern Munich: The Story Behind Their 11th Consecutive Bundesliga Title

    The curtains closed on a dramatic Bundesliga season with Bayern Munich standing tall once again, clinching their 11th straight title.… Read More

    2 years ago

    Celine Dion Cancels Concert Tour Due to Deteriorating Stiff-Person Syndrome

    The Unfolding Story of Celine Dion's Health In recent news that has left fans across the globe stunned, iconic singer… Read More

    2 years ago

    Navigating the Crossroads: LeBron James, Anthony Davis, and the LA Lakers’ Uncertain Future

    As the echoes of the recent NBA season start to fade, the attention of enthusiasts is firmly glued to one… Read More

    2 years ago