ortant; visibility: hidden; z-index: 100000;” >
In this ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >lesson, you will learn how two TCP devices synchronize using three way ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >handshake (3 way handshake) and what are the three steps of a TCP three way handshake and how two TCP devices synchronize.
Before the sending device and the receiving device start the ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >exchange of data, both devices need to be synchronized. During the TCP initialization process, the sending device and the receiving device exchange a few control packets for synchronization purposes. This exchange is known as a three-way handshake.
The three-way handshake begins with the initiator sending a TCP segment with the SYN control bit flag set.
TCP allows one side to establish a ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >connection. The other side may either accept the connection or refuse it. If we consider this from application layer point of view, the side that is establishing the connection is the client and the sideortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >waiting for a connection is the ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >server.
TCP identifies two types of OPEN calls:
Active Open. In an Active Open call a device (client process) using TCP takes the active role and initiates theconnection by sending a TCP SYN ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >message to start the connection.
Passive Open A passive OPEN can specify that the device (server process) is waiting for an active OPEN from a specific client. It does not generate any TCP message segment. The server processes listening for the clients are in Passive Open mode.

TCP Three-way Handshake
Step 1. Device A (Client) sends a TCP segment with SYN = 1, ACK = 0, ISN (ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >Initial Sequence ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >Number) = 2000.
The Active Open device (Device A) sends a segment with the SYN flag set to 1, ACK flag set to 0 and an InitialSequence Number 2000 (For Example), which marks the beginning of the sequence ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >numbers for data that device A will transmit. SYN is short for SYNchronize. SYN flag announces an attempt to open a connection. The first byte transmitted to Device B will have the sequence number ISN+1.
Step 2. Device B (Server) receives Device A’s TCP segment and returns a TCP segment with SYN = 1, ACK = 1, ISN = 5000 (Device B’s Initial Sequence Number), Acknowledgment Number = 2001 (2000 + 1, ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >the next sequence numberDevice B expecting from Device A).
Step 3. Device A sends a TCP segment to Device B that acknowledges receipt of Device B’s ISN, With flags set as SYN = 0, ACK = 1, Sequence number = 2001, Acknowledgment number = 5001 (5000 + 1, the next sequence numberDevice A expecting from Device B)
This handshaking technique is referred to as the Three-way handshake or SYN, SYN-ACK, ACK.
After the three-way handshake, the connection is open and the participant ortant; border-bottom-style: solid !important; border-bottom-color: rgb(254, 109, 76) !important; text-decoration: underline !important; color: rgb(254, 109, 76) !important; background-image: none !important; background-attachment: scroll !important; background-color: transparent !important; cursor: pointer !important; display: inline !important; padding: 0px 0px 1px !important; float: none !important; background-repeat: repeat repeat !important;” >computers start sending data using the sequence and acknowledge numbers.
You have learned what is TCP three way hand shake (3 way handshake), the three steps of a TCP three wayhandshake and how two TCP devices synchronize. Click “Next” to continue.