TCP Sequence Number

后端 未结 3 1051
囚心锁ツ
囚心锁ツ 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:11

    It's a random number between 0 and 4,294,967,295. But in wireshark tool you can see syn as 0 (because it uses relative display) however you can make it to show original seq number by doing Edit -> Preferences. and un-checking relative sequence numbers and window scaling under TCP protocol preferences. The next Sequence number would get increment based on the ACK number (a) that is received (becomes a + 1). ACK get increased based on the payload len (l) that it received (becomes l + 1). Note no data/payload is sent during SYN/FIN flag being active (does making the ACK increment by only one during SYN and FIN).

提交回复
热议问题