TCP Sequence Number

后端 未结 3 1005
囚心锁ツ
囚心锁ツ 2021-02-03 21:23

I\'m trying to understand how the sequence numbers of the TCP header are generated.

In some places I read that it is the \"index of the first byte in the packet\" (link

3条回答
  •  忘了有多久
    2021-02-03 22:06

    In 4.4BSD (and most Berkeley-derived implementations) when the system is initialized the initial send sequence number is initialized to 1. This practice violates the Host Requirements RFC. (A comment in the code acknowledges that this is wrong.) This variable is then incremented by 64,000 every half-second, and will cycle back to 0 about every 9.5 hours. (This corresponds to a counter that is incremented every 8 microseconds, not every 4 microseconds.) Additionally, each time a connection is established, this variable is incremented by 64,000.

提交回复
热议问题