![treeway handshaker treeway handshaker](http://2.bp.blogspot.com/-uTC_Qg4wPCY/UH-k50Z2XBI/AAAAAAAAB9Y/MvxAlPb3gAA/s1600/3way.jpg)
![treeway handshaker treeway handshaker](https://pcarleton.com/content/images/2018/06/TCP-3-way.png)
Host A sends a FIN (a TCP segment with the FIN bit set) to Host B to indicate that it wants to terminate the session.The following example provides a simplified description of the process: The hosts are now ready for two-way data exchange.”Ī TCP connection is normally and gracefully terminated when each side of the connection closes its side of the connection independently. The next byte of data that I expect from you is byte number 301. I’m acknowledging your initial sequence number of 300. The initiating device responds with a TCP ACK (TCP segment with the ACK bit set), acknowledging the initial sequence number of the receiving device. The next byte of data I expect to receive from you is byte number 101.” I’m acknowledging your initial sequence number of 100. Host B is telling Host A: “I’m accepting your connection request. The receiving device responds with a TCP SYN/ACK (a TCP segment with the SYN and ACK bits set) acknowledging the peer’s initial sequence number and presenting its own initial sequence number. The TCP three way handshake If you dont already know what the TCP three way handshake then heres a simple explanation. Host A is telling Host B: “Hey, I’d like to start a connection.
![treeway handshaker treeway handshaker](https://miro.medium.com/max/1400/1*n22QJMww4vGw_MrlZbysLg.png)
The initiating device sends a TCP SYN (a TCP segment with the SYN bit set) to the receiving device, starting the handshake process by presenting its initial sequence number. This number is used to track data bytes on this connection. An important function that is performed during connection establishment is that the devices exchange their initial sequence numbers (ISNs). This process involves setting the SYN bit and ACK bit in the segments between the two devices. TCP establishes the connection using a process that is called the TCP three-way handshake. TCP requires a connection to be established between two end systems before data transfer can begin.