HTTP 3 handshake and 4 wave

HTTP 3 handshake and 4 wave

Use Wireshark to capture packets and analyze HTTP's three-way handshake and four-way wave.

Browser port: 51835
server port: 8080

figure 1

1. Three-way handshake

Insert picture description here
figure 2

  1. 51835-> 8080 [SYN]: The browser says: I want to access your resources on the server, can I open port 8080.
  2. 8080-> 51835 [SYN, ACK]: The server said: Yes, I have opened port 8080, so please open your port 51835
  3. 51835-> 8080 [ACK]: The browser says: No problem, I also opened port 51835.

2. Normal data transmission

image 3

  1. Each time the browser requests, the server responds with [ACK] to indicate that it has received the data (the data will not be parsed yet).
  2. Similarly, every time the server responds, the browser also responds with [ACK] to indicate that it has received the data (the data will not be parsed yet).

3. Four wave

Insert picture description here
Figure 4

  1. 51835-> 8080 [FIN, ACK]: The browser says: write a letter to the server, I want to renounce you.
  2. 8080-> 51835 [ACK]: The server says: Incoming mail received (not yet read the mail).
  3. 8080-> 51835 [FIN, ACK]: The server said: (reply after reading the letter) Fuck! I have received your decisive letter.
  4. 51835-> 8080 [ACK]: The browser says: Incoming mail received (Tell the server, the server knows that the browser has received the absolute letter)
Published 420 original articles · 143 thumbs up · 890,000 views

Guess you like

Origin blog.csdn.net/jeikerxiao/article/details/93628190