TCP 3 way handshake

Source: Internet
Author: User
Tags ftp file
TCP connections: the three-way handshake

The three-way handshake in Transmission Control Protocol (also called the three message handshake) is the method used to establish and tear down network connections. this handshaking technique is referred to as the 3-way handshake or as "SYN-SYN-ACK" (or more accurately SYN, SYN-ACK, ACK ). the TCP handshaking mechanic is designed so that two computers attempting to communicate can negotiate the parameters of the network connection before beginning communication. this process is also designed so that both ends can initiate and negotiate separate connections at the same time.

3-way handshake description

Below is a (very) simplified description of the TCP 3-way handshake process. Refer to the distrion the right as you examine the list of events on the left.

Event Digoal

HostSendsA TCPSYNChronize packet to host B

Host B takes es a'sSYN

Host BSendsASYNChronize-ACKNowledgement

Host a takes es B'sSYN-ACK

HostSends ACKNowledge

Host B EsACK.TCP connection is established.

 

SYNChronize andACKNowledge messages are indicated by a bit inside the TCP Header of the segment.

TCP knows whether the network connection is opening, synchronizing or established by usingSYNChronize andACKNowledge messages when establishing a network connection.

When the communication between two computers ends, another 3-way communication is already med to tear down the TCP connection. This setup and teardown of a TCP connection is part of what qualifies TCP a reliable protocol.

Note that UDP does not perform this 3-way handshake and for this reason, it is referred to as an unreliable protocol.

Protocols encapsulated in TCP

Note that FTP, telnet, HTTP, https, SMTP, POP3, IMAP, ssh and any other protocol that rides over TCP also has a thway handshake stored med as connection is opened. HTTP Web requests, SMTP emails, FTP file transfers all manage the messages they each send. TCP handles the transmission of those messages.

TCP rides on top of Internet protocol (IP) which is why it is called TCP/IP (TCP/IP). TCP segments are passedInsideThe payload section of the IP packets. IP handles addressing and Routing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.