Why does the TCP protocol handshake packet sequence number not start from 0

A question that comes to mind when learning tcp's three-way handshake and four waved hands.

Why randomly generate serial numbers instead of directly starting from 0?

answer:

  1. Prevent TCP sequence prediction attacks. For
    details, please refer to: WIKI TCP sequence prediction attack
  2. Try to avoid data confusion as much as possible (2msl can solve it).
    If cs is disconnected, some data may still remain in the network. When cs is connected again, these delayed data will not reach the server until a new connection is established, if all Starting from 0 will greatly increase the probability of data packets overlapping between the new connection and the old connection, causing data confusion.

Guess you like

Origin blog.csdn.net/qq_41490274/article/details/95607377