Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于TCP三步握手那里一些易混淆的地方 #10

Open
jzhzhz opened this issue Aug 3, 2020 · 1 comment
Open

关于TCP三步握手那里一些易混淆的地方 #10

jzhzhz opened this issue Aug 3, 2020 · 1 comment

Comments

@jzhzhz
Copy link

jzhzhz commented Aug 3, 2020

“对于 TCP 头部来说,以下几个字段是很重要的:

序列号 (Sequence number),这个序号保证了 TCP 传输的报文都是有序的,对端可以通过序号顺序的拼接报文

确认号 (Acknowledgement Number),这个序号表示数据接收端期望接收的下一个字节的编号是多少,同时也表示上一个序号的数据已经收到

窗口大小 (Window Size),表示还能接收多少字节的数据,用于流量控制……”

这一段包括之后三步握手部分确实把确认号和ACK标识符区分开了,但是在输入URL到页面加载过程分析那一段的三步握手里出现了:

“端口建立 TCP 链接,三次握手如下:
客户端发送一个 TCP 的SYN=1,Seq=X的包到服务器端口
服务器发回SYN=1, ACK=X+1, Seq=Y的响应包
客户端发送ACK=Y+1, Seq=Z”

这部分应该是把ACK标识符和确认号混淆了,应该是ACKbit为1,确认号为X+1,因为确认号就等于下一个client request的序列号,而当前client request序列号为X且request大小只有1bit,所以下一个SN就是X+1。

@huyaocode
Copy link
Owner

感谢指正

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants