Ever wondered how TCP Works ? Let us understand how a connection is established........

😰😨Ever wondered how TCP works and what happens when a node on one network establishes a TCP connection with a node on another network....
First Let us know what TCP is:TCP or Transmission Control Protocol is a standard that defines how to establish and maintain a network conversation through which application programs can exchange data.

Now let us know What Happens during connection very briefly:
  



The TCP network is established in transport layer which involves Multiplexing and Demultiplexing where an IP Datagram encapsulates a TCP server.

As a protocol, TCP establishes connections used to send long chains of segments of data.  

These include IP and Ethernet, which just send individual packets of data.

 The way TCP establishes a connection, is through the use of different TCP control flags, used in a very specific order.

Connection  A, sends a TCP segment to connection B with this SYN flag set. 

 Connection B then responds with a TCP segment, where both the SYN and ACK flags are set

 Then connection  A responds again with just the ACK flag set

 This exchange involving segments that have SYN, SYN/ACK and ACK sets, happens every single time a TCP connection is established anywhere

 This is “The three way handshake”.  

Now, connection A is free to send whatever data it wants to connection B and vice versa. 

Since both sides have now sent SYN/ACK pairs to each other, a TCP connection in this state is operating in full duplex. 

Each segment sent in either direction should be responded to by TCP segment with the ACK field set. This way, the other side always knows what has been received. 

Once one of the devices involved with the TCP connection is ready to close the connection, something known as a four way handshake happens. 

The computer ready to close the connection, sends a FIN flag, which the other computer acknowledges with an ACK flag. 

Then, if this computer is also ready to close the connection, which will almost always be the case. 

It will send a FIN flag. This is again responded to by an ACK flag.



That's a lot of information. Stay Tuned:-)

Thank You

Comments

Post a Comment

Popular posts from this blog

GitHub Copilot: A Technological Boon for the Modern World

Global Chip Shortage !

Blog #2 on Remote Sensing Technology