0% found this document useful (0 votes)
223 views2 pages

Three Way Handshake

The three-way handshake is the process used to establish a connection between two TCP devices. It involves three steps: 1) Device A sends a SYN packet to Device B, 2) Device B responds with a SYN-ACK packet, and 3) Device A sends an ACK packet to Device B to open the connection. In contrast, the two-way handshake used in PAP authentication for PPP links requires only two steps: the peer sends its ID and password to the authenticator until authentication is acknowledged.

Uploaded by

mktknp575
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
223 views2 pages

Three Way Handshake

The three-way handshake is the process used to establish a connection between two TCP devices. It involves three steps: 1) Device A sends a SYN packet to Device B, 2) Device B responds with a SYN-ACK packet, and 3) Device A sends an ACK packet to Device B to open the connection. In contrast, the two-way handshake used in PAP authentication for PPP links requires only two steps: the peer sends its ID and password to the authenticator until authentication is acknowledged.

Uploaded by

mktknp575
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

THREE WAY HANDSHAKE

In this lesson, you will learn how two TCP devices synchronize using three way 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 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 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 side waiting for a connection is the 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 the connection by sending a TCP SYN 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 (Initial SequenceNumber) = 2000. The Active Open device (Device A) sends a segment with the SYN flag set to 1, ACK flag set to 0 and an Initial Sequence Number 2000 (For Example), which marks the beginning of the sequence 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), AcknowledgmentNumber = 2001 (2000 + 1, the next sequence number Device 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 number Device 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 computers start sending data using the sequence and acknowledge numbers.

TWO WAY HANDSHAKE


PAP: Password Authentication Protocol for PPP Links The Password Authentication Protocol (PAP), a Link Control Protocol in the PPP suite, provides a simple method for the peer to establish its identity using a 2-way handshake. This is done only upon initial link establishment. After the Link Establishment phase is complete, an Id/Password pair is repeatedly sent by the peer to the authenticator until authentication is acknowledged or the connection is terminated. PAP is not a strong authentication method. Passwords are sent over the circuit in text format, and there is no protection from sniffing, playback or repeated trial and error attacks. The peer is in control of the frequency and timing of the attempts. Any implementations which include a stronger authentication method (such as CHAP) MUST offer to negotiate that method prior to PAP. This authentication method is most appropriately used where a plaintext password must be available to simulate a login at a remote host. In such use, this method provides a similar level of security to the usual user login at the remote host.

You might also like