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
1. Three-way handshake
- 51835-> 8080 [SYN]: The browser says: I want to access your resources on the server, can I open port 8080.
- 8080-> 51835 [SYN, ACK]: The server said: Yes, I have opened port 8080, so please open your port 51835
- 51835-> 8080 [ACK]: The browser says: No problem, I also opened port 51835.
2. Normal data transmission
- 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).
- 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
- 51835-> 8080 [FIN, ACK]: The browser says: write a letter to the server, I want to renounce you.
- 8080-> 51835 [ACK]: The server says: Incoming mail received (not yet read the mail).
- 8080-> 51835 [FIN, ACK]: The server said: (reply after reading the letter) Fuck! I have received your decisive letter.
- 51835-> 8080 [ACK]: The browser says: Incoming mail received (Tell the server, the server knows that the browser has received the absolute letter)