tcp-bitsfortify.com
tcp-bitsfortify.com

TCP (Transmission Control Protocol)

What is TCP (Transmission Control protocol)

TCP stands for Transmission Control Protocol. It is a rule (protocol) used to send data from one computer to another in a safe and correct way. It works on transport layer (Layer 4) of OSI model.

TCP is called a connection-oriented protocol. This means that before sending any data, it first creates a connection between the sender and the receiver. Once the connection is made, only then the data starts moving. And connection Create with 3-way handshake.

Features of TCP

  • Reliable:

TCP is a reliable protocol because it makes sure that the data is sent and received correctly. It uses methods called flow control and error control to manage the data during transmission. When one computer sends data using TCP, the other computer sends back a message to confirm if the data was received properly. This message is called an acknowledgment. If everything is fine, the receiver sends a positive acknowledgment. But if something goes wrong or the data is missing, it sends a negative acknowledgment. This helps the sender know whether the data needs to be sent again or not.

  • Connection Oriented:

It means before sending any data form sender to receiver first create connection between them with 3-way handshake, when data transfer completed connection get terminated with same process either 3-way or 4-way.

  • Full Duplex:

TCP supports Full Duplex feature means data can transfer from source to destination and destination to source in same time.

  • Error control & Flow control:

TCP support Error control feature TCP makes sure the data is correct and complete. If any data is lost or damaged, TCP asks the sender to resend it. Flow control manages the speed of data transfer between sender and receiver and make sure sender doesn’t send data too fast for the receiver to handle data because receiver have limited queue size.

Minimalist Vitamin C Face Serum

3-Way Handshake

Any application or browser trying to communicate with any server, first to establish a TCP connection with 3-way handshake, it’s done in three steps.

Step 1. (SYN): – Sender want to communicate with receiver, so it sends a segment with SYN (Synchronize Sequence Number) flag ON, and with ISN (initial sequence number) it based on clock-based-counter (changes over time to avoid reuse), in modern operating system to generate ISN use cryptographic hash-based algorithm.

Step 2. (SYN+ACK): – Receiver respond this request with SYN+ACK(Acknowledgement) (flag on), ACK shows a reply to the received data, while SYN shows the starting sequence number for the connection. ACK no should be the sender sequence number + 1.

Step 3. (ACK): – Now in third step client acknowledges on the response of the server, this ACK no is responder sequence number plus one, now they both establish a reliable connection with which they will start the actual data transfer.

Wireshark Packet capture reference.

https://www.cloudshark.org/captures/4e8ed77deb52

bitsfortify-news

The Latest blog and news straight to you inbox!

Join 30,000+ subscribers for exclusive access to our daily blog and news!

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *