大网数据广告活动
服务器运维问答

What should be the next sequence number after a packet with the FIN containing payload?

· 52CE 我爱测

I was capturing some HTTP traffics and I observed a packet with the FIN flag set and also containing payload data. I searched for this topic and I found some similar questions but none of them talking about the next sequence numb…

问题原文

原帖链接 · mrazimi · CC BY-SA 4.0

I was capturing some HTTP traffics and I observed a packet with the FIN flag set and also containing payload data.

I searched for this topic and I found some similar questions but none of them talking about the next sequence number and RFC references for this situation.

similar question

My question is that what should be the next sequence number after packet with the FIN flag set containing payload?

In other words, what should be the ACK number of the packet which is the response of the active opener's FIN packet? What acknowledgment number should the response packet have, while the sender of FIN packet, has a payload, too?

--> <SEQ=100><ACK=300><CTL=FIN,ACK> : payload length = 20 bytes

<-- <SEQ=300><ACK=X><CTL=FIN,ACK>

--> <SEQ=X><ACK=301><CTL=ACK>

Is X 101, 120, or 121?

Do RFC clearly talks about this scenario?

I also searched for that in RFC 793 but I didn't find a clear explanation for my question.

已采纳解答

原帖链接 · mrazimi · CC BY-SA 4.0

RFC 793 indicates that SYN and FIN control flags occupy one sequence number.

In the GLOSSARY it's written about FIN control flag that:

FIN

A control bit (finis) occupying one sequence number, which indicates that the sender will send no more data or control occupying sequence space.

So it can be realized that the value of X should be 121 if the second packet is acknowledging the first packet.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-07-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。