TCP序列号问题 [英] TCP sequence number question

查看:55
本文介绍了TCP序列号问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这更像是一个理论问题,而不是我遇到的实际问题.

如果我理解正确,数据包的 TCP 头中的序列号是整个流中数据包中第一个字节的索引,对吗?如果是这样,由于序列号是一个无符号的 32 位整数,那么传输超过 FFFFFFFF = 4294967295 个字节后会发生什么?序列号会回绕,还是发送方会发送一个SYN包从0重新开始?

解决方案

序列号循环回 0. 的第 4 章.

This is more of a theoretical question than an actual problem I have.

If I understand correctly, the sequence number in the TCP header of a packet is the index of the first byte in the packet in the whole stream, correct? If that is the case, since the sequence number is an unsigned 32-bit integer, then what happens after more than FFFFFFFF = 4294967295 bytes are transferred? Will the sequence number wrap around, or will the sender send a SYN packet to restart at 0?

解决方案

The sequence number loops back to 0. Source:

TCP sequence numbers and receive windows behave very much like a clock. The receive window shifts each time the receiver receives and acknowledges a new segment of data. Once it runs out of sequence numbers, the sequence number loops back to 0.

Also see chapter 4 of RFC 1323.

这篇关于TCP序列号问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆