Wireshark network protocol analysis: interpreting the TCP protocol and understanding TCP three-way handshake and four-way handshake

Wireshark network protocol analysis: interpreting the TCP protocol and understanding TCP three-way handshake and four-way handshake

TCP Transmission Control Protocol is a connection-oriented, reliable, byte stream-based transport layer protocol that implements end-to-end connections for communication between applications.

1. TCP message header format

2. Analysis of TCP three-way handshake to establish a connection

Every TCP communication must go through a three-way handshake to establish a connection and a four-way handshake to disconnect the connection to ensure the reliability of communication.

The meaning of the flag bit:

  • SYN means to establish a connection
  • FIN means closing the connection
  • ACK means response
  • PSH indicates that there is DATA data transmission
  • RST means connection reset

1. The process of establishing a connection:

  • Client sends a request and waits for confirmation
  • After receiving the request, the server responds and asks for confirmation
  • After the client confirms, the connection is established

OK, handshake is successful, data transmission starts.

2. Interpretation of TCP's first handshake message (SYN)

3. Interpretation of TCP second handshake message (SYN/ACK)

4. Interpretation of TCP third handshake message (ACK)

3. TCP waved four times to disconnect

The data packet that waved four times to disconnect is shown in the figure below.

Waving process

The four waves are mainly for the interpretation of the FIN sign, and the rest are basically the same as above.

<<:  SD-WAN in 2019: A conundrum for service providers

>>:  Easy to understand: understanding the "weakness" and "slowness" of mobile networks

Recommend

The future of blockchain

The rise of the digital currency market represent...

Why should enterprises choose SD-WAN?

While MPLS still dominates the WAN market, no ent...

How to identify the protocol of an unfamiliar CAN network?

In a CAN network, all nodes share a bus for data ...

What impact will the cancellation of data roaming have on telecom operators?

With the development of economy and society, the ...

Quantum network achieves key breakthrough: based on quantum entanglement theory

[[248944]] The new network is based on the theory...

5G networks need to overcome three major barriers to large-scale commercial use

Although 5G licenses have been issued, the commer...

AI adds power, lossless network leads to the next stop

How efficient can network transmission be? Let...

How far can a SaaS company go? Mainly determined by these two indicators

[[356547]] To see the current status of a SaaS co...