1. Description of the TCP connection establishment
-
The first handshake: connection is established, the client sends syn packets (seq = x) to the server, and enters SYN_SEND state, waiting for the server to confirm;
-
Second handshake: server receives syn packets, must confirm the customer SYN (ack = j + 1), while themselves sends a SYN packet (seq = y), i.e., SYN + ACK packet, then the server enters a state SYN_RECV;
-
Third handshake: the client receives the SYN + ACK packet to the server, the server sends an acknowledgment packet ACK (ack = y + 1), this packet is sent, the client and server into the ESTABLISHED state, complete the three-way handshake.
2.