I found the material on 'TCP three way handshake' from the Internet, and feel it more important, so show it to everyone.
The TCP three way handshake is the process for establishing a TCP connection. A TCP connection is established as shown in the below example. In this example, we assume a client computer is contacting a server to send it some information.
1.The client sends a packet with the SYN bit set and s sequence number of N;
2.The server sends a packet with an ACK number of N+1, the SYN bit set and a sequence number of X;
3.The client sends a packet with an ACK number of X+1 and the connection is established;
4.The client sends the data;
The first three steps in the above process is called the Three Way Handshake which is used to established a TCP connection.
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 three way handshake performed 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 over IP). TCP segments are passed inside the payload section of the IP packets. IP handles addressing and routing and gets the packet from one place to another, but TCP handles the actual communication between hosts.

本文深入解析TCP三次握手过程,解释其在建立TCP连接中的作用,同时指出FTP、Telnet等协议在开启连接时也遵循三次握手流程。
3956

被折叠的 条评论
为什么被折叠?



